ISPConfig Multiserver setup - Job queue not clearing after database restore

Discussion in 'General' started by Csedwik, Feb 11, 2025.

  1. Csedwik

    Csedwik New Member

    Hi everyone!


    I have an ISPConfig multiserver setup. The main management server's database got corrupted, so I had to restore it from a backup. I did not reconfigured the slave servers because i restored all login credentials and i can log into mysql with proper credentials.

    Since the new database is in place, the job queue is not working properly. The tasks execute correctly on the slave servers, but the datalog_status entries do not disappear from ISPConfig.

    When I manually run or let the cron job execute server.sh, it processes everything, including the database updates, slace server jobs yet the status entries remain.

    I have debugged the job execution and checked logs, but running the script manually results in:
    Code:
    root@manage:~# /usr/local/ispconfig/server/server.sh
    finished server.php.
    
    What could be causing this issue?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to set the value of the field 'updated' in 'server' table on the slaves to the values of the same field on the master.
     
  3. Csedwik

    Csedwik New Member

    I synchronized the updated field in the server table on each slave server with the corresponding value from the master server. I also deleted the sys_datalog table, which cleared the job queue.

    To test, I created a new website. On the web slave server, the updated field incremented (e.g., from 257 to 279), but the corresponding updated field on the master server's database remained unchanged. Should the master server's updated field for that specific slave server have also updated?

    If I manually update the master server's updated field for that slave server to match the slave's value (e.g., to 279), the corresponding datalog_status entries disappear.

    After deleting the website, the updated field on the slave server incremented again (e.g., to 280), but this change was not reflected on the master server. What could be preventing the master server from receiving these updates from the slave servers? If I manually update the master server's updated field to 280, the related datalog_status entries disappear as expected.
    The root password for the master server is correctly configured in mysql_clientdb.conf. I'm now looking at the ispconfig user's password in the dbispconfig table. I've noticed two different password entries in config.inc.php:
    Code:
    $conf['db_password'] = 'xxxx';
    $conf['dbmaster_password'] = 'yyyy';
    Could the discrepancy between these two passwords be the source of the issue? Perhaps the incorrect password is causing the communication problems?

    update: if this is the problem, then how can i login, create websites stc, with the root password?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This was not a good idea, never delete that table, its the history of your setup and clearing all records will cause issues with syncing plus issues with adding new systems in future as a new system can not fully resync itself anymore with the master now.

    No, these must always be different as they are for different servers. Seems as if the ispcsrv* users on the master server have not been restored correctly. You can try to run an ispconfig update on the slaves and let the updater reconfigure permissions in master database during the update.
     
    Csedwik likes this.
  5. Csedwik

    Csedwik New Member

    I got a backup, but i think i destroyed this.

    Can i somehow recreate this job queue again to get sync with all slave or the slave with master? I dont want to recreate the 5 server, i have TB mails, websites, databases.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    First, you must try to fix the mysql user permissions, using the updater is probably the best approach. Then, set the updated column on master and slave to the max sys_datalog id on the master for this node. basically you select all datalog records where server_id = the server_id of that node plus all records where server_id = 0 and the max id you get, is what goes in updated column. Afterwards, you have a state where changes in master should be populating to slaves again. if you ever add a new node, you should run Tools > resync on clients to get the missing data over to all nodes. But that#s nothing that you must do now, its only important when you add a new node as you removed the client history.
     
  7. Csedwik

    Csedwik New Member

    The update and permission reconfiguration on the master server resolved the immediate problem. However, you mentioned that
    So, while my multi-server setup appears to be working now, I'm concerned. Should I be worried that adding, for example, two new slave servers later on could lead to synchronization problems? Should I be concerned about deleting the datalog table, or is everything actually fine now?
    What can i do now? Reinstall? I want to implement more database server and dns server in the near future :/. Even if i can restore the datalog table, not all record i can.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess there is not much you can do now after deleting it. Use Tools > Resync after you add a new slave and resync the clients so you have at least the client records on the new system after you added a new server.
     

Share This Page