Hi, I’m running an ISPConfig multi-server setup and I have an issue on my slave server: backups are created correctly on disk, however, they do not appear in the ISPConfig panel, and old backups are not purged. When the backup cron runs, I get the following error in /var/log/cron.log: Code: PHP Fatal error: Uncaught Error: Call to a member function get() on bool in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:403 Stack trace: #0 /usr/local/ispconfig/server/lib/classes/backup.inc.php(1289): db->queryAllRecords() #1 /usr/local/ispconfig/server/lib/classes/backup.inc.php(2286): backup::backups_garbage_collection() #2 /usr/local/ispconfig/server/lib/classes/cron.d/500-backup.inc.php(54): backup::run_all_backups() #3 /usr/local/ispconfig/server/lib/classes/cronjob.inc.php(90): cronjob_backup->onRunJob() #4 /usr/local/ispconfig/server/cron.php(116): cronjob->run() #5 {main} thrown in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 403 Database credentials in /usr/local/ispconfig/server/lib/mysql_clientdb.conf and config.inc.php are correct, and I can connect to the master database as root without issues. It is not clear when the problem first started, but it might have begun around the time I noticed that the PTR record of this server was wrong (it was still pointing to an old server). I corrected the PTR to the proper hostname afterwards. After successfully testing DB connectivity (using the credentials from the config files), should I also run any specific SQL commands to verify ISPConfig’s database is working correctly? Could the wrong PTR configuration have triggered this issue on the slave? What additional tests would you recommend to identify and fix this problem? Thanks in advance for your help!
Please test if the root password from /usr/local/ispconfig/server/lib/mysql_clientdb.conf on the slave nodeworks for localhost and also for IP 127.0.0.1. Commands: mysql -h localhost -u root -p and mysql -h 127.0.0.1 -u root -p
Hi @till , Thanks for your help. Both looks working on the slave: Code: root@sergio ~ # mysql -h localhost -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 201735 Server version: 10.6.22-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> quit Bye root@sergio ~ # mysql -h 127.0.0.1 -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 201751 Server version: 10.6.22-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> quit Bye root@sergio ~ #
Quick update: I tested a manual backup, and it worked perfectly. This makes me think the issue isn't with the backup process itself. The error I'm seeing seems to be triggered by the backups_garbage_collection() function. Is it possible that the manual backup works because it doesn't call this specific garbage collection function, while the cron job does? Thanks.
You could try to use the cron_debug.php script, which is in the server folder, to manually run the backup cron job to see if the errors occur then as well as this runs the normal backup cron code, just out of schedule.