AutoInstaller ISPConfigOSException php error

Discussion in 'ISPConfig 3 Priority Support' started by atle, Mar 4, 2021.

  1. atle

    atle Member HowtoForge Supporter

    I am doing a re-install of the master ISPConfig server and I try to use the autoinstall script,
    Code:
    ./ispc3-ai.sh  --interactive --use-ftp-ports=40110-45210 --no-firewall
    and it fails with the following error

    Code:
    [INFO] Disabling conflicting apache modules.
    [INFO] Enabling apache modules.
    [INFO] Enabling default PHP-FPM config.
    [INFO] Setting default system php version.
    update-alternatives: error: no alternatives for php-fpm.sock
    [ERROR] Exception occured: ISPConfigOSException -> Command update-alternatives --set php-cgi /usr/bin/php-cgi7.3 ; update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock failed. (/ispconfig.ai.php:15)
    Debian 10 from scratch.
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. atle

    atle Member HowtoForge Supporter

    Code:
    git clone https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller.git
    cd ispconfig-autoinstaller
    ./ispc3-ai.sh  --interactive --use-ftp-ports=40110-45210 --no-firewall --no-mailman | tee autoinstall.log
     
  4. atle

    atle Member HowtoForge Supporter

    Code:
    curl https://get.ispconfig.org | sh -s -- --interactive --use-ftp-ports=40110-45210 --no-firewall --no-mailman | tee autoinstall.log
    also failes.
     
  5. atle

    atle Member HowtoForge Supporter

    The files to exists
    Code:
    [email protected]:/run/php# file /run/php/php7.3-fpm.sock
    /run/php/php7.3-fpm.sock: socket
    [email protected]:/run/php# file /usr/bin/php-cgi7.3
    /usr/bin/php-cgi7.3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=d44ebe320b8bcde93c82c4a36936164151a39b80, stripped
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Is the Sury repo successfully added to your system?
     
  7. atle

    atle Member HowtoForge Supporter

    The script does not give any other error messages. This is the full output:

    Code:
    [email protected]:~/tmp# curl https://get.ispconfig.org | sh -s -- --interactive --use-ftp-ports=40110-45210 --no-firewall --no-mailman | tee autoinstall.log
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2004  100  2004    0     0   1505      0  0:00:01  0:00:01 --:--:--  1505
    WARNING! This script will reconfigure your complete server!
    It should be run on a freshly installed server and all current configuration that you have done will most likely be lost!
    Type 'yes' if you really want to continue: yes
    [INFO] Starting perfect server setup for Debian GNU/Linux 10 (buster)
    [INFO] Checking hostname.
    [INFO] Enabling contrib and non-free repositories.
    [INFO] Updating packages
    [INFO] Updated packages
    [INFO] Installing packages ssh, openssh-server, nano, vim-nox, lsb-release, apt-transport-https, ca-certificates, wget, git, ntp
    [INFO] Installed packages ssh, openssh-server, nano, vim-nox, lsb-release, apt-transport-https, ca-certificates, wget, git, ntp
    [INFO] Activating rspamd repository.
    [INFO] Activating sury php repository.
    [INFO] Activating GoAccess repository.
    [INFO] Updating packages (after enabling 3rd party repos).
    [INFO] Updated packages
    [INFO] Installing packages dbconfig-common, postfix, postfix-mysql, postfix-doc, mariadb-client, mariadb-server, openssl, getmail4, rkhunter, binutils, sudo
    [INFO] Installed packages dbconfig-common, postfix, postfix-mysql, postfix-doc, mariadb-client, mariadb-server, openssl, getmail4, rkhunter, binutils, sudo
    [INFO] Installing packages dovecot-imapd, dovecot-pop3d, dovecot-mysql, dovecot-sieve, dovecot-managesieved, dovecot-lmtpd
    [INFO] Installed packages dovecot-imapd, dovecot-pop3d, dovecot-mysql, dovecot-sieve, dovecot-managesieved, dovecot-lmtpd
    [INFO] Generating mySQL password.
    [INFO] Writing MySQL config files.
    [INFO] Configuring postfix.
    [INFO] Restarting postfix
    [INFO] Installing packages dnsutils, resolvconf, clamav, clamav-daemon, clamav-docs, zip, unzip, bzip2, xz-utils, lzip, rar, arj, nomarch, lzop, cabextract, apt-listchanges, libnet-ldap-perl, libauthen-sasl-perl, daemon, libio-string-perl, libio-socket-ssl-perl, libnet-ident-perl, libnet-dns-perl, libdbd-mysql-perl, bind9, spamassassin, rspamd, redis-server, postgrey, p7zip, p7zip-full, unrar-free, lrzip
    [INFO] Installed packages dnsutils, resolvconf, clamav, clamav-daemon, clamav-docs, zip, unzip, bzip2, xz-utils, lzip, rar, arj, nomarch, lzop, cabextract, apt-listchanges, libnet-ldap-perl, libauthen-sasl-perl, daemon, libio-string-perl, libio-socket-ssl-perl, libnet-ident-perl, libnet-dns-perl, libdbd-mysql-perl, bind9, spamassassin, rspamd, redis-server, postgrey, p7zip, p7zip-full, unrar-free, lrzip
    [INFO] Stopping Rspamd.
    [INFO] (Re)starting Bind.
    [INFO] Disabling spamassassin daemon.
    [INFO] Checking local dns resolver.
    [INFO] Installing packages apache2, apache2-doc, apache2-utils, libapache2-mod-fcgid, apache2-suexec-pristine, libapache2-mod-python, libapache2-mod-passenger
    [INFO] Installed packages apache2, apache2-doc, apache2-utils, libapache2-mod-fcgid, apache2-suexec-pristine, libapache2-mod-python, libapache2-mod-passenger
    [INFO] Installing packages php-pear, php-memcache, php-imagick, php-gettext, mcrypt, imagemagick, libruby, memcached, php-apcu, php5.6, php5.6-common, php5.6-gd, php5.6-mysql, php5.6-imap, php5.6-cli, php5.6-mcrypt, php5.6-curl, php5.6-intl, php5.6-pspell, php5.6-recode, php5.6-sqlite3, php5.6-tidy, php5.6-xmlrpc, php5.6-xsl, php5.6-zip, php5.6-mbstring, php5.6-soap, php5.6-opcache, php5.6-cgi, php5.6-fpm, php7.0, php7.0-common, php7.0-gd, php7.0-mysql, php7.0-imap, php7.0-cli, php7.0-mcrypt, php7.0-curl, php7.0-intl, php7.0-pspell, php7.0-recode, php7.0-sqlite3, php7.0-tidy, php7.0-xmlrpc, php7.0-xsl, php7.0-zip, php7.0-mbstring, php7.0-soap, php7.0-opcache, php7.0-cgi, php7.0-fpm, php7.1, php7.1-common, php7.1-gd, php7.1-mysql, php7.1-imap, php7.1-cli, php7.1-mcrypt, php7.1-curl, php7.1-intl, php7.1-pspell, php7.1-recode, php7.1-sqlite3, php7.1-tidy, php7.1-xmlrpc, php7.1-xsl, php7.1-zip, php7.1-mbstring, php7.1-soap, php7.1-opcache, php7.1-cgi, php7.1-fpm, php7.2, php7.2-common, php7.2-gd, php7.2-mysql, php7.2-imap, php7.2-cli, php7.2-curl, php7.2-intl, php7.2-pspell, php7.2-recode, php7.2-sqlite3, php7.2-tidy, php7.2-xmlrpc, php7.2-xsl, php7.2-zip, php7.2-mbstring, php7.2-soap, php7.2-opcache, php7.2-cgi, php7.2-fpm, php7.3, php7.3-common, php7.3-gd, php7.3-mysql, php7.3-imap, php7.3-cli, php7.3-curl, php7.3-intl, php7.3-pspell, php7.3-recode, php7.3-sqlite3, php7.3-tidy, php7.3-xmlrpc, php7.3-xsl, php7.3-zip, php7.3-mbstring, php7.3-soap, php7.3-opcache, php7.3-cgi, php7.3-fpm, php7.4, php7.4-common, php7.4-gd, php7.4-mysql, php7.4-imap, php7.4-cli, php7.4-curl, php7.4-intl, php7.4-pspell, php7.4-sqlite3, php7.4-tidy, php7.4-xmlrpc, php7.4-xsl, php7.4-zip, php7.4-mbstring, php7.4-soap, php7.4-opcache, php7.4-cgi, php7.4-fpm, php8.0, php8.0-common, php8.0-gd, php8.0-mysql, php8.0-imap, php8.0-cli, php8.0-curl, php8.0-intl, php8.0-pspell, php8.0-sqlite3, php8.0-tidy, php8.0-xsl, php8.0-zip, php8.0-mbstring, php8.0-soap, php8.0-opcache, php8.0-cgi, php8.0-fpm
    [INFO] Installed packages php-pear, php-memcache, php-imagick, php-gettext, mcrypt, imagemagick, libruby, memcached, php-apcu, php5.6, php5.6-common, php5.6-gd, php5.6-mysql, php5.6-imap, php5.6-cli, php5.6-mcrypt, php5.6-curl, php5.6-intl, php5.6-pspell, php5.6-recode, php5.6-sqlite3, php5.6-tidy, php5.6-xmlrpc, php5.6-xsl, php5.6-zip, php5.6-mbstring, php5.6-soap, php5.6-opcache, php5.6-cgi, php5.6-fpm, php7.0, php7.0-common, php7.0-gd, php7.0-mysql, php7.0-imap, php7.0-cli, php7.0-mcrypt, php7.0-curl, php7.0-intl, php7.0-pspell, php7.0-recode, php7.0-sqlite3, php7.0-tidy, php7.0-xmlrpc, php7.0-xsl, php7.0-zip, php7.0-mbstring, php7.0-soap, php7.0-opcache, php7.0-cgi, php7.0-fpm, php7.1, php7.1-common, php7.1-gd, php7.1-mysql, php7.1-imap, php7.1-cli, php7.1-mcrypt, php7.1-curl, php7.1-intl, php7.1-pspell, php7.1-recode, php7.1-sqlite3, php7.1-tidy, php7.1-xmlrpc, php7.1-xsl, php7.1-zip, php7.1-mbstring, php7.1-soap, php7.1-opcache, php7.1-cgi, php7.1-fpm, php7.2, php7.2-common, php7.2-gd, php7.2-mysql, php7.2-imap, php7.2-cli, php7.2-curl, php7.2-intl, php7.2-pspell, php7.2-recode, php7.2-sqlite3, php7.2-tidy, php7.2-xmlrpc, php7.2-xsl, php7.2-zip, php7.2-mbstring, php7.2-soap, php7.2-opcache, php7.2-cgi, php7.2-fpm, php7.3, php7.3-common, php7.3-gd, php7.3-mysql, php7.3-imap, php7.3-cli, php7.3-curl, php7.3-intl, php7.3-pspell, php7.3-recode, php7.3-sqlite3, php7.3-tidy, php7.3-xmlrpc, php7.3-xsl, php7.3-zip, php7.3-mbstring, php7.3-soap, php7.3-opcache, php7.3-cgi, php7.3-fpm, php7.4, php7.4-common, php7.4-gd, php7.4-mysql, php7.4-imap, php7.4-cli, php7.4-curl, php7.4-intl, php7.4-pspell, php7.4-sqlite3, php7.4-tidy, php7.4-xmlrpc, php7.4-xsl, php7.4-zip, php7.4-mbstring, php7.4-soap, php7.4-opcache, php7.4-cgi, php7.4-fpm, php8.0, php8.0-common, php8.0-gd, php8.0-mysql, php8.0-imap, php8.0-cli, php8.0-curl, php8.0-intl, php8.0-pspell, php8.0-sqlite3, php8.0-tidy, php8.0-xsl, php8.0-zip, php8.0-mbstring, php8.0-soap, php8.0-opcache, php8.0-cgi, php8.0-fpm
    [INFO] Disabling conflicting apache modules.
    [INFO] Enabling apache modules.
    [INFO] Enabling default PHP-FPM config.
    [INFO] Setting default system php version.
    update-alternatives: error: no alternatives for php-fpm.sock
    [ERROR] Exception occured: ISPConfigOSException -> Command update-alternatives --set php-cgi /usr/bin/php-cgi7.3 ; update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock failed. (/ispconfig.ai.php:15)
    
    When I do the update-alternatives from the command line, it failes as well:

    Code:
    [email protected]:~/tmp# update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock
    update-alternatives: error: no alternatives for php-fpm.sock
    
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Just installed a test system - latest Debian 10. It works fine here.
    What is the output of
    Code:
    lsb_release -a
    Did you do any modifications to the installer / the system before installing?
     
  9. atle

    atle Member HowtoForge Supporter

    No, same Debian 10 install I always has done before.
    However, I am now reinstalling Debian from scratch again. I did noticed os lang was not set to en before I ran the auto install script. WIll be back when the server is up again.
     
  10. atle

    atle Member HowtoForge Supporter

    Nope, re-install did not help.

    Code:
    [email protected]:~/tmp/ispconfig-autoinstaller# lsb_release -a
    No LSB modules are available.
    Distributor ID:    Debian
    Description:    Debian GNU/Linux 10 (buster)
    Release:    10
    Codename:    buster
    I have also attached log file of stdout
     

    Attached Files:

  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    What is the output of
    Code:
    ls -la /run/php/*fpm*
    ?

    And what is the output of
    Code:
    apt install php5.6-fpm php7.0-fpm php7.1-fpm php7.2-fpm php7.3-fpm php7.4-fpm php8.0-fpm
     
  12. atle

    atle Member HowtoForge Supporter

    These are the outputs
    Code:
    [email protected]:~# ls -la /run/php/*fpm*
    -rw-r--r-- 1 root     root     5 Mar  4 17:11 /run/php/php5.6-fpm.pid
    srw-rw---- 1 www-data www-data 0 Mar  4 17:11 /run/php/php5.6-fpm.sock
    -rw-r--r-- 1 root     root     5 Mar  4 17:11 /run/php/php7.0-fpm.pid
    srw-rw---- 1 www-data www-data 0 Mar  4 17:11 /run/php/php7.0-fpm.sock
    -rw-r--r-- 1 root     root     5 Mar  4 17:11 /run/php/php7.1-fpm.pid
    srw-rw---- 1 www-data www-data 0 Mar  4 17:11 /run/php/php7.1-fpm.sock
    -rw-r--r-- 1 root     root     5 Mar  4 17:11 /run/php/php7.2-fpm.pid
    srw-rw---- 1 www-data www-data 0 Mar  4 17:11 /run/php/php7.2-fpm.sock
    -rw-r--r-- 1 root     root     5 Mar  4 17:11 /run/php/php7.3-fpm.pid
    srw-rw---- 1 www-data www-data 0 Mar  4 17:11 /run/php/php7.3-fpm.sock
    -rw-r--r-- 1 root     root     5 Mar  4 17:11 /run/php/php7.4-fpm.pid
    srw-rw---- 1 www-data www-data 0 Mar  4 17:11 /run/php/php7.4-fpm.sock
    -rw-r--r-- 1 root     root     5 Mar  4 17:11 /run/php/php8.0-fpm.pid
    srw-rw---- 1 www-data www-data 0 Mar  4 17:11 /run/php/php8.0-fpm.sock
    and

    Code:
    [email protected]:~# apt install php5.6-fpm php7.0-fpm php7.1-fpm php7.2-fpm php7.3-fpm php7.4-fpm php8.0-fpm
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    php5.6-fpm is already the newest version (5.6.40-47+0~20210227.51+debian10~1.gbpd522a2).
    php7.0-fpm is already the newest version (7.0.33-47+0~20210228.54+debian10~1.gbp7f60a9).
    php7.1-fpm is already the newest version (7.1.33-34+0~20210228.54+debian10~1.gbpb1fb69).
    php7.2-fpm is already the newest version (7.2.34-18+0~20210223.60+debian10~1.gbpb21322).
    php7.3-fpm is already the newest version (7.3.27-9+0~20210227.82+debian10~1.gbpa4a3d6).
    php7.4-fpm is already the newest version (7.4.15-7+0~20210227.41+debian10~1.gbpb91400).
    php8.0-fpm is already the newest version (8.0.2-7+0~20210227.16+debian10~1.gbp7931ce).
    The following package was automatically installed and is no longer required:
      libtokyocabinet9
    Use 'apt autoremove' to remove it.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
     
  13. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Very weird. And what shows
    Code:
    update-alternatives --config php-fpm.sock
    ?
     
  14. atle

    atle Member HowtoForge Supporter

    Yes, indeed

    Code:
    [email protected]:~# update-alternatives --config php-fpm.sock
    update-alternatives: error: no alternatives for php-fpm.soc
     
  15. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you try rebooting the system and then run the same command?
     
  16. atle

    atle Member HowtoForge Supporter

    Same result
    Code:
    [email protected]:~# update-alternatives --config php-fpm.sock
    update-alternatives: error: no alternatives for php-fpm.sock
    It is a native Debian 10, I did however install disk quota before the auto-install. However, I did that as well with the www server that I used auto-install on and that went well. (that is last week)
     
  17. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Are you logged in as root? If you logged in as normal user, did you use "su -" to become root?
     
  18. atle

    atle Member HowtoForge Supporter

    Yep, always loged in as root :) Have not done rm -rf / for 35 years :)
     
  19. atle

    atle Member HowtoForge Supporter

    I will do a complete re-install again. Last time I did it from a snap-shot, will do it from the very beginning.
     
  20. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Alright, let us know.
     

Share This Page