Okay I messed up, reinstalled virtualmin-base, please help!

10 posts / 0 new
Last post
#1 Tue, 10/27/2009 - 18:11
DanielJabbour

Okay I messed up, reinstalled virtualmin-base, please help!

In an effort to replace a package via yum, yum decided to remove virtualmin-base. I reinstalled it, but now it seems like the server is totally messed up. Usermin/virtualmin are rendering very oddly, and some of my sites won't load (I get access denied).

Any ideas what harm reinstalling virtualmin-base like this could cause? What is my base course of action to repair this? Can i remove and reinstall virtualmin without ruining all the sites/users on the box? I'm scared, please help!

I guess it would be good to mention, I'm running the latest CentOS 5.4.

Virtualmin specifically seems to have lost all its CSS styles. I'm getting some errors from cron as well:

Cron <root@hyperspace> /etc/webmin/virtual-server/collectinfo.pl sh: ifconfig: command not found

Cron <root@hyperspace> /etc/webmin/virtual-server/collectinfo.pl sh: -c: line 0: syntax error near unexpected token )' sh: -c: line 0:() </dev/null 2>/dev/null' sh: -c: line 0: syntax error near unexpected token )' sh: -c: line 0:() </dev/null 2>/dev/null' sh: -c: line 0: syntax error near unexpected token )' sh: -c: line 0:() </dev/null 2>/dev/null' Error: useradmin::list_users failed : Undefined subroutine &useradmin::passfiles_type called at /usr/libexec/webmin/useradmin/user-lib.pl line 104.

Error

useradmin::list_users failed : Undefined subroutine &useradmin::passfiles_type called at /usr/libexec/webmin/useradmin/user-lib.pl line 104.

Daniel

Tue, 10/27/2009 - 18:38
ronald
ronald's picture

If you are on a vps (or have hands-on possibility) and have backups of your domains I would say re-install the OS and then Virtualmin.

I don't know why yum decided to remove virtualmin, but then re-installing vm over an existing setup would require more than average skills to repair.

I hope Eric/Joe can help you out with that if a re-install is unlikely.

Tue, 10/27/2009 - 18:40
DanielJabbour

Thanks for the advice. I think that might be the only choice unfortunately... but I have done a LOT of other setup on this system and I'd hate to spend hours to do it all again... I emailed sales@virtualmin.com offering to pay them for support on fixing things.

At any rate, what would you recommend the best backup method be at this point?

Daniel

Tue, 10/27/2009 - 18:52
ronald
ronald's picture

Most importantly the domains you have created. There is a module for it under virtualmin. Do full and incremental backups to spare bandwith and space.

Under webmin you'll find a module to make scheduled backups of the configuration files.

After a re-install one can then import the backups easily.

O and instead of removing packages, just leave them on the box and set them to NOT startup at boot under webmin, system, Bootup and Shutdown

Wed, 10/28/2009 - 02:07
DanielJabbour

Okay, so I think things aren't as bad as I thought. It looks like virtualmin's rendering issues were just because the wrong theme was selected. I repaired the cron error by adding a PATH line to root's crontab manually.

It would appear everything is functioning (I receive email, my sites work, etc).

However, I would like to try and read the script to try and determine what commands would be executed when virtualmin-base is reinstalled by yum. I poked at the RPM itself, but it doesn't appear to have much contained inside it. I found this: http://software.virtualmin.com/lib/virtualmin-base-standalone.pl. It would appear that set of commands is responsible for installing virtualmin (along with mail-setup.pl and perhaps some other files)...

SO my question is: Does anyone know exactly what set of commands would be run/triggered by reinstalling virtualmin-base? What can I trace through?

Thanks in advance!

Daniel

Wed, 10/28/2009 - 08:14
andreychek

Sorry for the delayed response -- I had asked Joe or Jamie if they could chime in, but they haven't been available for a bit :-)

What exactly does virtualmin-base run upon installation? I'm not entirely certain, but it's not too much -- the install.sh is meant to do the majority of the work.

I guess we should work from here though -- what exactly are the symptoms you're seeing at the moment? What isn't working on your server?

