Update/Email/ISPConfig Frontpage not working

Discussion in 'Installation/Configuration' started by ionutd, Aug 6, 2024.

  1. ionutd

    ionutd New Member

    Hello,
    I have read probably all the topics related to this kind of issue without any success.
    As title states after updating to the latest ISPConfig version and some php update the home page of ISPConfig not loading, the --force update returns:
    Code:
    PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user 'ispconfig'@'localhost' (using password: YES) in /tmp/update_runner.sh.4zSAb7GREW/install/lib/mysql.lib.php:112
    Stack trace:
    #0 /tmp/update_runner.sh.4zSAb7GREW/install/lib/mysql.lib.php(112): mysqli_connect()
    #1 /tmp/update_runner.sh.4zSAb7GREW/install/update.php(275): db->setDBName()
    #2 {main}
      thrown in /tmp/update_runner.sh.4zSAb7GREW/install/lib/mysql.lib.php on line 112
    
    The OS is Debian 12
    The active PHP is
    Code:
    [root@server:~]# php -v
    PHP 8.2.22 (cli) (built: Aug  2 2024 16:01:44) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.2.22, Copyright (c) Zend Technologies
        with Zend OPcache v8.2.22, Copyright (c), by Zend Technologies
    
    Code:
    [root@server:~]# ls -l /etc/alternatives | grep php
    lrwxrwxrwx 1 root root  15 Aug  6 18:44 php -> /usr/bin/php8.2
    lrwxrwxrwx 1 root root  31 Aug  6 18:44 php.1.gz -> /usr/share/man/man1/php8.2.1.gz
    lrwxrwxrwx 1 root root  19 Aug  6 18:44 php-cgi -> /usr/bin/php-cgi8.2
    lrwxrwxrwx 1 root root  35 Aug  6 18:44 php-cgi.1.gz -> /usr/share/man/man1/php-cgi8.2.1.gz
    lrwxrwxrwx 1 root root  23 Aug  6 18:44 php-cgi-bin -> /usr/lib/cgi-bin/php8.2
    lrwxrwxrwx 1 root root  24 Aug  6 17:18 php-fpm.sock -> /run/php/php8.2-fpm.sock
    
    The mysql login with root and the password from my.cnf is working
    The login with ispconfig user on mysql and the password from /usr/local/ispconfig/server/lib/config.inc.php is working on localhost and 127.0.0.1
    In mysql I have only ony root user with all privileges on localhost
    htf file bellow:
    Code:
    ##### 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:  17:35:15 up 16 min,  1 user,  load average: 0.29, 0.24, 0.24
     
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:           9.7Gi       2.9Gi       4.9Gi       162Mi       2.4Gi       6.8Gi
    Swap:          3.8Gi          0B       3.8Gi
     
    [INFO] systemd failed services status:
      UNIT                    LOAD   ACTIVE SUB    DESCRIPTION
    ● maldet.service          loaded failed failed Linux Malware Detect monitoring - maldet
    ● php-5.6-fpm.service     loaded failed failed The PHP 5.6 FastCGI Process Manager
    ● php-7.1-fpm.service     loaded failed failed The PHP 7.1 FastCGI Process Manager
    ● php-7.3-fpm.service     loaded failed failed The PHP 7.3 FastCGI Process Manager
    ● plexmediaserver.service loaded failed failed Plex Media Server
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    5 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.12p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.2.22
    [INFO] php-cgi (used for cgi php in default vhost!) is version 8.2.22
    
    ##### PORT CHECK #####
    
    [WARN] Port 22 (SSH server) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Apache 2 (PID 4675)
    [INFO] I found the following mail server(s):
        Postfix (PID 1379)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 891)
    [INFO] I found the following imap server(s):
        Dovecot (PID 891)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 1498)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [localhost]:953        (901/named)
    [localhost]:953        (901/named)
    [localhost]:953        (901/named)
    [localhost]:953        (901/named)
    [localhost]:783        (917/perl)
    [localhost]:53        (901/named)
    [localhost]:53        (901/named)
    [localhost]:53        (901/named)
    [localhost]:53        (901/named)
    [localhost]:10023        (1273/postgrey)
    [localhost]:10025        (1379/master)
    [localhost]:10024        (974/amavisd)
    [localhost]:10027        (1379/master)
    [localhost]:10026        (974/amavisd)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    [localhost]:11211        (899/memcached)
    [anywhere]:993        (891/dovecot)
    [anywhere]:995        (891/dovecot)
    [anywhere]:587        (1379/master)
    ***.***.***.***:2233        (997/sshd:)
    [anywhere]:465        (1379/master)
    [anywhere]:143        (891/dovecot)
    [anywhere]:110        (891/dovecot)
    [anywhere]:111        (1/init)
    [anywhere]:25        (1379/master)
    [anywhere]:21        (1498/pure-ftpd)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    [localhost]:6010        (3040/sshd:)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    ***.***.***.***:53        (901/named)
    [localhost]:6379        (914/redis-server)
    [anywhere]:3306        (1107/mariadbd)
    *:*:*:*::*:6010        (3040/sshd:)
    *:*:*:*::*:6379        (914/redis-server)
    *:*:*:*::*:8080        (4675/apache2)
    *:*:*:*::*:8081        (4675/apache2)
    *:*:*:*::*:993        (891/dovecot)
    *:*:*:*::*:995        (891/dovecot)
    *:*:*:*::*:953        (901/named)
    *:*:*:*::*:953        (901/named)
    *:*:*:*::*:953        (901/named)
    *:*:*:*::*:953        (901/named)
    *:*:*:*::*:587        (1379/master)
    *:*:*:*::*:465        (1379/master)
    *:*:*:*::*:443        (4675/apache2)
    [localhost]43        (891/dovecot)
    [localhost]10        (891/dovecot)
    [localhost]11        (1/init)
    *:*:*:*::*:80        (4675/apache2)
    *:*:*:*::*:25        (1379/master)
    *:*:*:*::*:21        (1498/pure-ftpd)
    *:*:*:*::*:53        (901/named)
    *:*:*:*::*:53        (901/named)
    *:*:*:*::*:53        (901/named)
    *:*:*:*::*:53        (901/named)
    *:*:*:*::*:10023        (1273/postgrey)
    *:*:*:*::*1e6f:65ff:fe9c:53        (901/named)
    *:*:*:*::*1e6f:65ff:fe9c:53        (901/named)
    *:*:*:*::*1e6f:65ff:fe9c:53        (901/named)
    *:*:*:*::*1e6f:65ff:fe9c:53        (901/named)
    *:*:*:*::*:3306        (1107/mariadbd)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination       
    f2b-sshd   6    --  [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       
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***          [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***           [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***        [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***      [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***         [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     0    --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     0    --  [anywhere]/0            [anywhere]/0         
    
    
    
    
    ##### LET'S ENCRYPT #####
    Certbot is installed in /usr/bin/letsencrypt
    
    Debug output:
    Code:
    [root@server:~]# /usr/local/ispconfig/server/server.sh
    06.08.2024-16:22 - WARNING - There is already a lockfile set, but no process running with this pid (10753). 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! PHP Fatal error:  Uncaught Error: Call to a member function queryOneRecord() on bool in /usr/local/ispconfig/security/check.php:55
    Stack trace:
    #0 {main}
      thrown in /usr/local/ispconfig/security/check.php on line 55
    
    Apache2 error on accessing the homepage of ISPConfig:
    Code:
    [Tue Aug 06 19:25:49.708509 2024] [fcgid:warn] [pid 17619:tid 17619] [client *.*.*.*:33186] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to a member function queryOneRecord() on bool in /usr/local/ispconfig/interface/lib/app.inc.php:173
    [Tue Aug 06 19:25:49.708562 2024] [fcgid:warn] [pid 17619:tid 17619] [client *.*.*.*:33186] mod_fcgid: stderr: Stack trace:
    [Tue Aug 06 19:25:49.708584 2024] [fcgid:warn] [pid 17619:tid 17619] [client *.*.*.*:33186] mod_fcgid: stderr: #0 /usr/local/ispconfig/interface/lib/app.inc.php(97): app->conf()
    [Tue Aug 06 19:25:49.708604 2024] [fcgid:warn] [pid 17619:tid 17619] [client *.*.*.*:33186] mod_fcgid: stderr: #1 /usr/local/ispconfig/interface/lib/app.inc.php(411): app->initialize_session()
    [Tue Aug 06 19:25:49.708620 2024] [fcgid:warn] [pid 17619:tid 17619] [client *.*.*.*:33186] mod_fcgid: stderr: #2 /usr/local/ispconfig/interface/web/index.php(32): require_once('...')
    [Tue Aug 06 19:25:49.708633 2024] [fcgid:warn] [pid 17619:tid 17619] [client *.*.*.*:33186] mod_fcgid: stderr: #3 {main}
    [Tue Aug 06 19:25:49.708646 2024] [fcgid:warn] [pid 17619:tid 17619] [client *.*.*.*:33186] mod_fcgid: stderr:   thrown in /usr/local/ispconfig/interface/lib/app.inc.php on line 173
    
    I'm just out of ideas and the most important thing is that emails are not working because of same database connection problem.
    The help will be appreciate it!
     
    Last edited: Aug 6, 2024
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The login details in /usr/local/ispconfig/server/lib/config.inc.php for the user ispconfig are not correct. I know you said you tested them, but if they were correct, you would be able to login. Also, you mentioned that the mail system fails, too, which means that you do not have a problem with PHP, but any software like postfix that uses the login details from that file fails to connect to MySQL.
     
  3. ionutd

    ionutd New Member

    Yes, you are right!
    My mistake. I didn't payed attention carefully to config.inc.php which has to blocks of settings for the database: database and master DB
    Code:
    //** Database
    $conf['db_type'] = 'mysql';
    $conf['db_host'] = 'localhost';
    $conf['db_port'] = '3306';
    $conf['db_database'] = 'dbispconfig';
    $conf['db_user'] = 'ispconfig';
    $conf['db_password'] = '**********************';
    $conf['db_charset'] = 'utf8'; // same charset as html-charset - (HTML --> MYSQL: "utf-8" --> "utf8", "iso-8859-1" --> "latin1")
    $conf['db_new_link'] = false;
    $conf['db_client_flags'] = 0;
    
    define('DB_TYPE',$conf['db_type']);
    define('DB_HOST',$conf['db_host']);
    define('DB_PORT',$conf['db_port']);
    define('DB_DATABASE',$conf['db_database']);
    define('DB_USER',$conf['db_user']);
    define('DB_PASSWORD',$conf['db_password']);
    define('DB_CHARSET',$conf['db_charset']);
    
    
    //** Database settings for the master DB. This setting is only used in multiserver setups
    $conf['dbmaster_type']                  = 'mysql';
    $conf['dbmaster_host']                  = 'localhost';
    $conf['dbmaster_port']                  = '3306';
    $conf['dbmaster_database']              = 'dbispconfig';
    $conf['dbmaster_user']                  = '';
    $conf['dbmaster_password']              = '***************';
    $conf['dbmaster_new_link']              = false;
    $conf['dbmaster_client_flags']  = 0;
    
    For the others which will encounter this issue, pay attention to DB (first part from the above). Also, the password should be the same in dovecot and amavis config files
    /etc/amavis/conf.d/50-user
    /etc/dovecot/dovecot-sql.conf
    Thank you, @till!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There are many more files. Better fix the password in config.inc.php file and then run an ISPConfig update with reconfigure services = yes to fix it in all files.
     

Share This Page