ISPConfig multiserver setup not syncing via cron anymore

Discussion in 'ISPConfig 3 Priority Support' started by radim_h, Oct 17, 2018.

  1. radim_h

    radim_h Member HowtoForge Supporter

    Hello guys,
    i have big problem as it seems i have broken my multiserver setup.

    I had problem with something which looked as not correctly updated databases as in this thread https://www.howtoforge.com/communit...ith-slave-server-databases.79569/#post-377248

    Today i did following
    - backed up original databases
    - deleted databases
    - imported only dbispconfig structure from clean install of ISPConfig 3.1.13
    - imported only data from my existing install into clean databases

    it went smooth, except client templates, i was gettign error #1054 - Unknown column 'default_mailserver' in 'field list' . It was no problem i imported it without templates and re-created them manually with same template numbers.

    When i enabled cron there came problem, i was getting errors
    17.10.2018-21:18 - WARNING - There is already a lockfile set, but no process running with this pid (6450). Continuing.
    Unable to load the server configuration from [email protected]

    So, i stoped cron,
    then rm -f /usr/local/ispconfig/server/temp/.ispconfig_lock
    run manually /usr/local/ispconfig/server/server.sh
    Then i'm getting again "Unable to load the server configuration from [email protected]" (and also on other slave servers mail and db)

    All logins in config files are correct i can log into dbispconfig as root , also as ispconfig amd also ispconfig remote db user to main server

    AND HERE COMES THE MAIN PROBLEM
    when i load the backup of original databases back, i'm in same exact situation "Unable to load the server configuration from database.root" on all slave servers

    Can you help me please. What can i do to get syncing back ? delete dalalog somehow ? force upgrade ?

    Regards
    R.H.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    First, an explanation when this error is thrown: the error appears when the slave is not able to load the server config from master, this means that either the connection to master is not working or there is no server configuration with that server_id.

    Here a checklist (some points might have been tested already, I just post them for completeness):

    - Test login to master db from slave by using the exact master db config from /usr/local/ispconfig/server/lib/config.inc.php like this:

    mysql -u ispcsrv1 -h master.server.host -p'xxxxxxxxxxx' dbispconfig

    - Check that the server_id in config.inc.php matches the server_id in the server database table for this server in dbispconfig on master server.
    - Check in the server table on master the record for this server, it has a field 'config', this field must contain the server configuration in 'ini' style.
     
  3. radim_h

    radim_h Member HowtoForge Supporter

    Hello,

    thank you !!, you were right there was problem with db access rights. I had no idea when i rename DB in phpmyadmin it changes database user rights to new database. Now it works fine after some alters in mysql database
    Resync is not giving those weird WARNING - Falsche Anfrage / Wrong QuerySQL-Query messages now...

    Please, i have two more questions regarding this complete update

    1. sys_datalog table on master server has about 50MB. there is about 300.000 records going back to 2010. How to prune it? Can i just truncate it ?

    2. I'm getting messages on webserver like:

    Attempting to parse the version 0.16.0 renewal configuration file found at /etc/letsencrypt/renewal/xxxxxx.cz.conf with version 0.10.2 of Certbot. This might not work.
    Thu Oct 18 14:44:50 CEST 2018 Attempting to parse the version 0.22.0 renewal configuration file found at /etc/letsencrypt/renewal/xxxxx-xxxxs.com.conf with version 0.10.2 of Certbot. This might not work. How to fix this? Delete /etc/letsencrypt or is there better solution ?

    This may be and maybe not reason for persisting problem on my webserver. Letsencrypt certificates are updating, but links to them in /var/www/domain.tld/ssl are not updated/rotated. Only thing helping is resynchnronize web sites manually each month (and i hope it will at least still working after my todays actions, or i'm screwed)

    RH
     
    Last edited: Oct 19, 2018
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Yes, you can delete older records there. If you do that, then it might be nescessary though to use tools > resync (just resync clients) when you add a new node to get global records (the ones with server_id = 0 in sys_datalog) to the new node.

    2) Seems as if there are different certbot versions installed. Try to install the latest version of certbot and andsure that all nodes run the latest version and check that there are no old version of certbot in the system anymore.
     
  5. radim_h

    radim_h Member HowtoForge Supporter

    OH, o havent seen the email yesterday, but when i resync there is still message. I suppose there should be some problem with client templates ?
    18.10.2018-12:44 - WARNING - Falsche Anfrage / Wrong QuerySQL-Query = REPLACE INTO `client` (`client_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`company_name`,`company_id`,`gender`,`contact_firstname`,`contact_name`,`customer_no`,`vat_id`,`street`,`zip`,`city`,`state`,`country`,`telephone`,`mobile`,`fax`,`email`,`internet`,`icq`,`notes`,`bank_account_owner`,`bank_account_number`,`bank_code`,`bank_name`,`bank_account_iban`,`bank_account_swift`,`paypal_email`,`default_mailserver`,`mail_servers`,`limit_maildomain`,`limit_mailbox`,`limit_mailalias`,`limit_mailaliasdomain`,`limit_mailforward`,`limit_mailcatchall`,`limit_mailrouting`,`limit_mailfilter`,`limit_fetchmail`,`limit_mailquota`,`limit_spamfilter_wblist`,`limit_spamfilter_user`,`limit_spamfilter_policy`,`default_xmppserver`,`xmpp_servers`,`limit_xmpp_domain`,`limit_xmpp_user`,`limit_xmpp_muc`,`limit_xmpp_anon`,`limit_xmpp_auth_options`,`limit_xmpp_vjud`,`limit_xmpp_proxy`,`limit_xmpp_status`,`
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Compare the client table structure on master and slave, there is probably a column missing on slave server.
     
  7. radim_h

    radim_h Member HowtoForge Supporter

    All the tables on all servers was created from same dump /table structure of 3.1.13/ and data was imported via INSERT.. Visually i cannot find differences.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you see the full REPLACE INTO .... query in the ispconfig.log or on the shell? If yes, please try to execute it in the ispconfig database on the slave manually (via phpmyadmin or the mysql command) to see which error gets shown by mysql.
     

Share This Page