Testing autoinstaller, not adding contrib and non-free

Discussion in 'ISPConfig 3 Priority Support' started by Taleman, Nov 18, 2020.

  1. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The autoinstaller outputs in the beginning:
    Code:
    [INFO] Starting perfect server setup for Debian GNU/Linux 10 (buster)
    [INFO] Enabling contrib and non-free repositories.
    But contrib and non-free are not added to /etc/apt/sources.list and /etc/apt/sources.list.d/ directory has files for php and rspamd, not for these repos.
    Maybe this is why autoinstall fails:
    Code:
    ./ispc3-ai.sh --no-mailman
    
    
    [INFO] Installing packages apache2, apache2-doc, apache2-utils, libapache2-mod-fcgid, apache2-suexec-pristine, libapache2-mod-php, libapache2-mod-python, libapache2-mod-passenger
    [ERROR] Exception occured: ISPConfigOSException -> Installing packages failed. (/ispconfig.ai.php:15)
    
    And now for something completely different:
    autoinstaller adds to /etc/resolv.conf the line
    Code:
    nameserver 127.0.0.1
    
    which makes host stop using my name servers for this local LAN, and specifically not find my apt cache host. I have DHCP server to give network settings.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Seems the modifying /etc/resolv.conf is the culprit. I commented out the 127.0.0.1 line, but autoinstaller adds it back and right after that fails to install packages.
    Code:
    # cat /etc/resolv.conf
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
    
    nameserver 127.0.0.1
    nameserver 192.168.42.4
    nameserver 192.168.42.5
    search my.local.lan
    
    Code:
    [INFO] Checking local dns resolver.
    [INFO] Installing packages apache2, apache2-doc, apache2-utils, libapache2-mod-fcgid, apache2-suexec-pristine, libapache2-mod-php, libapache2-mod-python, libapache2-mod-passenger
    [ERROR] Exception occured: ISPConfigOSException -> Installing packages failed. (/ispconfig.ai.php:15)
    
     
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    On one mail server loaded with the autoinstaller I found unbound was installed but not enabled/started, causing rspamd dns issues; you might check that.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    No unbound installed.
    Code:
    root@ispcprim:~/ispconfig-autoinstaller# LANG=C cat /etc/debian_version
    10.6
    root@ispcprim:~/ispconfig-autoinstaller# LANG=C apt policy unbound
    unbound:
      Installed: (none)
      Candidate: 1.9.0-2+deb10u2
      Version table:
         1.9.0-2+deb10u2 500
            500 http://approx.my.local.domain:9999/debian buster/main amd64 Packages
            500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
    root@ispcprim:~/ispconfig-autoinstaller#
    
    I can not find documentation fo autoinstaller. I'll start reading the code to maybe understand what is happening.
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Figured something, at least.
    If autoinstaller is to install local-dns it installs either bind9 or unbound. In my case it was bind9. With that 127.0.0.1 added to /etc/resolv.conf and no configuration done so bind9 could resolve my local LAN zone it can not find my approx APT cache host. I had only configured that to /etc/apt/sources.list when installing the base Debian 10 before running autoinstaller. This meant when autoinstaller did its addition to resolv.conf no package repository could be found.
    I added to /etc/apt/sources.list
    Code:
    deb http://deb.debian.org/debian/ buster main contrib
    deb http://ftp.fi.debian.org/debian/ buster main contrib
    and now autoinstaller works better. Waiting if it can run to completion.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Nope.
    Code:
    [INFO] Installed packages apache2, apache2-doc, apache2-utils, libapache2-mod-fcgid, apache2-suexec-pristine, libapache2-mod-php, libapache2-mod-python, libapache2-mod-passenger
    [INFO] Installing packages php-pear, php-memcache, php-imagick, php-gettext, mcrypt, imagemagick, libruby, memcached, php-apcu, jailkit, 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
    [ERROR] Exception occured: ISPConfigOSException -> Installing packages failed. (/ispconfig.ai.php:15)
    
    Found it is /tmp/ispconfig-ai/var/log -directory where logs are written with --debug.
    That did not help me understanding what is not working:
    Code:
    # cat  ispconfig.log
    19.11.2020-13:25:32 - /lib/class.ISPConfig.inc.php:117: [DEBUG] Trying to autoload class file "/tmp/ispconfig-ai/lib/os/class.ISPConfigBaseOS.inc.php" for class "ISPConfigBaseOS"
    19.11.2020-13:25:32 - /lib/class.ISPConfig.inc.php:117: [DEBUG] Trying to autoload class file "/tmp/ispconfig-ai/lib/class.ISPConfigFunctions.inc.php" for class "ISPConfigFunctions"
    19.11.2020-13:25:32 - /lib/class.ISPConfig.inc.php:308: [INFO] Starting perfect server setup for Debian GNU/Linux 10 (buster)
    19.11.2020-13:25:32 - /lib/class.ISPConfig.inc.php:117: [DEBUG] Trying to autoload class file "/tmp/ispconfig-ai/lib/os/class.ISPConfigDebian10OS.inc.php" for class "ISPConfigDebian10OS"
    19.11.2020-13:25:32 - /lib/class.ISPConfig.inc.php:117: [DEBUG] Trying to autoload class file "/tmp/ispconfig-ai/lib/os/class.ISPConfigDebianOS.inc.php" for class "ISPConfigDebianOS"
    
    apt install is failing with code 100. That does not help me much.
    Ran by hand the apt-get command without -qq -y, that helped to see what happens.
    Found error,
    Code:
    E: Unable to locate package jailkit
    root@ispcprim:~/ispconfig-autoinstaller# LANG=C apt  policy jailkit
    N: Unable to locate package jailkit
    
    It is in buster backports, but that repo is not activated. https://packages.debian.org/buster-backports/jailkit
     
  7. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The installer modifies the sources.list file. So if you have a custom one the installer might fail to modify it. That might be the cause.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Added buster backports repo and installed manually jailkit from there. Then started autoinstaller for the umpteenth time. At least that apt-get command seems to run now.
    I hope this testing session is used to make the autoinstaller better? I have spent a day on this so far.
     
    ahrasis likes this.
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It looks to me autoinstaller did no modifications. It should warn it tried to and failed, so I could have found out what is wrong right away. Only custom thing was using my approx APT cache.
     
  10. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    You can of course contribute to it. Just fork the repo and create merge requests for what you want to be improved. Currently the AI is only a side-project that cannot take much time.

    https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller/
     
  11. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes. It does a simple search and replace without checking results as it assumes a clean system:

    '/^(deb.*\s+main)\s*$/' => '$1 contrib non-free'

    So I guess your lines do not end with "main" or do not begin with "deb" after your changes.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    I used the autoinstaller to install several servers and it worked without issues on my systems.
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I have two other hosts to install, I'll try setting up Debian 10 base with static ip and no apt proxy.
    Meanwhile, the current install has been stuck here for three hours:
    Code:
    [INFO] Installed packages roundcube, roundcube-core, roundcube-mysql, roundcube-plugins
    [INFO] Installing ISPConfig3.
    
    
    The ISPConfig installation package has been downloaded and extracted.
    Code:
    root@ispcprim:/etc/apt/sources.list.d# ls -lhd /tmp/ispconfig*
    drwxrwxr-x 11 root root 4,0K loka   15 12:51 /tmp/ispconfig3_install
    drwxr-xr-x  4 root root 4,0K marras 19 13:56 /tmp/ispconfig-ai
    -rw-r--r--  1 root root 1,6K marras 19 14:28 /tmp/ispconfig.autoinstall.ini
    -rw-r--r--  1 root root 3,7M loka   15 17:14 /tmp/ispconfig.tar.gz
    
    Looks to me it is doing this:
    Code:
    root     32069 32035  0 14:28 pts/1    00:00:01 php -q install.php --autoinstall=/tmp/ispconfig.autoinstall.ini
     
  14. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    is haveged running?
     
  15. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Yes it is.
    Code:
    # systemctl status haveged.service
    ● haveged.service - Entropy daemon using the HAVEGE algorithm
       Loaded: loaded (/lib/systemd/system/haveged.service; enabled; vendor preset:
       Active: active (running) since Thu 2020-11-19 14:25:42 EET; 4h 43min ago
         Docs: man:haveged(8)
               http://www.issihosts.com/haveged/
     Main PID: 26361 (haveged)
        Tasks: 1 (limit: 2359)
       Memory: 4.4M
       CGroup: /system.slice/haveged.service
               └─26361 /usr/sbin/haveged --Foreground --verbose=1 -w 1024
    
    marras 19 14:25:42 ispcprim systemd[1]: Started Entropy daemon using the HAVEGE
    marras 19 14:25:43 ispcprim haveged[26361]: haveged: ver: 1.9.1; arch: x86; vend
    marras 19 14:25:43 ispcprim haveged[26361]: haveged: cpu: (L4 VC); data: 32K (L2
    marras 19 14:25:43 ispcprim haveged[26361]: haveged: tot tests(BA8): A:1/1 B:1/1
    marras 19 14:25:43 ispcprim haveged[26361]: haveged: fills: 0, generated: 0
    
     
  16. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please use --interactive for now. The new ISPConfig 3.2 seems to be missing some autoinstall ini entries in the AI.
     
    ahrasis likes this.

Share This Page