Vpro Customer: Install script fails to install on new clean Ubuntu 22.04.3 server

SYSTEM INFORMATION
OS type and version Ubuntu 22.04.3
Webmin version NA
Virtualmin version LATEST FROM SCRIPT
Related packages NA

Completely fresh ubuntu 22.04 server install from DVD image. Minimal with ssh server. OS installs fine. Networking and DNS resolution working perfectly. Updated to latest ubuntu releases 22.04.3 reboot all is fine with the base system.

Download the installer script from here wget https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh
run it sudo sh virtualmin-install.sh
All appears well until this:

sudo sh ./virtualmin-install.sh

  Welcome to the Virtualmin GPL installer, version 7.1.0

  This script must be run on a freshly installed supported OS. It does not
  perform updates or upgrades (use your system package manager) or license
  changes (use the "virtualmin change-license" command).

  The systems currently supported by the install script are:

    Red Hat Enterprise Linux and derivatives
      - RHEL 8 and 9 on x86_64
      - Alma and Rocky 8 and 9 on x86_64
      - CentOS 7 on x86_64
      
    Debian Linux and derivatives
      - Debian 10, 11 and 12 on i386 and amd64
      - Ubuntu 20.04 LTS and 22.04 LTS on i386 and amd64

  If your OS/version/arch is not listed, installation will fail. More
  details about the systems supported by the script can be found here:

    https://www.virtualmin.com/os-support

  The selected package bundle is LAMP and the size of install is
  full. It will require up to 2 GB of disk space.

  Exit and re-run this script with --help flag to see available options.

 Continue? (y/n) y
[INFO] Started installation log in /root/virtualmin-install.log
▣◻◻◻ Phase 1 of 4: Check
Checking system time                                                         ✔ 
Checking Perl installation                                                   ✔ 
Checking CA certificates package                                             ✔ 
Checking HTTP client                                                         ✔ 
Checking GPG package                                                         ✔ 

▣▣◻◻ Phase 2 of 4: Setup
[ERROR] Your system hostname nnnnn is not fully qualified.
Please enter a fully qualified hostname (e.g.: host.example.com): nnnn.our.domain (valid FQDN)
Downloading Virtualmin 7 key                                                 ✔ 
Installing Virtualmin 7 key                                                  ✔ 
Downloading Webmin key                                                       ✔ 
Installing Webmin key                                                        ✔ 
Downloading repository metadata                                              ✔ 
Enabling universe repositories, if not already available                     ✔ 
Disabling cdrom: repositories                                                ✔ 
Cleaning up software repo metadata                                           ✔ 

▣▣▣◻ Phase 3 of 4: Installation
Checking and installing system package updates                               ✔ 
Installing Virtualmin 7 and all related packages                            [ERROR] Failed with error: 100
 ✘ 

[ERROR] Something went wrong. Exiting.
[ERROR] The last few log entries were:
Processing triggers for php8.1-cli (8.1.2-1ubuntu2.14) ...
Processing triggers for php8.1-cgi (8.1.2-1ubuntu2.14) ...
Processing triggers for php8.1-fpm (8.1.2-1ubuntu2.14) ...
NOTICE: Not enabling PHP 8.1 FPM by default.
NOTICE: To enable PHP 8.1 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php8.1-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Errors were encountered while processing:
 dovecot-core
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Installing Virtualmin 7 and all related packages: [2023-09-03 12:11:50 UTC] [ERROR] Failed with error: 100
[2023-09-03 12:11:50 UTC] [ERROR] Something went wrong. Exiting.
[2023-09-03 12:11:50 UTC] [ERROR] The last few log entries were:

Can you assist please as we cannot get past this point. This is the second attempt on a clean install.

In the installer log it is clean until this:

