Error installing on debian 11

Discussion in 'Installation/Configuration' started by tegazinho, Oct 26, 2021.

Thread Status:
Not open for further replies.
  1. tegazinho

    tegazinho Member

    I'm trying to install ISPconfig using the "Perfect Server Automated ISPconfig for debian 10 - 11. And the installation stop on this error



    Code:
    [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.4 ; update-alternatives --set php-fpm.sock /run/php/php7.4-fpm.sock failed. (/ispconfig.ai.php:15)
    root@hidden:~#
    any ideas?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which exact installer options did you use?
     
  3. tegazinho

    tegazinho Member

    The completely default ones, the last command I ran was
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --use-ftp-ports=40110-40210 --unattended-upgrades
    and just had to confirm with YES to the warning saying "WARNING! This script will reconfigure your complete server!"
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Is this Debian 10 or 11 ? And please post the content of /etc/apt/sources.list file.
     
  5. tegazinho

    tegazinho Member

    Debian 11
    Code:
    root@hidden:~# cat /etc/apt/sources.list
    # See https://wiki.debian.org/SourcesList for more information.
    deb http://deb.debian.org/debian bullseye non-free main contrib
    deb-src http://deb.debian.org/debian bullseye non-free main contrib non-free
    deb http://deb.debian.org/debian bullseye-updates main non-free
    deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
    deb http://security.debian.org/debian-security/ bullseye-security main contrib
    deb-src http://security.debian.org/debian-security/ bullseye-security main contrib
    
    deb https://deb.debian.org/debian bullseye-backports main non-free contrib
    root@hidden:~#
    
    The full specs including the kernel version in case you need to know.
    Code:
    root@tega:~# neofetch
           _,met$$$$$gg.          [email protected]
        ,g$$$$$$$$$$$$$$$P.       ------------------
      ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 11 (bullseye) x86_64
     ,$$P'              `$$$.     Host: MS-7B53 1.0
    ',$$P       ,ggs.     `$$b:   Kernel: 5.10.0-9-amd64
    `d$$'     ,$P"'   .    $$$    Uptime: 1 hour, 13 mins
     $$P      d$'     ,    $$P    Packages: 3384 (dpkg)
     $$:      $$.   -    ,d$$'    Shell: bash 5.1.4
     $$;      Y$b._   _,d$P'      Terminal: /dev/pts/0
     Y$$.    `.`"Y$$$$P"'         CPU: Intel i3-8100 (4) @ 3.600GHz
     `$$b      "-.__              GPU: NVIDIA GeForce GT 710
      `Y$$                        Memory: 1916MiB / 15943MiB
       `Y$$.
         `$$b.
           `Y$$b.
              `"Y$b._
                  `"""
    
    root@tega:~#
    
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Was the sury repository activated successfully? Please check /etc/apt/sources.list.d folder.
     
  7. tegazinho

    tegazinho Member

    I think so
    Code:
    root@tega:~# ls -l /etc/apt/sources.list.d/
    total 44
    -rw-r--r-- 1 root root 131 jul 18 05:36 d-apt.list
    -rw-r--r-- 1 root root 131 jul 18 05:36 d-apt.list.save
    -rw-r--r-- 1 root root  43 out 26 12:00 goaccess.list
    -rw-r--r-- 1 root root  56 jul 18 05:36 insync.list
    -rw-r--r-- 1 root root  56 jul 18 05:36 insync.list.save
    -rw-r--r-- 1 root root  66 jul 18 05:36 linuxuprising-java.list
    -rw-r--r-- 1 root root 140 jul 18 05:36 linuxuprising-ubuntu-java-impish.list
    -rw-r--r-- 1 root root 254 ago  9 03:02 ookla_speedtest-cli.list
    -rw-r--r-- 1 root root  49 out 26 12:00 php.list
    -rw-r--r-- 1 root root  48 out 26 12:00 rspamd.list
    -rw-r--r-- 1 root root  50 jul 18 05:36 speedtest.list.save
    
    Code:
    root@tega:~# cat /etc/apt/sources.list.d/php.list
    deb https://packages.sury.org/php/ bullseye main
    root@tega:~#
    
    apt update gives no issues. All the versions of php seem to be installed.
    the script fails when do the command:
    Code:
    [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.4 ; update-alternatives --set php-fpm.sock /run/php/php7.4-fpm.sock failed. (/ispconfig.ai.php:15)
    
    php-fpm7.4 seemed to have installed along side the other php versions


    Code:
    root@tega:~# php-fpm7.4 -v
    PHP 7.4.25 (fpm-fcgi) (built: Oct 23 2021 21:53:50)
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies
    root@tega:~#
    
    so no idea what is happening
     
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    What about:
    Code:
    ls -l /etc/alternatives | grep php
    
     
  9. tegazinho

    tegazinho Member

    Code:
    root@tega:~# ls -l /etc/alternatives | grep php
    lrwxrwxrwx 1 root root  15 out 26 11:00 php -> /usr/bin/php7.4
    lrwxrwxrwx 1 root root  31 out 26 11:00 php.1.gz -> /usr/share/man/man1/php7.4.1.gz
    lrwxrwxrwx 1 root root  19 out 26 11:00 php-cgi -> /usr/bin/php-cgi7.4
    lrwxrwxrwx 1 root root  35 out 26 11:00 php-cgi.1.gz -> /usr/share/man/man1/php-cgi7.4.1.gz
    lrwxrwxrwx 1 root root  23 out 26 10:58 php-cgi-bin -> /usr/lib/cgi-bin/php8.0
    root@tega:~#
    
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You have installed several non-standard repositories (in /etc/apt/sources.list.d). My guess is those mess up the autoinstaller.
    Try with plain Debian 11, with nothing extra.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The auto-installer needs a fresh and empty Linux system as basis. According to the sources.list.d, this does not seem to be the case (as @Taleman mentioned in his post too).
     
  12. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Your php-fpm was not even installed. So the auto installer failed installing fpm which might be caused by the extra repositories or other incompatibilities. You might be able to check that in auto installer log in the /tmp dir
     
  13. tegazinho

    tegazinho Member

    The repos are for stuff like speedtest and insync, had no other webserver, sql, php, dns or whatsoever installed before, I doubt that would be the case.
    Yes it is, I literally show you on the post I made before this. It was installed during the auto script. I even made apt remove php* before hand to make sure that no other php version was causing the trouble.

    Anyways, I will try and see if I can figure it out, also no log in the /tmp folder that I can see
     
  14. tegazinho

    tegazinho Member

    I just did --use-php=system, and it installed php 7.4 by default, no errors during installation. but 7.4 should be fine for the types of sites I wanna run on this server
     
  15. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    It might be too late to catch this happening again, but we have seen some multi-php systems that failed to start php daemons because /run/php/ either didn't get create or was removed after being created (a coworker said he saw php dirs/files there, that subsequently got removed during boot) - you may have the same thing going on, where there are no php-fpm socket files, and hence no alternatives to set to. I haven't been able to reproduce the problem at will, nor understand what causes it, but it's always been with the sury php packages, never Debian default package.
     
  16. tegazinho

    tegazinho Member

    I got away with installing the rest of ispconfig by choosing the php system version and since all the other versions were installed before the error throw that error and stopped installing. After installed I just created the aditional php versions on the ispconfig. For my understand that command is to create the sock file for the default php, since I don't care what is the default version because choose what php version I want on ISPconfig, everything is working as I intended now.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    If you have installed just the default PHP version, then no additional PHP version should be added. remove the additional PHP version you added in this case.
     
  18. tegazinho

    tegazinho Member

    why? I used the flag -with-php=system (or whatever is the options on the script that I don't remember). And the installation went well, since all the other versions of php were installed from the previous atempts to install running the script I just had to make sure that all the extensions I needed were installed and everything is running ok. I already have 2 sites, one with php-fpm 5.6 (a very old version of joomla that needs that old version) 1 with php-fpm 7.4 and one with php-fpm 8.0 that I added to the additional php versions options on ispconfig! Everything is working with no issues now!

    It even created the socks files, but as I said the only way to around that error, was to first run it without any special options until it shows that update-alternatives error, then I rerun with the option to install the system php. And everything went smooth.


    Code:
    root@tega:/run/php# ls -l /run/php/
    total 16
    -rw-r--r-- 1 root     root      5 out 26 14:04 php5.6-fpm.pid
    srw-rw---- 1 www-data www-data  0 out 26 14:04 php5.6-fpm.sock
    -rw-r--r-- 1 root     root      5 out 26 14:04 php7.0-fpm.pid
    srw-rw---- 1 www-data www-data  0 out 26 14:04 php7.0-fpm.sock
    -rw-r--r-- 1 root     root      5 out 26 14:04 php7.4-fpm.pid
    srw-rw---- 1 www-data www-data  0 out 26 14:04 php7.4-fpm.sock
    -rw-r--r-- 1 root     root      5 out 26 14:04 php8.0-fpm.pid
    srw-rw---- 1 www-data www-data  0 out 26 14:04 php8.0-fpm.sock
    lrwxrwxrwx 1 root     root     30 out 26 13:24 php-fpm.sock -> /etc/alternatives/php-fpm.sock
    root@tega:/run/php#
    
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Simple reason: The system php version may not be listed as an additional PHP version because it is already configured under System > server config. So you configured the same PHP version 7.4 twice now and it will get listed twice in website settings. This might cause issues later. To fix your setup, remove the system PHP version 7.4 from the additional PHP versions list.
     
  20. Neptun

    Neptun Member

    I have also the same issue with the auto install and Debian 11
    Server is completely fresh nothing on it - only the checks from the guide done, after
    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --use-ftp-ports=40110-40210 --unattended-upgrades --use-php=8.0 --lang=de --use-nginx
    Message php cli missing, automatically install starts inclusive php 7.4 and directly afterwards the ispconfing install itself starts and ends then with the error
    I have my servers very often installed with the perfect server guides from till, but with this new auto install, no chance to get it working

    Code:
    [INFO] Installed packages php-pear, php-memcache, php-imagick, mcrypt, imagemagick, libruby, memcached, php-apcu, jailkit, 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] Setting default system php version.
    update-alternatives: Fehler: Alternative /usr/bin/php-cgi7.4 für php-cgi ist nicht registriert; wird nicht gesetzt
    update-alternatives: Fehler: Alternative /run/php/php7.4-fpm.sock für php-fpm.sock ist nicht registriert; wird nicht gesetzt
    [ERROR] Exception occured: ISPConfigOSException -> Command update-alternatives --set php-cgi /usr/bin/php-cgi7.4 ; update-alternatives --set php-fpm.sock /run/php/php7.4-fpm.sock failed. (/ispconfig.ai.php:15)
     
Thread Status:
Not open for further replies.

Share This Page