AWstats not working after upgrade to latest stable

  • Normally this is not required.
    You can look in the logs if the cron has run.

  • Looks like the Perl script does not work when run manually. Not sure why this broke in the upgrade. Any ideas?


    root@sosaria:/var/log# /usr/bin/perl /var/www/imscp/engine/PerlLib/Addons/Webstats/Awstats/Scripts/awstats_updateall.pl now


    Error: Can't find AWStats program ('awstats.pl').
    Use -awstatsprog option to solve this.
    root@sosaria:/var/log#


    root@sosaria:/var/log# locate awstats.pl
    /usr/lib/cgi-bin/awstats.pl


    Is that the right path? In /var/www/imscp/engine/PerlLib/Addons/Webstats/Awstats/Scripts/awstats_updateall.pl it referes to other locations.

  • I edited the var/www/imscp/engine/PerlLib/Addons/Webstats/Awstats/Scripts/awstats_updateall.pl and changed:


    from:


    # Check if AWSTATS prog is found
    my $AwstatsFound=0;
    if (-s "$Awstats") { $AwstatsFound=1; }
    elsif (-s "/usr/local/awstats/wwwroot/cgi-bin/awstats.pl") {
    $Awstats="/usr/local/awstats/wwwroot/cgi-bin/awstats.pl";
    $AwstatsFound=1;


    to:


    # Check if AWSTATS prog is found
    my $AwstatsFound=0;
    if (-s "$Awstats") { $AwstatsFound=1; }
    elsif (-s "/usr/lib/cgi-bin/awstats.pl") {
    $Awstats="/usr/lib/cgi-bin/awstats.pl";
    $AwstatsFound=1;


    I'm not sure why my awstats.pl was not in the original location? Is this a bug or only a problem from my system upgrade?

  • Run the Command manually:

    Quote

    /usr/bin/perl /var/www/imscp/engine/PerlLib/Addons/Webstats/Awstats/Scripts/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl >/dev/null 2>&


    And see if it works?


    With me all is good now after changing the cronjob


    EDIT: And please do not change any *.pl if you don't know what you are doing, this are not necessary to change something there!

  • ok I changed it back to the original.


    I can run the command manually and it updates my stats.


    I've added the line as Nuxwin said but no autoupdates to my awstats. Is the cron good?


    # imscp [Addons::Webstats::Awstats] entry BEGIN
    15 3-21/6 * * * root /usr/bin/perl /var/www/imscp/engine/PerlLib/Addons/Webstats/Awstats/Scripts/awstats_updateall.pl now -awstatsprog=/usr/lib/cgi-bin/awstats.pl >/dev/null 2>&1
    # imscp [Addons::Webstats::Awstats] entry ENDING


    I don't see anything in my /var/log/syslog
    /usr/bin/logger "i-MSCP: DNS zones updated from ns1.tantosoft.com\!")
    Feb 18 13:30:01 sosaria /USR/SBIN/CRON[28073]: (root) CMD (/var/www/imscp/engine/tools/imscp-del-tmp >/dev/null 2>&1)
    Feb 18 13:30:01 sosaria /USR/SBIN/CRON[28074]: (root) CMD (/var/www/imscp/engine/traffic/imscp-vrl-traff &>/var/log/imscp/imscp-vrl-traff.log)
    Feb 18 13:30:01 sosaria /USR/SBIN/CRON[28070]: (CRON) error (grandchild #28071 failed with exit status 8)
    Feb 18 13:39:01 sosaria /USR/SBIN/CRON[28202]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
    Feb 18 14:00:01 sosaria /USR/SBIN/CRON[28392]: (root) CMD (/usr/bin/wget --no-check-certificate http://admin.tantosoft.com/domain/ -O /etc/bind/named.tantosoft.conf && /etc/init.d/bind9 reload && /usr/bin/logger "i-MSCP: DNS zones updated from ns1.tantosoft.com\!")
    Feb 18 14:00:01 sosaria /USR/SBIN/CRON[28393]: (root) CMD (/var/www/imscp/engine/traffic/imscp-srv-traff &>/var/log/imscp/imscp-srv-traff.log)
    Feb 18 14:00:01 sosaria /USR/SBIN/CRON[28395]: (root) CMD (/var/www/imscp/engine/tools/imscp-del-tmp >/dev/null 2>&1)
    Feb 18 14:00:01 sosaria /USR/SBIN/CRON[28394]: (root) CMD (/var/www/imscp/engine/traffic/imscp-vrl-traff &>/var/log/imscp/imscp-vrl-traff.log)
    Feb 18 14:00:02 sosaria /USR/SBIN/CRON[28391]: (CRON) error (grandchild #28392 failed with exit status 8)
    Feb 18 14:09:01 sosaria /USR/SBIN/CRON[28536]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
    Feb 18 14:17:01 sosaria /USR/SBIN/CRON[28649]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
    Feb 18 14:30:01 sosaria /USR/SBIN/CRON[28900]: (root) CMD (/usr/bin/wget --no-check-certificate http://admin.tantosoft.com/domain/ -O /etc/bind/named.tantosoft.conf && /etc/init.d/bind9 reload && /usr/bin/logger "i-MSCP: DNS zones updated from ns1.tantosoft.com\!")
    Feb 18 14:30:01 sosaria /USR/SBIN/CRON[28902]: (root) CMD (/var/www/imscp/engine/traffic/imscp-srv-traff &>/var/log/imscp/imscp-srv-traff.log)
    Feb 18 14:30:01 sosaria /USR/SBIN/CRON[28901]: (root) CMD (/var/www/imscp/engine/traffic/imscp-vrl-traff &>/var/log/imscp/imscp-vrl-traff.log)
    Feb 18 14:30:01 sosaria /USR/SBIN/CRON[28903]: (root) CMD (/var/www/imscp/engine/tools/imscp-del-tmp >/dev/null 2>&1)
    Feb 18 14:30:01 sosaria /USR/SBIN/CRON[28899]: (CRON) error (grandchild #28900 failed with exit status 8)
    Feb 18 14:39:01 sosaria /USR/SBIN/CRON[29910]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
    Feb 18 15:00:01 sosaria /USR/SBIN/CRON[30159]: (root) CMD (/var/www/imscp/engine/traffic/imscp-srv-traff &>/var/log/imscp/imscp-srv-traff.log)
    Feb 18 15:00:01 sosaria /USR/SBIN/CRON[30158]: (root) CMD (/usr/bin/wget --no-check-certificate http://admin.tantosoft.com/domain/ -O /etc/bind/named.tantosoft.conf && /etc/init.d/bind9 reload && /usr/bin/logger "i-MSCP: DNS zones updated from ns1.tantosoft.com\!")
    Feb 18 15:00:01 sosaria /USR/SBIN/CRON[30161]: (root) CMD (/var/www/imscp/engine/traffic/imscp-vrl-traff &>/var/log/imscp/imscp-vrl-traff.log)
    Feb 18 15:00:01 sosaria /USR/SBIN/CRON[30160]: (root) CMD (/var/www/imscp/engine/tools/imscp-del-tmp >/dev/null 2>&1)
    Feb 18 15:00:01 sosaria /USR/SBIN/CRON[30157]: (CRON) error (grandchild #30158 failed with exit status 8)
    Feb 18 15:09:01 sosaria /USR/SBIN/CRON[30473]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
    Feb 18 15:17:01 sosaria /USR/SBIN/CRON[30569]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
    Feb 18 15:30:01 sosaria /USR/SBIN/CRON[30685]: (root) CMD (/usr/bin/wget --no-check-certificate http://admin.tantosoft.com/domain/ -O /etc/bind/named.tantosoft.conf && /etc/init.d/bind9 reload && /usr/bin/logger "i-MSCP: DNS zones updated from ns1.tantosoft.com\!")
    Feb 18 15:30:01 sosaria /USR/SBIN/CRON[30684]: (CRON) error (grandchild #30685 failed with exit status 8)
    Feb 18 15:39:01 sosaria /USR/SBIN/CRON[30764]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
    Feb 18 16:00:01 sosaria /USR/SBIN/CRON[31036]: (root) CMD (/usr/bin/wget --no-check-certificate http://admin.tantosoft.com/domain/ -O /etc/bind/named.tantosoft.conf && /etc/init.d/bind9 reload && /usr/bin/logger "i-MSCP: DNS zones updated from ns1.tantosoft.com\!")
    Feb 18 16:00:01 sosaria /USR/SBIN/CRON[31035]: (CRON) error (grandchild #31036 failed with exit status 8)

  • The cronjob is right so, you have to wait until the cronjob get executed, see later if the statics are updated correctly.
    After my cronjob change all runs well.