ISPConfig job queue problem

Discussion in 'Installation/Configuration' started by philgardner, Dec 12, 2017.

  1. philgardner

    philgardner Member

    Recently, whenever I make a change in the ISPC3 control panel that affects the database, the resultant changes are stuck in the job queue. I can work around this by running /usr/local/ispconfig/server/server.sh as root, but this produces errors; the jobs are cleared in the control panel but they do not always work correctly.

    Example: today I added a new database user and database for a new website. They didn't appear in the list of databases and database users, and I found they were stuck in the job queue. I ran /usr/local/ispconfig/server/server.sh and got the following output:

    PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 528

    Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 528
    12.12.2017-11:33 - ERROR - Unable to connect to mysqlAccess denied for user 'root'@'localhost' (using password: YES)
    PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 184

    Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 184
    12.12.2017-11:33 - ERROR - Unable to connect to mysqlAccess denied for user 'root'@'localhost' (using password: YES)
    12.12.2017-11:33 - WARNING - DB::nextRecord()-> mysql_fetch_array Access denied for user 'root'@'localhost' (using password: YES)
    finished.

    The job queue was then empty, and the database and database user now appeared in the control panel, but when I checked with phpmyadmin they do not actually exist!

    I have checked that mysql is running and that I can log in using mysql -u root -p.

    Please help me sort this annoying problem out. Meanwhile, can I fix my immediate problem by creating the database and database user manually using SQL?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you altered the MySQL root password after ISPConfig installation and missed to set the new password in the file /usr/local/ispconfig/server/lib/mysql_clientdb.conf.php
     
  3. philgardner

    philgardner Member

    Thank you! That was it. /usr/local/ispconfig/server/server.sh now runs without errors and works correctly. However, the job queue is still not being run automatically. How do I check whether the cron job is set up correctly?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    First, try to restart the cron daemon. If thai don't work, run:

    crontab -e

    as root and add something to the crontab, e.g. a new line at the end with a comment like:

    # comment

    and save the file. This should trigger cron to reread the crontab. If it still does not work, then post the output of:

    crontab -l
     
  5. philgardner

    philgardner Member

    Thank you. Restarting cron and adding a line using crontab -e didn't solve the problem; crontab -l gave the output:

    #
    # SpamAssassin maintenance for amavisd-new
    #
    # m h dom mon dow user command
    18 */3 * * * amavis test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-sync
    24 1 * * * amavis test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-clean
    #
    # IWP email update notification
    #
    * */3 * * * php -q /var/www/clients/client1/web1/web/iwp/cron.php >/dev/null 2>&1
    # comment

    The two ispconfig lines were missing! I have no idea how that could have happened. So I added the lines:
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done

    ... and all is now well. Thank you so much for your help.
     
    till likes this.

Share This Page