Debian 12 autoinstall script fails (nginx)

Discussion in 'Installation/Configuration' started by revell, Mar 8, 2024.

  1. revell

    revell New Member

    Steps to reproduce:
    • Debian 12
    • apt dist-upgrade -y
    • Run the autoinstall script `wget -O - get.<REDACTED DUE TO NEW USER POST> | sh -s -- --use-nginx --unattended-upgrades`
    Output:
    Code:
    ~# wget -O - <REDACTED DUE TO NEW USER POST> | sh -s -- --use-nginx --unattended-upgrades
    --2024-03-08 11:19:25--  https://get.ispconfig.org/
    Resolving get.ispconfig.org (get....)... 104.26.10.246, 172.67.75.112, 104.26.11.246, ...
    Connecting to get.ispconfig.org (get....)|104.26.10.246|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2003 (2.0K) [application/octet-stream]
    Saving to: ‘STDOUT’
    
    -                                        100%[================================================================================>]   1.96K  --.-KB/s    in 0s
    
    2024-03-08 11:19:25 (9.88 MB/s) - written to stdout [2003/2003]
    
    WARNING! This script will reconfigure your entire 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 12 (bookworm)
    [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, gnupg, software-properties-common, curl, cron, ntp
    [INFO] Installed packages ssh, openssh-server, nano, vim-nox, lsb-release, apt-transport-https, ca-certificates, wget, git, gnupg, software-properties-common, curl, cron, 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, mariadb-client, mariadb-server, openssl, rkhunter, binutils, sudo, getmail6, rsyslog
    [INFO] Installed packages dbconfig-common, postfix, postfix-mysql, mariadb-client, mariadb-server, openssl, rkhunter, binutils, sudo, getmail6, rsyslog
    [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] Configuring rkhunter.
    [INFO] Installing packages software-properties-common, update-inetd, dnsutils, resolvconf, clamav, clamav-daemon, zip, unzip, bzip2, xz-utils, lzip, borgbackup, 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, rspamd, redis-server, postgrey, p7zip, p7zip-full, unrar-free, lrzip
    [INFO] Installed packages software-properties-common, update-inetd, dnsutils, resolvconf, clamav, clamav-daemon, zip, unzip, bzip2, xz-utils, lzip, borgbackup, 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, 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 nginx-full, fcgiwrap
    [ERROR] Exception occurred: ISPConfigOSException -> Installing packages failed. (/ispconfig.ai.php:15)
    
    Code:
    ~# uname -a
    Linux pkr-template-debian 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
    ...
    ~# cat /etc/hosts
    127.0.0.1       localhost
    127.0.1.1       pkr-template-debian.local.domain        pkr-template-debian
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ...
    ~# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    udev            962M     0  962M   0% /dev
    tmpfs           197M  3.2M  194M   2% /run
    /dev/sda1       6.9G  2.4G  4.2G  37% /
    tmpfs           984M     0  984M   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs           197M     0  197M   0% /run/user/0
    ...
    ~# hostname -f
    pkr-template-debian.local.domain
    ~# hostname
    pkr-template-debian
    ...
    ~# systemctl status nginx.service
    × nginx.service - A high performance web server and a reverse proxy server
         Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
         Active: failed (Result: exit-code) since Fri 2024-03-08 11:39:03 PST; 19min ago
           Docs: man:nginx(8)
        Process: 41621 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
            CPU: 4ms
    
    Mar 08 11:39:03 pkr-template-debian systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
    Mar 08 11:39:03 pkr-template-debian nginx[41621]: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
    Mar 08 11:39:03 pkr-template-debian nginx[41621]: nginx: configuration file /etc/nginx/nginx.conf test failed
    Mar 08 11:39:03 pkr-template-debian systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
    Mar 08 11:39:03 pkr-template-debian systemd[1]: nginx.service: Failed with result 'exit-code'.
    Mar 08 11:39:03 pkr-template-debian systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
    
    ...
    ii  fcgiwrap                        1.1.0-14                                     amd64        simple server to run CGI applications over FastCGI
    iU  libnginx-mod-http-auth-pam      1:1.5.3-3                                    amd64        PAM authentication module for Nginx
    iU  libnginx-mod-http-dav-ext       1:3.0.0-3                                    amd64        WebDAV missing commands support for Nginx
    iU  libnginx-mod-http-echo          1:0.63-4                                     amd64        Bring echo and more shell style goodies to Nginx
    iU  libnginx-mod-http-geoip2        1:3.4-3                                      amd64        GeoIP2 HTTP module for Nginx
    iU  libnginx-mod-http-subs-filter   1:0.6.4-4                                    amd64        Substitution filter module for Nginx
    iU  libnginx-mod-http-upstream-fair 1:0.0~git20120408.a18b409-3                  amd64        Nginx Upstream Fair Proxy Load Balancer
    iU  libnginx-mod-stream             1.22.1-9                                     amd64        Stream module for Nginx
    iU  libnginx-mod-stream-geoip2      1:3.4-3                                      amd64        GeoIP2 Stream module for Nginx
    iF  nginx                           1.22.1-9                                     amd64        small, powerful, scalable web/proxy server
    ii  nginx-common                    1.22.1-9                                     all          small, powerful, scalable web/proxy server - common files
    iU  nginx-full                      1.22.1-9                                     all          nginx web/proxy server (standard version with 3rd parties)
    
    To proceed, comment/remove `listen [::]:80 default_server;` from /etc/nginx/sites-enabled/default and re-run the setup. Then the setup finishes with the following errors:
    Code:
    [INFO] Checking all services are running.
    [INFO] mysql: OK
    [INFO] clamav-daemon: OK
    [INFO] postfix: OK
    [INFO] bind9: OK
    [INFO] pureftpd: OK
    [INFO] nginx: FAILED
    [WARN] nginx seems not to be running! (/lib/os/class.ISPConfigDebianOS.inc.php:2251)
    [INFO] rspamd: OK
    [INFO] redis-server: OK
    [INFO] dovecot: FAILED
    [WARN] dovecot seems not to be running! (/lib/os/class.ISPConfigDebianOS.inc.php:2251)
    [INFO] Installation ready.
    [INFO] Your ISPConfig admin password is: EApjbaBPpMpeNuz
    [INFO] Your MySQL root password is: WMK1t7syRhSNvUyUsmPo
    [INFO] Warning: Please delete the log files in /tmp/ispconfig-ai/var/log/setup-* once you don't need them anymore because they contain your passwords!
    ...
    ~# systemctl status nginx.service
    × nginx.service - A high performance web server and a reverse proxy server
         Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
         Active: failed (Result: exit-code) since Fri 2024-03-08 12:13:59 PST; 1min 32s ago
       Duration: 32.077s
           Docs: man:nginx(8)
        Process: 201747 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
            CPU: 16ms
    
    Mar 08 12:13:59 pkr-template-debian systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
    Mar 08 12:13:59 pkr-template-debian nginx[201747]: nginx: [emerg] socket() [::]:8081 failed (97: Address family not supported by protocol)
    Mar 08 12:13:59 pkr-template-debian nginx[201747]: nginx: configuration file /etc/nginx/nginx.conf test failed
    Mar 08 12:13:59 pkr-template-debian systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
    Mar 08 12:13:59 pkr-template-debian systemd[1]: nginx.service: Failed with result 'exit-code'.
    Mar 08 12:13:59 pkr-template-debian systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
    
    
    Disabling ipv6 did not make any difference when re-running the setup from clean.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Your system seems to have issues with IPv6, as you guessed already. According to the output, a simple install of Nginx with apt seems to fail as ISPConfig is not involved at that stage of the setup. I guess its an issue with your server or VM base setup and not with the auto-installer, so its unlikely that someone else would be able to reproduce this on his system.
     
    ahrasis likes this.

Share This Page