-Eric

Wed, 10/28/2009 - 12:12
DanielJabbour

Eric-

The install.sh script states that it really just installs the package. The comments at the top read:

# Simple script to grab the virtualmin-release and virtualmin-base packages.
# The packages do most of the hard work, so this script can be small-ish and
# lazy-ish.

I'm not sure of what is the complete impact of what I've done. E-mail is working, the virtual sites are up, my users can login/ftp... so everything seems to be working (with the exception of some issues with cron errors). I'm just worried things could be misconfigured internally. I also had to fix a number of settings around virtualmin/webmin.

Well in terms of what isn't working: I have had various issues with cron. I seem to have resolved them one at a time, but I'm unsure if I'm taking the "right" approach. Can you comment on any of these?

  1. Freshclam wouldn't update because its home directory was owned by unknown uid 100. It looks like a new clamav user was made. I chown'ed /var/lib/clamav to the new user and that was fixed.

  2. The collectinfo.pl script couldn't find ifconfig. I edited root's crontab and added a PATH variable (via crontab -u root -e and added a PATH to the top).

And a problem I'm working on tracking down now:

tempdelete.pl emailed me saying "Temp file clearing is disabled." I looked at its source and apparently it's reading a variable called "gconfig" but I'm unsure where that's set. Tracing through all the virtualmin code, I realize how much of it there is! Any ideas here?

Thanks!

Daniel

Wed, 10/28/2009 - 12:06
andreychek

Howdy,

Sounds like you have it largely under control, nice work!

As far as the temp file issue goes, you can fix that by going into Webmin -> Webmin Configuration -> Advanced Options, and set "Maximum age of temp files".

-Eric

Wed, 10/28/2009 - 12:15
DanielJabbour

Eric-

Thanks again for getting back to me. Another issue resolved.

What would be really nice is if I had a list of things to double check that the installer might have broken or changed... I just wish I knew where to look. I peaked at the installer script and checked all the configuration things it does (mostly via sed'ing config files). I think most of those should be harmless since sed won't find the original content.... but something like this Maximum age of temp files setting, why would it have been changed?

Thanks again, Daniel

Tue, 11/03/2009 - 00:34
Joe
Joe's picture

I haven't had time to read through this thread thoroughly, but I can clarify very quickly what virtualmin-base does:

It insures a handful of dependencies are installed, and then runs a post install script. A standalone version of that post install script can be found at http://software.virtualmin.com/lib/virtualmin-base-standalone.pl

The SRPM is also available, so you can see exactly what is in the spec. There is nothing secret in any of our software. A perusal of the source will make it all clear.

But, this doesn't really tell you what you need to know about the care and feeding of virtualmin-base.

Uninstalling it is mostly harmless. It won't break anything, it won't undo any configuration, and it won't uninstall any of the software.

However, if you uninstall virtualmin-base, you cannot safely reinstall it on a production system...because it will attempt to reconfigure everything again, which is not what you want to happen, if you have done any configuration.

It's not a huge problem in most cases...but, there probably would be a few configuration issues.

In short, if you don't really know what you're doing, don't poke virtualmin-base. If you do, go for it. Uninstall it and whatever other stuff you want to uninstall. But, I can't think of many good reasons to want to uninstall it. Most of the reasons I've seen come down to "because I want to uninstall postgresql" or something...which is probably silly. If you don't want to use postgresql, then just turn it off. The installation is only a few MB (like $.03 worth of disk space).

Anyway, don't panic. If you uninstalled virtualmin-base, don't worry about it. Just don't reinstall it (or if you do, install it manually with RPM and use the noscript option). And, if you've already reinstalled, still don't panic. Just fix whatever bits of configuration got undone.

Try not to break things further; ask us about specific issues. I don't know exactly what goes wrong when uninstalling/reinstalling, as it depends on what you've changed since installation. So I can't just give a generic "here's how you fix things" answer. I don't know. Uninstalling virtualmin-base is not a normal documented procedure so we don't have a normal documented procedure for fixing it.

--

Check out the forum guidelines!

Topic locked