script: "Lost connection to server during query" only at "Adding PHP version(s) to ISPConfig" step

Discussion in 'Installation/Configuration' started by topogigio, Mar 30, 2026 at 6:11 PM.

Tags:
  1. topogigio

    topogigio Member

    Hi,
    when I try to add a new server to a multi-server setup using the script, it:
    1. creates local DB, etc.
    2. creates new user in master DB
    3. always stops reporting lost connection to server. Connection is still ok, the problem is only when it performs the " Adding PHP version(s) to ISPConfig" step.
    I don't know how to solve. Tried to rollback server's snapshot and try again, but I've same experience. It creates a new user in master DB, then hangs with same error:

    30.03.2026-15:25:40 - /lib/os/class.ISPConfigDebianOS.inc.php:1367: [INFO] Installing packages fail2ban, ufw
    30.03.2026-15:25:47 - /lib/os/class.ISPConfigDebianOS.inc.php:1370: [INFO] Installed packages fail2ban, ufw
    30.03.2026-15:25:49 - /lib/os/class.ISPConfigDebianOS.inc.php:438: [INFO] Fixing dbconfig-common if neccessary
    30.03.2026-15:25:49 - /lib/os/class.ISPConfigDebianOS.inc.php:1042: [INFO] Configuring SSHd
    30.03.2026-15:25:49 - /lib/os/class.ISPConfigDebianOS.inc.php:2077: [INFO] Installing ISPConfig3.
    30.03.2026-15:25:49 - /lib/os/class.ISPConfigDebianOS.inc.php:2163: [INFO] Your MySQL root password is: xxxxxxxxx
    30.03.2026-15:29:09 - /lib/os/class.ISPConfigDebianOS.inc.php:2187: [INFO] Adding PHP version(s) to ISPConfig.
    --------------
    INSERT IGNORE INTO `ispconfig-r69`.`server_php` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `client_id`, `name`, `php_fastcgi_binary`, `php_fastcgi_ini_dir`, `php_fpm_init_script`, `php_fpm_ini_dir`, `php_fpm_pool_dir`, `php_fpm_socket_dir`, `php_cli_binary`, `php_jk_section`, `active`, `sortprio`) VALUES (1, 1, 'riud', 'riud', '', 7, 0, 'PHP 5.6', '/usr/bin/php-cgi5.6', '/etc/php/5.6/cgi', '/etc/init.d/php5.6-fpm', '/etc/php/5.6/fpm', '/etc/php/5.6/fpm/pool.d', '/run/php', '/usr/bin/php5.6', 'php5_6', 'y', 0)
    --------------

    ERROR 2013 (HY000) at line 1: Lost connection to server during query
    [ERROR] Exception occurred: ISPConfigOSException -> Command mysql --host='mysql.xxxxxx.xxxx' --user='ispcsrv7' --password='79cfca6ef08a8f720133895872f49490' -e 'INSERT IGNORE INTO `ispconfig-r69`.`server_php` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `client_id`, `name`, `php_fastcgi_binary`, `php_fastcgi_ini_dir`, `php_fpm_init_script`, `php_fpm_ini_dir`, `php_fpm_pool_dir`, `php_fpm_socket_dir`, `php_cli_binary`, `php_jk_section`, `active`, `sortprio`) VALUES (1, 1, '\''riud'\'', '\''riud'\'', '\'''\'', 7, 0, '\''PHP 5.6'\'', '\''/usr/bin/php-cgi5.6'\'', '\''/etc/php/5.6/cgi'\'', '\''/etc/init.d/php5.6-fpm'\'', '\''/etc/php/5.6/fpm'\'', '\''/etc/php/5.6/fpm/pool.d'\'', '\''/run/php'\'', '\''/usr/bin/php5.6'\'', '\''php5_6'\'', '\''y'\'', 0)' failed. (/ispconfig.ai.php:15)


    If I understand the SQL statement, there is something strange. "ispconfig-r69" is a DB the does NOT exist in master database. It is the name of the DB it has created on the local node. It seems that it is connecting to master DB, using right credential to work with master DB, to perform ad operation on a DB that exists only on local mariadb.

    Any idea?
    thanks
     
  2. topogigio

    topogigio Member

    I think there is a bug in script in multi server scenario.
    1. row 2197 uses slave's db name
    2. row 2198 is false in a slave setup
    3. row 2201 performs connection to the master db, where db's name is different
     
  3. topogigio

    topogigio Member

    there is also a but in the same statement: missing "port" parameter in connection to the master

    opened ticket in gitlab
     
    till likes this.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Thank you for the issue report. I'll check and fix it.
     

Share This Page