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

25 posts / 0 new
Last post
#1 Tue, 08/15/2017 - 03:43
amo-sysadmin

[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 [ ✔ ] 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 [ ✔ ] Installing Usermin [ ✔ ] Installing fail2ban [ ✔ ] Removing nginx (if installed) before LAMP installation. [ ✔ ] Removing unneeded packages that could confict with LAMP stack. [ ✔ ] Installing postfix [ ✔ ] Installing virtualmin-lamp-stack [ ✔ ] Installing Virtualmin and plugins [ ✔ ] 15 Aug 08:30:58 ntpdate[24048]: the NTP socket is in use, exiting Installing updates to Virtualmin-related packages [ ✔ ]

▣▣▣ Phase 3 of 3: Configuration [1/23] Configuring AWStats [ ✔ ] [2/23] Configuring Apache [ ✔ ] [3/23] Configuring Bind [ ✔ ] [4/23] Configuring ClamAV [ ✔ ] [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.

Tue, 08/15/2017 - 19:47
amo-sysadmin

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

Wed, 08/16/2017 - 22:06
amo-sysadmin

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                                                       [  ✔  ]
Installing Usermin                                                      [  ✔  ]
Installing fail2ban                                                     [  ✔  ]
Removing nginx (if installed) before LAMP installation.                 [  ✔  ]
Removing unneeded packages that could confict with LAMP stack.          [  ✔  ]
Installing postfix                                                      [  ✔  ]
Installing virtualmin-lamp-stack                                        [  ✔  ]
Installing Virtualmin and plugins                                       [  ✔  ]
17 Aug 03:01:58 ntpdate[12023]: adjust time server 206.108.0.133 offset -0.006277 sec
Installing updates to Virtualmin-related packages                       [  ✔  ]

▣▣▣ Phase 3 of 3: Configuration
[1/23] Configuring AWStats                                              [  ✔  ]
[2/23] Configuring Apache                                               [  ✔  ]
[3/23] Configuring Bind                                                 [  ✔  ]
[4/23] Configuring ClamAV                                               [  ✔  ]
[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
Wed, 08/16/2017 - 23:20
amo-sysadmin

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.

Thu, 08/17/2017 - 00:25
andreychek

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

Thu, 08/17/2017 - 01:51 (Reply to #5)
amo-sysadmin

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.

Fri, 08/18/2017 - 05:30
Joe
Joe's picture

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.)

--

Check out the forum guidelines!

Fri, 08/18/2017 - 08:07 (Reply to #7)
amo-sysadmin

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.

Fri, 08/18/2017 - 08:21 (Reply to #8)
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Fri, 08/18/2017 - 05:32
Joe
Joe's picture

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?

--

Check out the forum guidelines!

Fri, 08/18/2017 - 07:57 (Reply to #11)
amo-sysadmin

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.

Fri, 08/18/2017 - 08:21 (Reply to #12)
Joe
Joe's picture

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

--

Check out the forum guidelines!

Fri, 08/18/2017 - 08:25
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Fri, 08/18/2017 - 08:29 (Reply to #14)
amo-sysadmin

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.

Fri, 08/18/2017 - 08:53
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Fri, 08/18/2017 - 08:55 (Reply to #16)
amo-sysadmin

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.

Fri, 08/18/2017 - 09:09
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Fri, 08/18/2017 - 09:19 (Reply to #18)
amo-sysadmin

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                                              [  ✔  ]
[6/23] Configuring Firewall                                             [  ✔  ]
[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
Fri, 08/18/2017 - 15:06 (Reply to #19)
Joe
Joe's picture

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?

--

Check out the forum guidelines!

Sat, 08/19/2017 - 19:55 (Reply to #20)
amo-sysadmin

Hi Joe,

Apologies for the delayed reply (busy with other servers yesterday).

To answer your latest question, yes :-

/etc/apt/apt.conf.d# cat * | grep Install-Recommends
APT::Install-Recommends "false";

Do you really want that to be set to "true"?

I believe that the provide I am using for this server, is not using a Minimal install of Debian 9.1 as the disk space used after Reinstall (clean install) is 813MB.

This could help identify this issue with the remaining MySQL/MariabDB installation blockage.

# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        40G  813M   37G   3% /
Sat, 08/19/2017 - 20:24 (Reply to #21)
amo-sysadmin

Hi Joe,

Well, I ran the test anyway (got the server, got the time)... and it worked, it seems... with this set to true:

# cat /etc/apt/apt.conf.d/00InstallRecommends
APT::Install-Recommends "true";

Final install was 2.3GB disk used.

I will mark this thread as resolved now, as you provided 2 fixes to bypass the problems described in this post. Thank you for your efforts.

Sat, 08/19/2017 - 19:10
Matheus

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.

Sat, 08/19/2017 - 19:51 (Reply to #23)
amo-sysadmin

Hi @Matheus,

Thanks for your feedback. The distro where I get the same error as yourself :

# lsb_release -id
Distributor ID: Debian
Description: Debian GNU/Linux 9.1 (stretch)

Seems to be a standard install, not a Minimal. Of course, I'd prefer Minimal, but that's not being offered by this server's provider.

Sat, 08/19/2017 - 20:27 (Reply to #24)
amo-sysadmin

Matheus,

I just closed this post as RESOLVED with a reference to the following that will help with the MySQL issue (which will help you too). Set the following (it worked for me).

# nano /etc/apt/apt.conf.d/00InstallRecommends
APT::Install-Recommends "true";

Post-installation of Virtualmin, you need to decide for yourself if that setting stays in place or not. Regards.

Sat, 08/26/2017 - 17:32
Joe
Joe's picture

just to cap off this thread, in case anyone stumbles on it later, I've forced Install-Recommend to true for Virtualmin installs...so, it'll do the right thing, while also allowing people to choose to remove some components after installation without dependency problems.

For a bit of historical context: When I used metapackages in the past, we had problems where users wanted to be able to remove some packages, like postgresql or the mail stack, but that would cause removal of the metapackage itself...and then the next auto-remove would destroy their system, because the package that had depended on everything was now gone. Obviously, that was sub-optimal (uncommon, since it required the user to ignore a couple of instances where they should have looked at the package list being removed and thought, "Hmmm...I might need Apache and PHP and Postfix all all these Virtualmin packages for my Virtualmin hosting system.", but even having it happen a couple of times was too much). So, I stopped using metapackages for dependencies on Debian/Ubuntu, but now we're using them again. So, now I try to push most of the packages off into Recommends and Suggests (and on yum systems, "default" and "optional serve the same role and mostly match up against the Debian/Ubuntu package lists).

So, no need to set that option for the system; we set it on the command line during installation.

--

Check out the forum guidelines!