Processing triggers for dovecot-core (1:2.3.16+dfsg1-3ubuntu2.2) ...
Job for dovecot.service failed because the control process exited with error code.
See "systemctl status dovecot.service" and "journalctl -xeu dovecot.service" for details.
invoke-rc.d: initscript dovecot, action "restart" failed.
^[[0;1;31m×^[[0m dovecot.service - Dovecot IMAP/POP3 email server
     Loaded: loaded (^[]8;;file://newcloud.twhg.co.uk/lib/systemd/system/dovecot.service^G/lib/systemd/system/dovecot.service^[]8;;^G; enabled;>
     Active: ^[[0;1;31mfailed^[[0m (Result: exit-code) since Sun 2023-09-03 12:11:48 UTC; 27ms ago
       Docs: ^[]8;;man:dovecot(1)^Gman:dovecot(1)^[]8;;^G
             ^[]8;;https://doc.dovecot.org/^Ghttps://doc.dovecot.org/^[]8;;^G
    Process: 69901 ExecStart=/usr/sbin/dovecot -F ^[[0;1;31m(code=exited, status=89)^[[0m
   Main PID: 69901 (code=exited, status=89)
        CPU: 37ms

Sep 03 12:11:48 newcloud.twhg.co.uk dovecot[69901]: ^[[0;1;31m^[[0;1;39m^[[0;1;31mmaster: Error: service(imap-login): listen(::, 143) failed: A>
Sep 03 12:11:48 newcloud.twhg.co.uk dovecot[69901]: Error: socket() failed: Address family not supported by protocol
Sep 03 12:11:48 newcloud.twhg.co.uk dovecot[69901]: Error: service(imap-login): listen(::, 993) failed: Address family not supported by protocol
Sep 03 12:11:48 newcloud.twhg.co.uk dovecot[69901]: ^[[0;1;31m^[[0;1;39m^[[0;1;31mmaster: Error: socket() failed: Address family not supported >
Sep 03 12:11:48 newcloud.twhg.co.uk dovecot[69901]: ^[[0;1;31m^[[0;1;39m^[[0;1;31mmaster: Error: service(imap-login): listen(::, 993) failed: A>
Sep 03 12:11:48 newcloud.twhg.co.uk dovecot[69901]: Fatal: Failed to start listeners
Sep 03 12:11:48 newcloud.twhg.co.uk dovecot[69901]: ^[[0;1;31m^[[0;1;39m^[[0;1;31mmaster: Fatal: Failed to start listeners^[[0m
Sep 03 12:11:48 newcloud.twhg.co.uk systemd[1]: ^[[0;1;39m^[[0;1;31m^[[0;1;39mdovecot.service: Main process exited, code=exited, status=89/n/a^>
Sep 03 12:11:48 newcloud.twhg.co.uk systemd[1]: ^[[0;1;38;5;185m^[[0;1;39m^[[0;1;38;5;185mdovecot.service: Failed with result 'exit-code'.^[[0m
Sep 03 12:11:48 newcloud.twhg.co.uk systemd[1]: ^[[0;1;31m^[[0;1;39m^[[0;1;31mFailed to start Dovecot IMAP/POP3 email server.^[[0m
dpkg: error processing package dovecot-core (--configure):
 installed dovecot-core package post-installation script subprocess returned error exit status 1
Processing triggers for php8.1-cli (8.1.2-1ubuntu2.14) ...
Processing triggers for php8.1-cgi (8.1.2-1ubuntu2.14) ...
Processing triggers for php8.1-fpm (8.1.2-1ubuntu2.14) ...
NOTICE: Not enabling PHP 8.1 FPM by default.
NOTICE: To enable PHP 8.1 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php8.1-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Errors were encountered while processing:
 dovecot-core
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Installing Virtualmin 7 and all related packages: [2023-09-03 12:11:50 UTC] [ERROR] Failed with error: 100
[2023-09-03 12:11:50 UTC] [ERROR] Something went wrong. Exiting.
[2023-09-03 12:11:50 UTC] [ERROR] The last few log entries were:

So it appears to be something wrong with Dovecot. The listeners are either not configured correctly or the ports open. My spider sense tells me it is something to do with IPV6. We do not ahve IPV6 on our network. It is completely blocked at the perimeter firewall and on all configured machines.

Cheers
Spart

I can get dovecot service to start by editing this line in /etc/dovecot/dovecot.conf
From: listen = *, ::
To: listen = *

But I have no idea whether the installer had other things to do after it failed out. So do we have a working vmin system at this point. I have no idea.

Nothing is running on 10000 so I guess not.

The installer also did not configure the firewall to allow any ports so I am also locked out apart from esxi console! Painful.

Please advise soonest.

Cheers
Spart

Just a suggestion it would be good to have a ipV4 only installer so that these things do not happen.

Cheers
Spart

what else is blocked? from those Dovecot errors it also looks like 993 is also blocked. “clean” I think means completely “clean” that also includes some firewall settings. including ufw

No completely clean means exactly that . It is installed from the DVD as a minimal server with only ssh installed. IPV6 disabled. Cloud-init disabled. Updated from the repos to the latest. ssh port changed to non standard port. That’s it.

All works perfectly. Network stack and dns resolution working fine.
Then download the installer. Which checks for ufw and removes it anyway.
Then run installer which fails bombs out and leaves a totally broken system.

Cheers
Spart

Sorry I’m not understanding this (It all sounds to me like a system that is not “clean” but has been adapted in some way.) When I interpret a “clean” system I understand it to be an untouched OS as provided by a basic cloud provider like DO or Linode (and many others) - OK that usually starts as an image.
Just the words “minimal” and “disabled” imply (to me) that is no longer “basic” and any one of those changes could upset the Virtualmin installation.

I think you may need to patiently wait on someone with more knowledge. They do read all posts but also have to sleep occasionally what with time differences.

BTW: I just reread your OP and see you are installing Virtualmin v7.1 all of mine are up to version 7.7 and I use the link [wget https://software.virtualmin.com/gpl/scripts/install.sh](wget https://software.virtualmin.com/gpl/scripts/install.sh) I have no idea if that makes a difference?

This server is running on our own virtual infrastructure. It is simply a virtual server installed from the ubuntu source DVD as a minimal server. It only has ssh running and IPV6 disabled because we do not use it on our network.

This is not my first server install with virtualmin. We have many. This is however a new server installed using the latest installer script. Which fails as above.

I am running the script the website points at. wget https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh

Cheers
Spart

JOOI,

I ran a diff on the install.sh and virtualmin-install.sh they are identical.

Worth checking.

Hopefully, someone from the team will respond.

Cheers
Spart

I also noticed when reading through the installer script that the virtualmin repos for jammy are set to focal and that the repos for debian 10 and 11 are set to buster.

Is this a mistake in the script?

No one else has report a issue on a clean OS. I notice you sudo the install, your not the root user?

What hardware architecture are you running on? Is it on on i386 or amd64

amd64 Xeon ?

Server is ubuntu 22.04.3

I think the issue is to do with no IPV6!

Cheers
Spart

IPv4 works fine, you got that right? IPv6 by itself won’t work.
Not 100% sure but did install script fail?

The issue I believe is related to IPV6 being disabled on our servers and network. I believe something that the installer is installing and trying to start is failing because of no IPV6!

Probably Dovecot.

Did you read this thread?

Cheers
Spart

Dovecot work fine without ipv6. So not error during install then seeing you didn’t say.
Did you try recheck config.

Again did you read this thread and see the error messages on install!

Dovecot fails. Then the installer fails and leaves a broken system.

Cheers
Spart

Ok, I didn’t see the scroll in the install script. I still don’t see why ip6 would be a issue as long as you have IPv4 working on the clean OS. I’ll leave you to work it out.

Neither do I hence raising a support request!

Cheers
Spart

Try to disable IPv6

First error, why no FQDN

The system has a FQDN, I set it after seeing this note from the installer. Which is why the installer continued!

Cheers
Spart

It is already disabled!