[RESOLVED] Virtualmin Installation Error - Configuring Dovecot... (FAILS)

Clean server (Ubuntu 16.04)…

Installation failure with :
Missing file to read at dovecot::/usr/share/webmin/dovecot/dovecot-lib.pl line 265

===

/bin/sh install.sh

Welcome to the Virtualmin GPL installer, version 6.0.3

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 install.sh are:

CentOS/RHEL Linux 6 and 7 on x86_64
Debian 7, 8, and 9, on i386 and amd64
Ubuntu 14.04 LTS and 16.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:

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

The selected package bundle is LAMP and the size of install is
full. It will require up to 650 MB 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 3: Setup
Downloading repository metadata [ :heavy_check_mark: ]
Enabling universe repositories, if not already available [ :heavy_check_mark: ]
Disabling cdrom: repositories [ :heavy_check_mark: ]
Cleaning out old metadata [ :heavy_check_mark: ]
Downloading RPM-GPG-KEY-virtualmin-6 [ :heavy_check_mark: ]
Downloading RPM-GPG-KEY-webmin [ :heavy_check_mark: ]
Installing Virtualmin 6 key [ :heavy_check_mark: ]
Installing Webmin key [ :heavy_check_mark: ]
Updating apt metadata [ :heavy_check_mark: ]
Removing non-standard Webmin package, if installed [ :heavy_check_mark: ]

▣▣□ Phase 2 of 3: Installation
Installing Webmin [ :heavy_check_mark: ]
Installing Usermin [ :heavy_check_mark: ]
Installing fail2ban [ :heavy_check_mark: ]
Removing nginx (if installed) before LAMP installation. [ :heavy_check_mark: ]
Removing unneeded packages that could confict with LAMP stack. [ :heavy_check_mark: ]
Installing postfix [ :heavy_check_mark: ]
Installing virtualmin-lamp-stack [ :heavy_check_mark: ]
Installing Virtualmin and plugins [ :heavy_check_mark: ]
15 Aug 08:30:58 ntpdate[24048]: the NTP socket is in use, exiting
Installing updates to Virtualmin-related packages [ :heavy_check_mark: ]

▣▣▣ Phase 3 of 3: Configuration
[1/23] Configuring AWStats [ :heavy_check_mark: ]
[2/23] Configuring Apache [ :heavy_check_mark: ]
[3/23] Configuring Bind [ :heavy_check_mark: ]
[4/23] Configuring ClamAV [ :heavy_check_mark: ]
[5/23] Configuring Dovecot ▒▒▒▒▒▒▒Error: Missing file to read at dovecot::/usr/share/webmin/dovecot/dovecot-lib.pl line 265
Error

Missing file to read at dovecot::/usr/share/webmin/dovecot/dovecot-lib.pl line 265

▣▣▣ Cleaning up

[SUCCESS] Installation Complete!
[SUCCESS] If there were no errors above, Virtualmin should be ready
[SUCCESS] to configure at https://{hostname}:10000.

Anyone have suggestions, or a fix?

Thanks.

Update: This error can also occur on a fresh Debian 9 installation.

Debian 9:

▣□□ Phase 1 of 3: Setup Downloading repository metadata [ ✔ ] Enabling universe repositories, if not already available [ ✔ ] Disabling cdrom: repositories [ ✔ ] Cleaning out old metadata [ ✔ ] Downloading RPM-GPG-KEY-virtualmin-6 [ ✔ ] Downloading RPM-GPG-KEY-webmin [ ✔ ] Installing Virtualmin 6 key [ ✔ ] Installing Webmin key [ ✔ ] Updating apt metadata [ ✔ ] Removing non-standard Webmin package, if installed [ ✔ ]

▣▣□ Phase 2 of 3: Installation
Installing Webmin [ :heavy_check_mark: ]
Installing Usermin [ :heavy_check_mark: ]
Installing fail2ban [ :heavy_check_mark: ]
Removing nginx (if installed) before LAMP installation. [ :heavy_check_mark: ]
Removing unneeded packages that could confict with LAMP stack. [ :heavy_check_mark: ]
Installing postfix [ :heavy_check_mark: ]
Installing virtualmin-lamp-stack [ :heavy_check_mark: ]
Installing Virtualmin and plugins [ :heavy_check_mark: ]
17 Aug 03:01:58 ntpdate[12023]: adjust time server 206.108.0.133 offset -0.006277 sec
Installing updates to Virtualmin-related packages [ :heavy_check_mark: ]

