New server added to cluster failing to connect to db in server.sh

Discussion in 'Installation/Configuration' started by gdeputy, Mar 13, 2024.

  1. gdeputy

    gdeputy New Member HowtoForge Supporter

    I'm adding a new server to an existing cluster. ISPConfig page on the master server is showing all changes failing to propagate to new server. When i comment out server.sh in crontab and run it manually i get the following
    Code:
    root@bzwebl5:/usr/local/ispconfig/server#  /usr/local/ispconfig/server/server.sh
    12.03.2024-16:42 - WARNING - There is already a lockfile set, but no process running with this pid (210607). 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:64
    Stack trace:
    #0 {main}
      thrown in /usr/local/ispconfig/server/server.php on line 64
    Database connection failed Database connection failed Database connection failed Database connection failed Database connection failed Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible! root@bzwebl5:/usr/local/ispconfig/server#
    
    i cant tell what user its trying to log in with, but i can connect to the local db with username ispconfig and the password given in the setup with no issue. Can also connect to the master server, so i'm confused why server.sh is failing

    test script output:


    Code:
    
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 11 (bullseye)
    
    [INFO] uptime:  16:44:34 up 54 min,  1 user,  load average: 0.96, 0.36, 0.25
    
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:           7.8Gi       1.9Gi       3.3Gi        51Mi       2.5Gi       5.5Gi
    Swap:          974Mi          0B       974Mi
    
    [INFO] systemd failed services status:
      UNIT LOAD ACTIVE SUB DESCRIPTION
    0 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.11p2
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.4.33
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.4.33
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 209394)
    [INFO] I found the following mail server(s):
            Postfix (PID 209316)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 209337)
    [INFO] I found the following imap server(s):
            Dovecot (PID 209337)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 209570)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    ***.***.***.***:53              (209578/named)
    ***.***.***.***:53              (209578/named)
    ***.***.***.***:53              (209578/named)
    ***.***.***.***:53              (209578/named)
    ***.***.***.***:53              (209578/named)
    ***.***.***.***:53              (209578/named)
    ***.***.***.***:53              (209578/named)
    ***.***.***.***:53              (209578/named)
    [localhost]:53          (209578/named)
    [localhost]:53          (209578/named)
    [localhost]:53          (209578/named)
    [localhost]:53          (209578/named)
    [localhost]:53          (209578/named)
    [localhost]:53          (209578/named)
    [localhost]:53          (209578/named)
    [localhost]:53          (209578/named)
    [anywhere]:21           (209570/pure-ftpd)
    [anywhere]:22           (635/sshd:)
    [localhost]:953         (209578/named)
    [anywhere]:25           (209316/master)
    [anywhere]:4190         (209337/dovecot)
    [anywhere]:993          (209337/dovecot)
    [anywhere]:995          (209337/dovecot)
    [localhost]:11332               (209323/rspamd:)
    [localhost]:11333               (209323/rspamd:)
    [localhost]:11334               (209323/rspamd:)
    [localhost]:10023               (36970/postgrey)
    [anywhere]:587          (209316/master)
    [localhost]:11211               (158506/memcached)
    [localhost]:6379                (36733/redis-server)
    [anywhere]:110          (209337/dovecot)
    [anywhere]:143          (209337/dovecot)
    [anywhere]:465          (209316/master)
    *:*:*:*::*:21           (209570/pure-ftpd)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::*:53           (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::**:*:*:*::*53          (209578/named)
    *:*:*:*::*:22           (635/sshd:)
    *:*:*:*::*:25           (209316/master)
    *:*:*:*::*:953          (209578/named)
    *:*:*:*::*:443          (209394/apache2)
    *:*:*:*::*:4190         (209337/dovecot)
    *:*:*:*::*:993          (209337/dovecot)
    *:*:*:*::*:995          (209337/dovecot)
    *:*:*:*::*:11332                (209323/rspamd:)
    *:*:*:*::*:11333                (209323/rspamd:)
    *:*:*:*::*:11334                (209323/rspamd:)
    *:*:*:*::*:10023                (36970/postgrey)
    *:*:*:*::*:3306         (208661/mariadbd)
    *:*:*:*::*:587          (209316/master)
    *:*:*:*::*:6379         (36733/redis-server)
    [localhost]10           (209337/dovecot)
    [localhost]43           (209337/dovecot)
    *:*:*:*::*:80           (209394/apache2)
    *:*:*:*::*:8081         (209394/apache2)
    *:*:*:*::*:465          (209316/master)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    f2b-sshd   tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain f2b-sshd (1 references)
    target     prot opt source               destination
    RETURN     all  --  [anywhere]/0            [anywhere]/0
    
    
    
    
    ##### LET'S ENCRYPT #####
    acme.sh is installed in /root/.acme.sh/acme.sh
    
    
     
  2. gdeputy

    gdeputy New Member HowtoForge Supporter

    I should add that to set this up i installed debian 11 and then ran the ispconfig install script with --interactive to add it to the cluster. Everything in the install script ran without a hitch.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The system is not able to connect either to the local database or to the master database. Please test the connection again using the mysql command and the exact login details (incl. exact hostname) from file /usr/local/ispconfig/server/lib/config.inc.php.
     
  4. gdeputy

    gdeputy New Member HowtoForge Supporter

    Thank you, i couldnt find that config file for some reason. The details for the master db were not working for some reason. updated perms on the master db for the user for the slave server and all good now!
     
    till likes this.

Share This Page