VirtualMin auto restart


I have VirtualMin on Ubuntu 12.04
Sometimes my virtualmin stops ( maybe because of server updates or restarts) and I should restart virtualmin manually.
How can I tell system to always restart and/or keep-alive virtualmin?

thank you

You could write a cron job that tests if Webmin is still running (i.e. using “ps” and grep for “miniserv”, or “netstat” and see if something listens on port 10000), and if not, do “service webmin start”.

Though that’s more like trying to alleviate the symptoms. It’d be better to check for the cause: Webmin should not simply stop/crash. Are you on an OpenVZ-based VPS? Those are known to have resource limitation issues, causing random processes to crash. Could be memory issues too. Check the file /proc/user_beancounters if OpenVZ, or the syslog for OOM Killer messages (out of memory process killer).

In case of server reboot, Webmin should start automatically if its service is properly configured. Check Webmin’s “System / Bootup and Shutdown” module, if Webmin is set to “start at boot” there.

You can use the “System and Server Status” module to make sure webmin stays up, it also works with a bunch of other services too.

It is under Webmin -> Others -> System and Server Status

I have this happen on OpenVZ machines all the time, I have the module set to automatically restart the process if it fails.

Post your “/proc/user_beancounters” in code tags. If you don’t have one, then it might be something else. How much memory does your server have? You can use “free -m” to show the amount of free/used memory.