▣▣▣ Phase 3 of 3: Configuration
[1/23] Configuring AWStats [ :heavy_check_mark: ]
[2/23] Configuring Apache [ :heavy_check_mark: ]
[3/23] Configuring Bind [ :heavy_check_mark: ]
[4/23] Configuring ClamAV [ :heavy_check_mark: ]
[5/23] Configuring Dovecot ▒▒▒▒▒▒▒Error: Missing file to read at dovecot::/usr/share/webmin/dovecot/dovecot-lib.pl line 265
Error

Missing file to read at dovecot::/usr/share/webmin/dovecot/dovecot-lib.pl line 265

▣▣▣ Cleaning up

[SUCCESS] Installation Complete!
[SUCCESS] If there were no errors above, Virtualmin should be ready

Update: Further investigation shows that creating the directory and file “/etc/dovecot/dovecot.conf” allows the installation process to write to that file, but then throws: Error: Systemd service dovecot cannot be created unless a command is given.

Howdy,

Hmm, what happens if you try starting Dovecot manually on the command line?

For example, if you type “service dovecot restart”, do you receive an error of some kind?

And if so, do any further error messages relating to that show up in /var/log/mail.log?

-Eric

Hi Eric,

Thanks for the reply.

service dovecot restart

Failed to restart dovecot.service: Unit dovecot.service not found.

cat /var/log/mail.log

Aug 17 06:47:36 srv397 postfix/postfix-script[7785]: starting the Postfix mail system
Aug 17 06:47:36 srv397 postfix/master[7788]: daemon started – version 3.1.4, configuration /etc/postfix

Hope that helps.
Let me know if there’s anything else you’d like me to check.

That means Dovecot isn’t installed. Or, at least, isn’t completely installed. I can’t reproduce this locally on any of my Debian/Ubuntu systems.

Try starting fresh by running:

# sh install.sh --uninstall

And, then, maybe make sure apt-get isn’t throwing a tantrum:

# apt-get install -f

If that runs without error, then try running the install script again. Assuming there’s enough memory and enough disk space, it should complete, and dovecot should be installed successfully. (There have been some reports of other issues, which I’m working on, but this one is unique and so I think it’s just a problem on your system and a fresh install from zero will fix it.)

Wait…I just noticed you said this happened on both Ubuntu 16.04 and Debian 9. I have no idea how that could happen. This is not a problem I’ve seen on any test installation and nobody else has reported it. How much memory and disk space does your system have?

Hi Joe,
The server is 2GB RAM, 2GB Swap, 40GB SSD (VPS).
Had installs go perfectly ok on hundreds of other installs, but this is the NEW style install.
Recently done 4 other installs perfectly ok.
I’ll run the other commands you mentioned, to see if they have any relevant effect.
Thanks for your replies.

Hi Joe,

I performed those commands.
Then re-downloaded the installer.
Re-ran the installer.
Exact same error happened.
If you want to dabble with the server, you’re welcome to it. It’s not a production server yet (until I’ve got Virtualmin installed). And it could help identify an issue for others. Let me know, and we can figure a way for me to get you the login credentials. Upto you. No push from my end.

Can you just try to install dovecot manually:

# apt-get update # apt-get install dovecot-common dovecot-imapd dovecot-pop3d

And, tell me what happens.

That should be plenty. So, it’s not a memory or disk error, it’s just something going wrong with package installation.

Oh, actually, I see how this could fail, but not on a full installation (which is what it looks like above in the first log). I have a problem in the minimal metapackages where it doesn’t install dovecot by default.

Are you installing in your later examples with the --minimal flag or are all of your attempts without any flags?

I’ll fix the minimal problem today. But, that may not explain your situation if you’re doing default installations.

Hi Joe,

No flags when running the install script.
Just standard.

