Failed update - lost virtualmin

19 posts / 0 new
Last post
#1 Sun, 02/06/2011 - 10:24
sojyujai

Failed update - lost virtualmin

Hi, I've been running a Debian Lenny server with virtualmin gpl for quite a while now fairly smoothly but today I've hit a problem after running an update from the virtualmin web interface.

When I logged in earlier I noticed there were quite a few updates to apply (>30 or so), including some virtualmin packages. I clicked to update, but during the process there was a failure and now it seems I've lost virtualmin. I can no longer access virtualmin at port 10000, I'm getting messages from cron like:

/bin/sh: /etc/webmin/virtual-server/collectinfo.pl: No such file or directory

and

/bin/sh: /etc/webmin/status/monitor.pl: No such file or directory

and when I ssh into the server and run

virtualmin help

I get the following error messages:

/usr/sbin/virtualmin: line 6: cd: /usr/share/webmin/virtual-server: No such file or directory

and

Command list-commands.pl was not found

So it seems to me like virtualmin was somehow lost during the update process.

Is there a good way to restore virtualmin?

PS. FWIW, the rest of the server (web, email, ssh) seems to be working fine, except possibly SMTP but that may be an unrelated problem.

Sun, 02/06/2011 - 11:37
tjasko

Ironically, the same thing happened to me this morning, but the update didn't fail. And the even worse part was, that I setup automatic updates so I don't have control over it.

I checked in my logs (/var/apt), and saw the following: http://pastebin.com/t65bbT53

It started deleting Webmin/Virtualmin and along with some other packages. The question is, why did apt-get decide to do this?

