Hi,
I am trying to provision a new server with VirtualMin on Ubuntu 18.04.
I've done this a number of times in the past without issue but now it's giving me problems.
Ubuntu 18.04.4 LTS
Virtualmin GPL installer, version 6.1.1
Completes Phase 1 and 2 no problem, then in Phase 3 ir fails :
[INFO] Started installation log in /root/virtualmin-install.log
▣□□ Phase 1 of 3: Setup
Downloading RPM-GPG-KEY-virtualmin-6 [ ✔ ]
Downloading RPM-GPG-KEY-webmin [ ✔ ]
Installing Virtualmin 6 key [ ✔ ]
Installing Webmin key [ ✔ ]
Updating apt metadata [ ✔ ]
Downloading repository metadata [ ✔ ]
Enabling universe repositories, if not already available [ ✔ ]
Disabling cdrom: repositories [ ✔ ]
Cleaning out old metadata [ ✔ ]
▣▣□ 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 [ ✔ ]
22 May 11:49:14 ntpdate[72508]: adjust time server 91.189.89.198 offset -0.004374 sec
Installing updates to Virtualmin-related packages [ ✔ ]
▣▣▣ Phase 3 of 3: Configuration
Can't locate Virtualmin/Config.pm in @INC (you may need to install the Virtualmin::Config module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/virtualmin-config-system line 9.
BEGIN failed--compilation aborted at /usr/bin/virtualmin-config-system line 9.
▣▣▣ Cleaning up
Inspecting the /usr/bin/virtualmin-config-system PERL Script, it seems to have a problem using Virtualmin::Config;
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010_001;
use Getopt::Long;
BEGIN { $Pod::Usage::Formatter = 'Pod::Text::Color'; }
use Pod::Usage qw(pod2usage);
use Term::ANSIColor qw(:constants);
use Virtualmin::Config;
Install Log file (last 10 lines)
Installing Virtualmin and plugins: Success. Spin pid is: 72510 Reading package lists... Building dependency tree... Reading state information... postfix is already the newest version (3.3.0-1ubuntu0.2). virtualmin-lamp-stack is already the newest version (6.0.9+ubuntu-18.04). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Installing updates to Virtualmin-related packages: Success. [2020-05-22 11:49:16 UTC] [DEBUG] Phase 3 of 3: Configuration [2020-05-22 11:49:16 UTC] [DEBUG] Cleaning up temporary files in /tmp/.virtualmin-38190. [2020-05-22 11:49:16 UTC] [WARNING] The following errors occurred during installation: <code> I'm not sure what has changed here, I doubt the Ubuntu "out of box" PERL has changed, has something gone ary in your install scripts?? <strong>Please help urgently!</strong> This is time sensitive (I know not your problem but am desperate!)
Status:
Fixed (pending)
Comments
FYI,
I had an older installer handy
Welcome to the Virtualmin GPL installer, version 6.0.18
This one also fails :
▣▣▣ Phase 3 of 3: Configuration
Can't locate Virtualmin/Config.pm in @INC (you may need to install the Virtualmin::Config module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/virtualmin-config-system line 9.
BEGIN failed--compilation aborted at /usr/bin/virtualmin-config-system line 9.
▣▣▣ Cleaning up
[WARNING] The following errors occurred during installation:
◉ Postinstall configuration returned an error.
[WARNING] The last few lines of the log file were:
Setting up liblog-dispatch-perl (2.67-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Installing Virtualmin and plugins: Success.
Spin pid is: 114133
Reading package lists...
Building dependency tree...
Reading state information...
postfix is already the newest version (3.3.0-1ubuntu0.2).
virtualmin-lamp-stack is already the newest version (6.0.9+ubuntu-18.04).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing updates to Virtualmin-related packages: Success.
[2020-05-22 12:05:18 UTC] [DEBUG] Phase 3 of 3: Configuration
[2020-05-22 12:05:18 UTC] [DEBUG] Cleaning up temporary files in /tmp/.virtualmin-79040.
[2020-05-22 12:05:18 UTC] [WARNING] The following errors occurred during installation:
[2020-05-22 12:05:18 UTC] [WARNING] The last few lines of the log file were:
What gives??? This installer was also run on a fresh Ubuntu 18.04 box!! :/
Submitted by ataalla on Fri, 05/22/2020 - 07:32 Comment #2
I have the same problem!
Well, well, well,
I've fixed the issue, seems its related to CVE-2016-1238, where PERL are changing the @INC variable, as a result the Directory Virtualmin::Config.pm resides in (/usr/share/perl5/vendor_perl) is not available in @INC. This seems to be a VERY recent change as I last installed Vmin with 6.0.19 installer a few months ago.
What's most impressive is I don't (didn't) even know PERL when I woke up this morning! lol, good job I'm a Lead Dev!!
To detail my fix :
To fix it I Modified the file
/usr/bin/virtualmin-config-system
with 1 line to push the directory VIrtualmin::Config.pm resides in, into the @INC.The top 10 lines of the file including my patch on line 9 :
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010_001;
use Getopt::Long;
BEGIN { $Pod::Usage::Formatter = 'Pod::Text::Color'; }
use Pod::Usage qw(pod2usage);
use Term::ANSIColor qw(:constants);
BEGIN { push @INC, '/usr/share/perl5/vendor_perl'; }
use Virtualmin::Config;
Now Rerunning installer (latest) yeids :
▣▣▣ 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 [ ✔ ]
[6/23] Configuring Firewalld [ ✔ ]
[7/23] Configuring MySQL [ ✔ ]
[8/23] Configuring NTP [ ✔ ]
[9/23] Configuring Net [ ✔ ]
[10/23] Configuring ProFTPd [ ✔ ]
[11/23] Configuring Procmail [ ✔ ]
[12/23] Configuring Quotas [ ✔ ]
[13/23] Configuring SASL [ ✔ ]
[14/23] Configuring Shells [ ✔ ]
[15/23] Configuring SpamAssassin [ ✔ ]
[16/23] Configuring Status [ ✔ ]
[17/23] Configuring Upgrade [ ✔ ]
[18/23] Configuring Usermin [ ✔ ]
[19/23] Configuring Webalizer [ ✔ ]
[20/23] Configuring Webmin ██████▒Stopping Webmin server in /usr/share/webmin ▒▒▒▒███Starting Webmin server in /usr/share/webmin [ ✔ ]
[21/23] Configuring Fail2banFirewalld [ ✔ ]
[22/23] Configuring Postfix [ ✔ ]
[23/23] Configuring Virtualmin [ ✔ ]
▣▣▣ Cleaning up
[SUCCESS] Installation Complete!
[SUCCESS] If there were no errors above, Virtualmin should be ready
[SUCCESS] to configure at https://XXXXX.XXXXX.XXX:10000 (or https://###.###.###.###:10000).
[SUCCESS] You'll receive a security warning in your browser on your first visit.
As expected!
(I realize there's a number of ways to inject the dir into the @INC, but this seemed the least destructive, I'd suggest reviewing the patch and using a method to include into @INC that satisfies the CVE above!)
Hope this helps someone!
Danny Walker (Cygnus)
Hi,
Confirmed. I will let Joe know.
Thanks @Ilia, Glad I could help! :)
@ataalla, did you give my fix a go?
Submitted by ataalla on Fri, 05/22/2020 - 09:33 Comment #6
@Blatant thanks, How did you start installer.sh from phase of 3?
regards
I just re-ran
sh install.sh
and 'y' twice (continue, and overwrite) :thumbsup:It replays Phase 1 and 2 quite quickly....
Edit While it overwrites the components on second install, it does not seem to overwrite (or re-download)
/usr/bin/virtualmin-config-system
so the patch remains.You can always run phase 3 with:
virtualmin config-system --bundle LAMP
(Or other bundles
MiniLAMP
,LEMP
,MiniLEMP
, depending on whether it is minimal and/or nginx install.)The problem is not with the install script, it is, I guess, with the new
virtualmin-config
package that I just rolled out last night. I haven't figured out a fix yet, but working on it. I can't make the change suggested, as it is nonsensical on non-Ubuntu/Debian systems. I need a generic way to re-add vendor_perl or make sure it gets installed somewhere that is in @INC.I have removed the new virtualmin-config package from the Debian/Ubuntu repos while I figure this out.
Can someone try the following:
/bin/sh install.sh --uninstall
andapt-get clean
and then re-run the installer? (Please don't ever run--uninstall
on a production system or one that has stuff you don't want to lose, as it is very destructive. It's only useful if you've got a fresh system with a failed install and need to run install again from sort of fresh again.)I tried it - it's working just fine now for Debian.
Submitted by hlvtrinh on Sat, 05/23/2020 - 10:43 Comment #11
Hi folks,
I've tried to make a Travis-CI validation build to verify that the installer can be run successfully on all grade A OSes (as document) with the hope that we could avoid the accident of failed build is deployed in the future. Take a look if you are interesting in: https://travis-ci.org/github/trinhpham/virtualmin-install/builds/690388157
My thoughts is very simple at the beginning: Virtualmin is an application which contains other applications and can be able to run on application layer of the OS, means I can validate the installation easily by using Docker. I was wrong! I found several issues which I need your help to make the test be possible: - 'ps' related script show error: process ID out of range - Installation on CentOS 7 seems to be failed with error, but the script still returns with code 0 (which makes it green) - The log doesn't have much information to debug when error happen
Should I keep moving on this?
hlvtrinh, please open a ticket over on github (on https://github.com/virtualmin/virtualmin-install ) if you want to discuss installing Virtualmin in a container. I doubt it will be trivial at all. Virtualmin itself is "an application" as you say, but the installer is installing and configuring dozens of applications, needs root access for all of it, and makes changes to system-level stuff that is normally not managed from within a container (like networking settings). I haven't even attempted to do a Docker installation of Virtualmin because so much will have to change. It is not a quick project. Good idea, but only if you have many hours...probably more like weeks...to devote to the project. I certainly don't have time to tackle something like that anytime soon.
Failing without error code being set should be fixable, though. I'll look into it.
I made a change to the packaging process to make the package put files back where they used to be (my build system has been completely rebuilt since 6.0.24 was packaged, so I can't even look to see why it was different, but I figured out a workaround, so future builds will work better). Will be fixed in the next package build.
Submitted by hlvtrinh on Sat, 05/23/2020 - 19:16 Comment #13
PR is made at: https://github.com/virtualmin/virtualmin-install/pull/35
I agree that it would not be quick to complete the PR, I can contribute a few hours per week if I have enough guidance and support.
Looking forward to the good news :)
Submitted by sparticle on Mon, 05/25/2020 - 12:07 Pro Licensee Comment #14
I did not hit this issue just now when installing from the script on a new clean 18.04 server.
Just FYI.
Cheers Spart
Hey,
Sorry for late reply, we had a bank holiday and getting back into work in these "strange" times :)
I can confirm the current installer (6.1.1) works perfectly on Ubuntu 18.04.4 LTS.
@Joe (Hi!) I totally get my "fix" was way to hacky to be submitted lol, however I hope it was at least instrumental to make your life a bit easier with the debug! Am I seeing your new package in 6.1.1 or is it still pending release? I assume the latter and if so looks good, great work and thanks for the quick turnover!
I'm off now to eagerly await Ubuntu 20.04 support!
I couldn't find any issues with Virtualmin-Config and latest commits. It doesn't fail on me. It was some other issue.
Ubuntu 20.04 support is on the way. We're working on it.
Submitted by mossbot on Tue, 07/14/2020 - 05:27 Comment #17
I just ran into this issue with a fresh copy of 18.04 LTS using version 6.2.0 of the install script. I used Blatant's fix above and it completed successfully.
First try:
Welcome to the Virtualmin GPL installer, version 6.2.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 install.sh are:
CentOS/RHEL Linux 6, 7, and 8 on x86_64
Debian 8, 9, and 10 on i386 and amd64
Ubuntu 16.04 LTS, 18.04 LTS, and 20.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 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 RPM-GPG-KEY-virtualmin-6 [ ✔ ]
Downloading RPM-GPG-KEY-webmin [ ✔ ]
Installing Virtualmin 6 key [ ✔ ]
Installing Webmin key [ ✔ ]
Updating apt metadata [ ✔ ]
Downloading repository metadata [ ✔ ]
Enabling universe repositories, if not already available [ ✔ ]
Disabling cdrom: repositories [ ✔ ]
Cleaning out old metadata [ ✔ ]
▣▣□ 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 [ ✔ ]
14 Jul 09:48:31 ntpdate[8685]: adjust time server 91.189.91.157 offset 0.001568 sec
Installing updates to Virtualmin-related packages [ ✔ ]
▣▣▣ Phase 3 of 3: Configuration
Can't locate Virtualmin/Config.pm in @INC (you may need to install the Virtualmin::Config module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/bin/virtualmin-config-system line 9.
BEGIN failed--compilation aborted at /usr/bin/virtualmin-config-system line 9.
▣▣▣ Cleaning up
[WARNING] The following errors occurred during installation:
◉ Postinstall configuration returned an error.
After applying the fix:
Welcome to the Virtualmin GPL installer, version 6.2.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 install.sh are:
CentOS/RHEL Linux 6, 7, and 8 on x86_64
Debian 8, 9, and 10 on i386 and amd64
Ubuntu 16.04 LTS, 18.04 LTS, and 20.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 650 MB of disk space.
Exit and re-run this script with --help flag to see available options.
Continue? (y/n) y
WARNING
Virtualmin may already be installed. This can happen if an installation failed,
and can be ignored in that case.
But, if Virtualmin has already successfully installed you should not run this
script again! It will cause breakage to your existing configuration.
Updates and upgrades can be performed from within Virtualmin. To change
license details, use the 'virtualmin change-license' command.
Changing the license never requires re-installation.
Really Continue? (y/n) y
[INFO] Started installation log in /root/virtualmin-install.log
▣□□ Phase 1 of 3: Setup
Downloading RPM-GPG-KEY-virtualmin-6 [ ✔ ]
Downloading RPM-GPG-KEY-webmin [ ✔ ]
Installing Virtualmin 6 key [ ✔ ]
Installing Webmin key [ ✔ ]
Updating apt metadata [ ✔ ]
Downloading repository metadata [ ✔ ]
Enabling universe repositories, if not already available [ ✔ ]
Disabling cdrom: repositories [ ✔ ]
Cleaning out old metadata [ ✔ ]
▣▣□ 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 [ ✔ ]
14 Jul 10:21:11 ntpdate[14129]: adjust time server 91.189.91.157 offset 0.003912 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 [ ✔ ]
[6/23] Configuring Firewalld [ ✔ ]
[7/23] Configuring MySQL [ ✔ ]
[8/23] Configuring NTP [ ✔ ]
[9/23] Configuring Net [ ✔ ]
[10/23] Configuring ProFTPd [ ✔ ]
[11/23] Configuring Procmail [ ✔ ]
[12/23] Configuring Quotas [ ✔ ]
[13/23] Configuring SASL [ ✔ ]
[14/23] Configuring Shells [ ✔ ]
[15/23] Configuring SpamAssassin [ ✔ ]
[16/23] Configuring Status [ ✔ ]
[17/23] Configuring Upgrade [ ✔ ]
[18/23] Configuring Usermin [ ✔ ]
[19/23] Configuring Webalizer [ ✔ ]
[20/23] Configuring Webmin [ ✔ ]
[21/23] Configuring Fail2banFirewalld [ ✔ ]
[22/23] Configuring Postfix [ ✔ ]
[23/23] Configuring Virtualmin [ ✔ ]
▣▣▣ Cleaning up
[SUCCESS] Installation Complete!
[SUCCESS] If there were no errors above, Virtualmin should be ready
Glad it got you outta jail mossbot!
It's by no means a fix but it works around the issue. Looks like while the actual fix was resolved in 6.1.1 it didn't get merged correctly and has fallen out of 6.2! That or those pesky dependencies have changed again in Perl....
I'm sure Ilia will sort it out :)
:--)
I wish I could reproduce it. I tried both Ubuntu 18.04 and Ubuntu 20.04 - all worked just fine.
What is your Ubuntu 18.04? What hosting company do you use? Is this Ubuntu image provided by your hosting company?
Submitted by mossbot on Tue, 07/14/2020 - 09:53 Comment #20
What is your Ubuntu 18.04?
It was installed as a VM (2 cores, 4GB ram, 500GB hdd) on my dedicated server, running Proxmox, using "ubuntu-18.04.4-live-server-amd64.iso". I also tried "ubuntu-20.04-live-server-amd64.iso" with the same results.
What hosting company do you use?
OVH.
Is this Ubuntu image provided by your hosting company?
No. Directly downloaded both images from Ubuntu's website.
That's impossible. I don't see how that could be happening.
What is the output of:
perl -e "print qq(@INC)"
Submitted by mossbot on Tue, 07/14/2020 - 10:31 Comment #22
With OVH you can install their versions of Ubuntu, but it's only available at the initial install of a dedicated server. Since my base OS is a hypervisor, that option isn't available. Even if it was, I would choose to install the official version, not their modified ones.
The output:
/etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base
I don't know if this matters, but the above output is from the VM I installed Ubuntu Server 20 on and applied Blatant's modification. (Virtualmin is installed and running)
If you would like, I could create a VM for you to test on.
Submitted by mossbot on Tue, 07/14/2020 - 10:54 Comment #23
I should also mention that on the same dedicated server a few weeks ago, I successfully installed Virtualmin without needing to modify anything using the same Ubuntu 18 image. The install script was version 6.1.1.
Can you convince us that the problem is not in your image itself? I just tried 3 local images and one image on Vultr - all installations worked fine.
Submitted by Cristian Muñoz ... on Tue, 07/14/2020 - 15:53 Comment #25
Gracias estuve toda la noche buscando la solución del bug del archivo: /usr/bin/virtualmin-config-system y agregue la linea 9 con:
root@xxx # nano /usr/bin/virtualmin-config-system
BEGIN { push @INC, '/usr/share/perl5/vendor_perl'; } Y después:root@ # virtualmin config-system --bundle LAMP
Y ahora tengo funcionando Virtualmin en mi servidor VPS. Gracias por todo, desde Puerto Montt, ChileSubmitted by mossbot on Wed, 07/15/2020 - 12:24 Comment #26
Can you convince us that the problem is not in your image itself?
Sure. I uploaded the image here:
[removed]
Submitted by thecaptainz on Wed, 07/15/2020 - 00:15 Comment #27
Got the same error using Google Cloud instance with Ubuntu 18.04 LTS minimal. Confirmed, Blatant's modification fix it.
Finally, I could reproduce this issue as well.
We will need to figure out why it's being installed on Debian system to
/usr/share/perl5/vendor_perl/Virtualmin
, a path for RHEL, rather than to expected/usr/share/perl5/Virtualmin
. I think it's a built time error. We'll discuss it with Joe.Hang on, please.
Submitted by Flow Wobo on Wed, 07/15/2020 - 14:06 Pro Licensee Comment #29
Blatant's fix works perfect on Debian Buster! Thx
Okay, the issue is resolved.
You can do your installs now, without patching anything.
Thank you all for the heads up!
Once again our thanks Ilia for the quick turnaround and fix! :thumbsup:
Was it a build issue?
Thank Joe, he was building it.
Yes, the install path was used for RHEL systems, not Debian, by accident.
Aha! Well you called it my man! But thanks to Joe and the team for the quick re-release still :)