Let me know when you’ve had a look into it, and I’ll run the (newly downloaded) install script any time you’re ready (if in the next 3hrs)… else it’ll be tomorrow.
Thanks for your efforts.

Ok, that’s useful data. I wonder if maybe the problem is with “dovecot-common”. In your install above it says it changed to “dovecot-core” instead. Maybe the package name has changed, but it won’t auto-resolve that when suggested by a meta-package (more reason for me to be grouchy at apt-get/dpkg!). Though I don’t understand why I’m not seeing it on any of my test machines.

I’m looking into it. If that’s the problem, it’ll be fixed in the virtualmin-lamp-stack metapackage, and not with an install.sh update. But, I’ll need to do some more research. Might be within 3 hours, might not.

Joe,
Don’t worry on the 3hrs (that’s just the end of my at-keyboard time).
If later than that, I’ll give it first attention in the morning (if you’ve published the fix).
Good luck.

OK, so dovecot-core is the correct package name across all of our currently supported distros (I guess dovecot-common was what it was named in the past). On Debian, it should handle pulling it in from dependency resolution, but it might not have worked on Ubuntu (though I don’t understand why all of my dozens of test installs worked fine…maybe some other dependency brought the right things in anyway).

I’ve rolled out new metapackages for everything, which may or may not fix this on your system. Give it a try when you get a chance and let me know.

Joe,
I ran the --uninstall to give a clean start.
Removed the dovecot packages that you previously asked me to install manually.
Then ran in the install script.
The result:

[5/23] Configuring Dovecot [ :heavy_check_mark: ]
[6/23] Configuring Firewall [ :heavy_check_mark: ]
[7/23] Configuring MySQL ▒▒▒▒▒▒▒Error: Systemd service mysqld cannot be created unless a command is given
Error

Systemd service mysqld cannot be created unless a command is given

So, it past the dovecot issue.... But now stuck on mysql (for some reason). I understand Debian 9 uses MariaDB instead of MySQL now. Possibly linked? Anything you'd like me to check?

The last few lines of the Log :

Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled
[2017/08/18 14:16:01] [INFO] - Succeeded
[2017/08/18 14:16:01] [INFO] - Configuring Bind
[2017/08/18 14:16:01] [INFO] - Succeeded
[2017/08/18 14:16:01] [INFO] - Configuring ClamAV
[2017/08/18 14:16:01] [INFO] - Code: -1 Result: []
[2017/08/18 14:16:01] [INFO] - Succeeded
[2017/08/18 14:16:01] [INFO] - Configuring Dovecot
[2017/08/18 14:16:01] [INFO] - Succeeded
[2017/08/18 14:16:01] [INFO] - Configuring Firewall
[2017/08/18 14:16:01] [INFO] - Succeeded
[2017/08/18 14:16:01] [INFO] - Configuring MySQL
[2017-08-18 14:16:01 UTC] [DEBUG] Cleaning up temporary files in /tmp/.virtualmin-22464.
[2017-08-18 14:16:01 UTC] [SUCCESS] Installation Complete!
[2017-08-18 14:16:01 UTC] [SUCCESS] If there were no errors above, Virtualmin should be ready

Debian 9 has both mariadb and mysql. We currently install mysql (though I don’t have strong opinions about which one people should use).

The MySQL configuration step will configure which ever one is installed, so no, that’s not the problem.

The problem is that things are not being installed on your system, for some reason; again, mysql is not installed.

Do you have a custom apt/dpkg configuration that only installs Depends: and doesn’t install Recommends: packages? That’s the only thing I can think of that would lead to most of the dependencies not being installed automatically. i.e. do you have APT::Install-Recommends "0"; anywhere in your apt-get configuration?

Hi guys, I came across this thread and I’m adding a followup to it.

I’ve recently started installing also on a fresh Debian 9.1 install, with the same output as @amo-sysadmin. If I install dovecot manually, it gets past the dovecot error, and hangs again on MySQL.

For the record, I’ve installed it also on a Debian 9 minimal, and it worked OK. I’ve tested on 3 different setups, 2 with debian 9 and 1 with 9.1. Only 9.1 failed, with the same errors as reported in this thread.