I so wonder what exactly made Debian (I'm running Lenny also) want to do this... I'm thinking I'll switch to CentOS because apparently Debian's packages manager is a bit abusive.

And sadly, this is on a production server. :S

Sun, 02/06/2011 - 11:51
oak

This happened to me too. I'm running Debian Lenny and twelve updates appeared. I updated and the update wiped out webmin/virtualmin. My websites still functioned though. I ended up doing a full restore of the entire server.

I hope an admin sees this thread, as I think there is a problem.

The updates are shown is being for the new Debian, "squeeze", release. Perhaps that is part of the problem.

Sun, 02/06/2011 - 12:02 (Reply to #3)
tjasko

I'm thinking it has to deal with Squeeze. If you take a look at my Pastebin link, you'll notice that it was referencing some Squeeze packages.

I would restore the server like you did, but I'm not completely sure on how to restore some things like my e-mail (used Postfix/Dovecot).

If I could reinstall Webmin/Virtualmin that would be nice, but I don't want to spend the rest of the day restoring my server...

Right now I'm kind of lost. Obviously there's some issue with the repositories, but I'm not sure where to look.

Here is my sources file: http://pastebin.com/dh2dAP2F

Sun, 02/06/2011 - 12:07 (Reply to #4)
tjasko

Wait a second... I see this in my sources file:

# Security updates for stable
deb http://security.debian.org/ stable/updates main contrib

Do you think it could of installed the Squeeze security updates and remove Webmin/Virtualmin with it? Right now, I'm really thinking that did it...

Sun, 02/06/2011 - 12:44 (Reply to #5)
oak

Yes, I think this is what happened to me too. I watched, with great angst, as apt showed it was removing webmin.

I was fortunate in that I was able to restore completely from an eight hour old disk image.

I will not be able to update, for fear this will happen again, until this issue is resolved. Please post back if you find anything out. I will do likewise.

Sun, 02/06/2011 - 12:52 (Reply to #6)
tjasko

That must of been quite a struggle watching it remove Webmin. I remember running "apt-get autoremove" and watching it remove Webmin/Virtualmin as well. I'm thinking it's just how Debian handles its packages.

Wow, you're lucky! I'm on an unmanaged VPS and there's no way I could of taken a disk image to restore. Central backup isn't enabled under SolusVM so I will have to set up my entire sever again if I cannot reinstall Virtualmin.

I'll post back if I figure out anything else. Right now, I'm wondering if I reinstall Webmin/Virtualmin, would it keep all of my existing settings. I think it would because Webmin/Virtualmin is simply a wrapper for the software it controls.

Hopefully someone with good knowledge on Debian & Webmin/Virtualmin will get back to this thread soon.

Sun, 02/06/2011 - 13:56
Locutus

I know this does not necessarily help you guys and is not generally applicable, but I personally have besides my production Virtualmin server a second experimental one (virtual machines under VMWare ESXi actually) on which I test all potentially critical things like updates first before applying them to the production VM.

You could maybe do this on your home machine with VMWare Server (free-of-charge virtualization software for Windows and Linux hosts).

Sun, 02/06/2011 - 14:42
tjasko

The main question by sojyujai was how to restore Virtualmin. Would it be safe to reinstall Webmin/Virtualmin, Locutus?

I'm currently taking backups of the server just in case. If you cannot reinstall Webmin/Virtualmin, I'll probably throw CentOS up on my VPS and restore everything manually. The only thing I'm a bit weary about is restoring Postfix, but I should just be able to take all of the "Maildir" folders in the "homes" folder and restore it to the CentOS box. But I'd rather stick to using Debian...

Thanks for the help!

Sun, 02/06/2011 - 18:56
tjasko

I wasn't able to reinstall Webmin/Virtualmin for some reason. I ended up just installing CentOS and I'm restoring my server now...

Mon, 02/07/2011 - 04:25
Locutus

If this was merely a packaging error, resulting in Webmin packages being incorrectly removed, it should mostly be a matter of just reinstalling these packages. That might be tricky if you don't know which packages exactly were falsely removed.

In that case, it might help to (after doing that backup, for sure) call the Virtualmin installer script with the uninstall directive (don't know its precise wording right now), having it hopefully cleanly remove the rest of Virtualmin/Webmin, and then running the script again to install it.

Your configuration should stay intact during that, or can be restored from an earlier Virtualmin backup which hopefully exists. :) Web domains should definitely stay intact.

Although this whole thing is certainly something I'd first try out on an experimental VM. :) Since that is too late for you, it might indeed be advisable to do a clean new install and restore your domains.

Mon, 02/07/2011 - 11:47
tjasko

I actually just threw Debian back up on my VPS and reinstalled everything. It's pretty much all setup but just need to set up a few more things. It had quite a bit of stuff on it that didn't need to be there, so I'm somewhat glad I wiped and restored it all.

I've been using Debian-based OSes for years and I can never use anything else. I never liked CentOS all too much...

I'm still thinking what caused apt to remove Webmin. I'll be sure to remember to call the uninstall directive if this happens again. I'm really questioning what removed Webmin though. Why would apt even need to remove Webmin?

Thanks for the help, Locutus!

Mon, 02/07/2011 - 13:35
Locutus

I'm really questioning what removed Webmin though. Why would apt even need to remove Webmin?

Even if it's hard to reproduce afterwards... A simple packaging conflict or incorrect package data can cause this to happen.

That is why I never have my Linux systems automatically install updates and I always review what apt is going to do before I apply the changes. :) Doing that can spare you a number of unpleasant surprises.

Mon, 02/07/2011 - 14:33 (Reply to #13)
tjasko

True... true. Packages was a wonderful thing, I wish every OS had them, but the system can be a bit messed up sometimes.

May I ask how you can preview apt changes every time you run apt? I know sometimes when I run commands like "apt-get dist-upgrade", it doesn't always ask to continue...

Thanks for the help! I really appreciate it!

Mon, 02/07/2011 - 16:00 (Reply to #14)
Locutus

I use the interactive tool aptitude which shows you a preview of changes it's going to apply, with all their consequences and possible conflicts, and a chance to prevent or modify them.

Mon, 02/07/2011 - 17:06 (Reply to #15)
tjasko

Thanks, Locutus! I've heard about aptitude but I never really tried it. Just installed it and gotta say, much more interactive than apt!

Tue, 02/08/2011 - 01:19
mrvdot

There appears to be an error in the new version of 'apt-show-versions' or one of it's dependencies, which is causing the update to fail, and since webmin/virtualmin depend on it, thereby removing them as well. Still looking to see if there's a corrected package, will update.

Tue, 02/08/2011 - 06:05 (Reply to #17)
sojyujai

Yes, I just tried

apt-get install webmin

and got the following error:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: webmin: Depends: apt-show-versions but it is not going to be installed E: Broken packages

I'll try to track down the problem as well but any more information about what caused it, how to fix it and most importantly the best way to reinstall virtualmin (while saving all my configuration data) would be very appreciated.

Tue, 02/08/2011 - 01:22
mrvdot

Sorry, server error while posting, caused a duplicate

Topic locked