Records are not updated on other servers in multiserver setup.

Discussion in 'General' started by damir, Sep 28, 2010.

  1. damir

    damir New Member

    Hi all,

    I have 3 servers:

    server 1 ispconfig software
    server 2 web and database
    server 3 mail

    Now server 1 crashed and i have installed new server and moved database and ispconfig software to new server. All good so far.

    The problem is when i create new records like new sites, clients or emails, they don't get created on server 2 or server 3.

    I have enabled debug on server 1 and i get following:

    28.09.2010-16:11 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    28.09.2010-16:11 - DEBUG - No Updated records found, starting only the core.
    28.09.2010-16:11 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    In Jobqueue i can see that there is jobs waiting but nothing happens.

    When i change update in server table to same number as datalog, records dissapears frpm Jobqueue but they are not created on server 2 or 3.

    Any clues where else to look?

    Crontab -l :

    * * * * * /usr/local/ispconfig/server/ > /dev/null 2>> /var/log/ispconfig/cron.log
    30 00 * * * /usr/local/ispconfig/server/ > /dev/null 2>> /var/log/ispconfig/cron.log
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you restored the complete "mysql.mysql" database which contained also the mysql users that are used by the slave servers to login to the master?
  3. damir

    damir New Member

    I made copy of users from mysql.user table and imported to new server.

    I can login from slaves to master through mysql -l root -h server command
  4. damir

    damir New Member

    Do you have any other tips, where i can look? Jobqueues are filling fast, it's a busy server :)
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    If you have reimported the ispconfig database, then the problem might be related to the auto increment field of the sys_datalog table entries as mysql might have assigned new and lower values.

    In the table sys_server table on the master is a field "updated" which contains the datalog_id (from sys_datalog) of the last entry that was processed for this specific server. The value in updated might be much too high now. Try to find the lowest datalog_ig that has not been processed yet in sys_datalog and rplace the value in updated with this datalog_id. The servers should then start to process all records in the sys_datalog which have a datalog_id higher then the valuethat is in the updated field.
  6. damir

    damir New Member

    In table server, i have three servers with update field, which one to choose? The ones that are not updates, server 2 and 3?

    One side question, on master server, what users can connect to dbispconfig.

    Now i have root users of all three servers that can connect to dbispconfig on master. Shouldn't there be ispcsrvX users as well?
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    There is a record for every server and every server has its own updated field.

    Ok, if the are missing then your problem is not the update field as I first guessed, The problem is that the slaves can not connect to the master as their ispcsrv users dont exist.

    There have to be ispcsrvX as ispconfig does not connect with root to the master server for regular operations, the root login is just used during install or when a update gets installed. The ispcsrv users have complex permissions which means that their permission records are stored in the mysql.user, mysql.db and mysql.table_permissions tables. Do you have a backup of the whole mysql.mysql database so that you can restore those permission records?
  8. damir

    damir New Member

    Hi Till,

    I have complete mysql database and there i can find mysql.user, mysql.db tables but there are no mysql.table_permissions tables. Are they called something else?
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be that the name differs depending on the mysql version. Please look trough all tables in the mysql.mysql database and export or copy all records where the username starts with ispcsrv to the same table in the new database. After that, reload the mysql priveliges in the master database or restart mysql.
  10. damir

    damir New Member

    The name differ but i found it, everything is working now. :)
  11. esmiz

    esmiz Member

    My slave server was acting unresponsively for some time, so I thought it was time to change it before facing a serious hardware failure.
    I added a new slave server to the master, and then start to copy databases, websites, etc, from old mirror to the new one.

    For a couple of weeks I had a master with two mirror-slaves, rsync and Mysql synced and all of them were working properly.
    Four days ago, once I was sure I could safely remove the unreliable mirror, I did it and then nightmare was started.

    New slave kept working well, but master server was not updating any new job, so changes were done just in the slave, but not in the master.
    After a lot of unsuccessful research, I found this post, and I knew It was the solution before finishing reading.

    These instructions are exactly what I have been struggling to find, during last 4 days.

    Once I put the right datalog_id value in the updated field and run /usr/local/ispconfig/server/ my master server came back from death's world.

    God bless you guys !!

    Best regards and many thanks.


Share This Page