Awstats statistics not generated after upgrade to ISPConfig 3.1.14p2

Discussion in 'ISPConfig 3 Priority Support' started by SupuS, Aug 22, 2019.

  1. SupuS

    SupuS Member HowtoForge Supporter

    Hi,
    I upgraded all servers in our multiserver setup to latest 3.1.14p2 version but after upgrade awstats statistics not generated on some servers any more. There are no error messages in cron.log even if I turn on debugging. Cron daemon is running. When I run statistics manually with this command:

    Code:
    php /usr/local/ispconfig/server/cron_debug.php --cronjob=150-awstats.inc.php
    statistics are generated normally without fatal error. There are only these repeated warnings:

    Code:
    PHP Warning:  mysqli_real_connect() expects parameter 1 to be mysqli, null given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 275
    db::_query -> reconnect
    It seems the 150-awstats.inc.php is not executed at all because yesterday-access.log symlink is not updated too.

    Any idea how to get it work again please?
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please check the dbispconfig database on the server that is affected. Check if in table sys_cron there is an entry with column "running" set to 1. Setting it to 0 again should solve the problem.
     
  3. SupuS

    SupuS Member HowtoForge Supporter

    Hi Croydon,
    yes there was "1" in "running" column. I changed it to "0" and will see tomorrow.
    There is another "1" in "running" column in row with "cronjob_letsencrypt" as name. Should I change it to "0" too?
    Thank you.
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes.
     
  5. SupuS

    SupuS Member HowtoForge Supporter

    And another one "1" in row "cronjob_logfiles", "cronjob_monitor_database_size", "cronjob_monitor_rkhunter" on another server. May be I should set "0" in all rows right?
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes. 3.1.15 will contain a patch for that, but currently you should do it manually if last_run is quite a time ago.
     
  7. SupuS

    SupuS Member HowtoForge Supporter

    I checked it and it doesn't work. When I changed "1" to "0" yesterday than awstats statistics started generating of stats in a minute. But when generation was finished the "1" was not changed to "0" in the "running" column and awstats not executed at midnight. Now there is:

    Code:
    name: cronjob_awstats
    last_run: 2019-08-22 16:00:37
    next_run: 2019-08-23 00:00:00
    running: 1
    
    But there is no awstats process running. Symlink yesterday-access.log was not updated so now it points to 20190821-access.log but this file was gziped to 20190821-access.log.gz so symlink is not valid any more. It is strange because it works on some servers and on others not. All servers should have very same configuration and they are in the same multiserver setup.
     
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    If the "running" is not automatically switched back to 0 it means that something went wrong in the cron job. I'll have a look if it is a problem in the code or not.
     
  9. SupuS

    SupuS Member HowtoForge Supporter

    Thank you. It is not problem of awstats only. The same problem is on some other cron jobs too but not the same jobs on all servers. I upgraded from 3.1.12 version and there was no problem with cron.
     
  10. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The problem seems to occur if you use the cron_debug script. That one does not reset the "running" column. So each time you run the cron_debug currently, you have to reset the running to 0 to make the job run again automatically.
     
  11. SupuS

    SupuS Member HowtoForge Supporter

    I am sure it is not the case. We have 8 web servers and I tried cron_debug only on two of them. The same problem is on servers where cron_debug script never ran.
     
  12. SupuS

    SupuS Member HowtoForge Supporter

    I play with the setting of "running" column and I found followings:
    1. when I run cron_debug script the value of "running" column is not changed from 0 to 1
    2. when I change value of "running" column from 1 to 0 the cron job is executed in next cron run in a minute. When the cron job is finished the value of "running" is not changed to 0 and remains on 1 value
    3. when I change value of "running" column from 1 to 0 again directly after cron job is finished (point 2 above) than value of "running" remains on 0 and next cron job is executed correctly at midnight but value of "running" column remains on 1 again
     
  13. SupuS

    SupuS Member HowtoForge Supporter

    The problem is still not solved .. I have to change value of "running" column every day. I would like to solve it. Is there a way how to debug it or find out where the problem is?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Update to git-stable by using ispconfig-update.sh command.
     
  15. SupuS

    SupuS Member HowtoForge Supporter

    Hi Till,
    I upgraded to git-stable and yesterday to 3.1.15 and cron jobs are executed now. In sys_cron.running row is still "1" value but it seems to work normally.
     

Share This Page