ISPConfigOSException error with autoinstaller (Debian 10)

Discussion in 'Installation/Configuration' started by jnrmy, Jun 9, 2021.

  1. jnrmy

    jnrmy New Member

    Hello,

    I tried to install ISPConfig 3 on a container (provided by my web host) using the "Perfect Server Automated ISPConfig 3 Installation on Debian 10" tutorial and the installation stopped with an error.

    It was a fresh install. Only things I did before was setting up hostname and hosts as required in the tutorial and installed wget manually as it was not.

    Here is what I got :

    Code:
    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, gnupg, ntp
    [INFO] Installed packages ssh, openssh-server, nano, vim-nox, lsb-release, apt-transport-https, ca-certificates, wget, git, gnupg, 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] Default shell is currently dash.
    [INFO] Setting bash as default shell.
    [INFO] Default shell is now bash.
    [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 software-properties-common, 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
    [ERROR] Exception occured: ISPConfigOSException -> Installing packages failed. (/ispconfig.ai.php:15)
    
    JR.
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Run with --debug to get more info, including the exact command being run, then run the failing install command (towards the end of the output) manually to see what error is returned.
     
    Last edited: Jun 9, 2021
  3. jnrmy

    jnrmy New Member

    here is what i get with --debug :

    Code:
    wget -O - https://get.ispconfig.org | sh -s -- --use-php=7.4,8.0 --use-ftp-ports=40110-40210 --debug
    --2021-06-09 16:23:10--  https://get.ispconfig.org/
    Resolving get.ispconfig.org (get.ispconfig.org)... 104.26.10.246, 104.26.11.246, 172.67.75.112, ...
    Connecting to get.ispconfig.org (get.ispconfig.org)|104.26.10.246|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2004 (2.0K) [application/octet-stream]
    Saving to: ‘STDOUT’
    
    -                                     100%[========================================================================>]   1.96K  --.-KB/s    in 0s    
    
    2021-06-09 16:23:10 (28.4 MB/s) - written to stdout [2004/2004]
    
    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
    [ERROR] Exception occured: ISPConfigOSException -> Command while fuser /var/lib/dpkg/lock >/dev/null 2>&1 || fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 2; done; DEBIAN_FRONTEND="noninteractive" apt-get dist-upgrade -o Dpkg::Options::="--force-overwrite" -qq -y 2>&1 failed. (/ispconfig.ai.php:15) 
    What do you mean by running again the failling install command ? Doing the same thing without --debug ?
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    No, take that last log message, which now shows the command being run:
    And try running the apt-get command manually (I anticipated it being an "install" command when in fact it is "dist-upgrade"), ie. run:
    Code:
    apt-get dist-upgrade -o Dpkg::Options::="--force-overwrite" -qq -y
    and see what that returns.
     
  5. jnrmy

    jnrmy New Member

    Oh, okay sorry.
    Here it is. Looks like bind9 has some struggles.
    Code:
    apt-get dist-upgrade -o Dpkg::Options::="--force-overwrite" -qq -y
    Setting up bind9 (1:9.11.5.P4+dfsg-5.1+deb10u5) ...
    bind9-pkcs11.service is a disabled or a static unit, not starting it.
    bind9-resolvconf.service is a disabled or a static unit, not starting it.
    Job for bind9.service failed because the control process exited with error code.
    See "systemctl status bind9.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript bind9, action "start" failed.
    ● bind9.service - BIND Domain Name Server
       Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
      Drop-In: /run/systemd/system/bind9.service.d
               └─zzz-lxc-service.conf
       Active: failed (Result: exit-code) since Wed 2021-06-09 21:50:05 CEST; 11ms ago
         Docs: man:named(8)
      Process: 56357 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=1/FAILURE)
    
    Jun 09 21:50:05 isp named[56359]: no IPv4 interfaces found
    Jun 09 21:50:05 isp named[56359]: not listening on any interfaces
    Jun 09 21:50:05 isp named[56359]: generating session key for dynamic DNS
    Jun 09 21:50:05 isp named[56359]: sizing zone task pool based on 5 zones
    Jun 09 21:50:05 isp named[56359]: could not configure root hints from '/usr/share/dns/root.hints': permission denied
    Jun 09 21:50:05 isp named[56359]: loading configuration: permission denied
    Jun 09 21:50:05 isp named[56359]: exiting (due to fatal error)
    Jun 09 21:50:05 isp systemd[1]: bind9.service: Control process exited, code=exited, status=1/FAILURE
    Jun 09 21:50:05 isp systemd[1]: bind9.service: Failed with result 'exit-code'.
    Jun 09 21:50:05 isp systemd[1]: Failed to start BIND Domain Name Server.
    dpkg: error processing package bind9 (--configure):
     installed bind9 package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
     bind9
    E: Sub-process /usr/bin/dpkg returned an error code (1) 
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    What permissions and ownership do /, /etc and /etc/bind have? ('ls -ld / /etc /etc/bind')
     
  7. jnrmy

    jnrmy New Member

    Code:
    drwxr-xr-x 21 root root  21 Jun  9 07:31 /
    drwxr-xr-x 84 root root 162 Jun  9 14:29 /etc
    drwxr-sr-x  2 root bind  14 Jun  9 14:28 /etc/bind
    
     
  8. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    And maybe I should read the error closer? :) How about 'ls -ld /usr /usr/share /usr/share/dns/ /usr/share/dns/root.hints'?
     
  9. jnrmy

    jnrmy New Member

    Code:
    drwxr-xr-x  10 root root   10 Jun  9 07:26 /usr
    drwxr-xr-x 110 root root  110 Jun  9 14:28 /usr/share
    drwxr-xr-x   2 root root    6 Jun  9 21:56 /usr/share/dns/
    -rw-r--r--   1 root root 3313 Mar 23  2019 /usr/share/dns/root.hints
    
     
  10. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    That is correct. Looks like this is a debian bug in apparmor config, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904983;msg=5 for the fix.
     
  11. jnrmy

    jnrmy New Member

    I looked at /etc/apparmor.d/usr.sbin.named but the comma is not missing.
     
  12. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Just to confirm, you are talking about line 36?:
    Code:
      /usr/share/dns/root.* r,
    (the issue mentions line 33, but that is not for /usr/share/dns/root.*)

    In checking the file here, it also has a comma (on line 36). And in looking more, that bug is against Debian 9. Still, I wonder if it's apparmor that is causing your issue; do you see any logs showing up at this time (eg. from apparmor)?
     
  13. jnrmy

    jnrmy New Member

    Yep, line 36, that one you posted.
    No, I've seen nothing about apparmor in the logs. All I have is what we've seen earlier about root.hints.
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of the command:

    df -h
     
  16. jnrmy

    jnrmy New Member

    @Taleman : I am not sure I can do that, it's a linux container, not an actual server.
    @till :
    Code:
    Filesystem                        Size  Used Avail Use% Mounted on
    lxd300G01/containers/ct-166558-1   47G  844M   46G   2% /
    none                              492K  4.0K  488K   1% /dev
    udev                               63G     0   63G   0% /dev/tty
    tmpfs                             100K     0  100K   0% /dev/lxd
    tmpfs                             100K     0  100K   0% /dev/.lxd-mounts
    tmpfs                              63G     0   63G   0% /dev/shm
    tmpfs                              63G   17M   63G   1% /run
    tmpfs                             5.0M     0  5.0M   0% /run/lock
    tmpfs                              63G     0   63G   0% /sys/fs/cgroup
    tmpfs                             763M     0  763M   0% /run/user/1000
    
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    The most likely reason for your issue is the container that you use, might be missing permissions in the container, e.g. lxc container in unprivileged mode will most likely not work, privileged mode might work, but things like website quotas won't work in LXC at all. Better get a real VM virtualized with KVM or a similar full virtualization or get a root server.
     
  18. jnrmy

    jnrmy New Member

    That container was already running ISPConfig 3 since 2018, and bind was running correctly too. I only did a Debian 10 fresh install.
     
  19. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    really? :) if have no problems with quoatas inside a lxc-container.
     
    ahrasis likes this.
  20. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    You mean you have no problem with quotas inside lxc container @florian030? Kindly share please... :D
     

Share This Page