ispconfig sync issues with slave server

Discussion in 'ISPConfig 3 Priority Support' started by Stephan Ververda, Dec 8, 2024.

  1. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    Two days ago i upgraded the slave server (only having a secondary DNS role) from Debian 11 to Debian 12. It was still running ISPConfig version
    3.2.8p2 as well as the master (yes i know, got far beyond in updating).
    After resolving a few debian 12 upgrade issues i left it at that.

    Last night i update the master server from Debian 10 to Debian 12, lots of Debian upgrade issues but managed to resolve all of those. Then started upgrading the master to ISPConfig version 3.2.12p1. Had issues with the http2 directive in nginx, resolved that. So far so good.
    Upgraded the slave server to ISPConfig version 3.2.12p1 and all seemed fine.

    Then on the master i started removing older php version, setting the default php to 8.2 and starting to update several web servers to include the proper php version. Then i noticed that changes were not populating to all servers. The issue seemed to be the slave server.

    So when running
    Code:
    # /usr/local/ispconfig/server/server.sh
    i was getting back the following:
    Code:
    08.12.2024-10:18 - WARNING - There is already a lockfile set, but no process running with this pid (12539). Continuing.
    Database connection failed Database connection failed Database connection failed Database connection failed Database connection failed Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible! PHP Fatal error:  Uncaught Error: Call to a member function testConnection() on bool in /usr/local/ispconfig/server/server.php:67
    Stack trace:
    #0 {main}
      thrown in /usr/local/ispconfig/server/server.php on line 67
    Database connection failed Database connection failed Database connection failed Database connection failed Database connection failed Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!
    When i check in ISPConfig the ISPC Cron-log i noticed the last entry being from last friday when i did the Debian 12 upgrade about server.php and no more entries since then.

    The error above seems to suggest there is something with the connection to the database. Connecting directly to MariaDB seems to be no problem, neither running queries.
    I did set the proper php, php-cgi and php-fpm alternatives to 8.2.
    php8.2-mysql is installed.

    Temporarily turned on MariaDB general logging and did see constance queries being run on dbispconfig tables... so there is communication locally
    For sure it has access to the master database (as this is a step in updating the slave server that did not return any error).
    So i'm kind of clueless right now.

    And to include all:

    Code:
    root@nleema-srv002:~# cat htf_report.txt
    
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 12 (bookworm)
    
    [INFO] uptime:  11:16:37 up 38 min,  2 users,  load average: 0.08, 0.12, 0.08
    
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:           1.6Gi       736Mi       211Mi       3.1Mi       887Mi       936Mi
    Swap:             0B          0B          0B
    
    [INFO] systemd failed services status:
      UNIT LOAD ACTIVE SUB DESCRIPTION
    0 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.12p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.2.26
    [INFO] php-cgi (used for cgi php in default vhost!) is version 8.2.26
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    [WARN] Port 8081 (ISPConfig Apps) seems NOT to be listening
    [WARN] Port 80 (Webserver) seems NOT to be listening
    [WARN] Port 443 (Webserver SSL) seems NOT to be listening
    [WARN] Port 143 (IMAP server) seems NOT to be listening
    [WARN] Port 993 (IMAP server SSL) seems NOT to be listening
    [WARN] Port 110 (POP3 server) seems NOT to be listening
    [WARN] Port 995 (POP3 server SSL) seems NOT to be listening
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    [WARN] Port 21 (FTP server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    [WARN] I found no "smtp" entry in your postfix master.cf
    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connections you have to enable this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.
    
    ##### RUNNING SERVER PROCESSES #####
    
    [WARN] I could not determine which web server is running.
    [INFO] I found the following mail server(s):
            Exim (PID 1110)
    [WARN] I could not determine which pop3 server is running.
    [WARN] I could not determine which imap server is running.
    [WARN] I could not determine which ftp server is running.
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [anywhere]:22           (830/sshd:)
    [localhost]:953         (11505/named)
    [anywhere]:556          (1113/perl)
    ***.***.***.***:53              (11505/named)
    [localhost]:53          (11505/named)
    [localhost]:25          (1110/exim4)
    [localhost]:3306                (11473/mariadbd)
    [anywhere]:20202                (1247/fluent-bit)
    [anywhere]:10000                (817/perl)
    *:*:*:*::*:22           (830/sshd:)
    *:*:*:*::*:25           (1110/exim4)
    *:*:*:*::*:53           (11505/named)
    *:*:*:*::*:20201                (1220/otelopscol)
    *:*:*:*::*:953          (11505/named)
    [localhost]0000         (817/perl)
    *:*:*:*::**:*:*:*::*53          (11505/named)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    
    
    
    ##### LET'S ENCRYPT #####
    [WARN] You have both certbot and acme.sh installed. This can lead to problems.
    Certbot: /usr/bin/letsencrypt
    acme.sh: /root/.acme.sh/acme.sh
    
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run:

    /usr/local/ispconfig/server/server.sh

    on the slave node after enabling debug mode for it in the GUI on the master and post the complete output you get on the shell.
     
  3. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    Is there another way to increase the log level to debug on that slave. When I set it from the master in the GUI I see the counter of changes to be made going up, but not going down... and it's already been 10 minutes since changing it. The output of
    /usr/local/ispconfig/server/server.sh remains the same
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then please post the complete server.sh output that you get at the moment. You can also manually test the connection to the local and remote database. Use the hostname, username and password for local and remote connection that you can find in the file /usr/local/ispconfig/server/lib/config.inc.php and test the connection using mysql command like this:

    mysql -h master.server.tld -u ispcsrvX -p dbispconfig

    Replace hostname and exact ispcsrv user name with the ones from the config file and enter the password from config file when requested by the command.
     
    Stephan Ververda likes this.
  5. Stephan Ververda

    Stephan Ververda Member HowtoForge Supporter

    The same output as before from server.sh:

    Code:
    08.12.2024-13:40 - WARNING - There is already a lockfile set, but no process running with this pid (66965). Continuing.
    Database connection failed Database connection failed Database connection failed Database connection failed Database connection failed Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible! PHP Fatal error:  Uncaught Error: Call to a member function testConnection() on bool in /usr/local/ispconfig/server/server.php:67
    Stack trace:
    #0 {main}
      thrown in /usr/local/ispconfig/server/server.php on line 67
    Database connection failed Database connection failed Database connection failed Database connection failed Database connection failed Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible! 
    Testing localhost (slave):
    Code:
    root@xxxxxxxxxxxx:~# mysql -h localhost -u ispconfig -p dbispconfig
    Enter password:
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 412
    Server version: 10.11.9-MariaDB-0+deb12u1-log Debian 12
    
    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 [dbispconfig]>
    
    
    Testing remote (master):

    Code:
    root@xxxxxxxxxxx:~# mysql -h xxxxxxx.its-provided.com -u ispcsrv4 -p dbispconfig
    Enter password:
    ERROR 1045 (28000): Access denied for user 'ispcsrv4'@'35.204.xxxx.xxxx' (using password: YES)
    root@xxxxxxxxxxx:~#
    
    And I guess I have found the problem. Something in the DNS has changed as it now resolves to the external IP of the master and not the internal IP. On the master the user ispcsrv4 is on the userlist with the internal ipv4, the ipv6 and the fqdn... but not the external, so it wasn't getting access. Seems to the result of the Debian upgrade and the server no longer pointing to the internal DNS.

    Tnx Till, problem solved!
     
    till likes this.

Share This Page