ClayB's picture

Can't access my Webmin interface,

I ran an apt-dist upgrade and after a while, everything went according to plan, other than not being able to access webmin anymore. Sites all function properly, adminer and shell still function (at ports 12320 and 12322).

Any ideas what happened and can it be reversed or salvaged?

Jeremy Davis's picture

We have just updated the available webmin packages in our archive. The new Webmin package has been tested and works fine, but it shuts Webmin as part of the upgrade process but doesn't restart it. So you need to do that manually or simply reboot. You'll probably also want to install the new HTML file manager.
service webmin start
apt-get install webmin-filemin

Having said that this is probably a good reminder. Although commands like "apt-get upgrade" or "apt-get dist-upgrade" should be relatively safe, on a production server (or any server that contains data you care about) you should always have a current working backup handy to restore to if need be...

TurnKey appliances have security updates auto installed nightly so there generally isn't a need to do upgrades anyway.

ClayB's picture

How many times will I overlook the simple things before trying them first?!?! Reboot solved the problem, thanks for the info!

Jeremy Davis's picture

Webmin runs as it's own service, but is hidden behind stunnel, so I'd check both of those to see which one has crashed. You can start/stop/restart and check the status of services with the 'service' command. The specific service names in this case are 'webmin' and 'stunnel4'. The service command works like this:
service <SERVICE_NAME> <status|start|stop[|restart]>
So to see if those services are running, check like this:
service webmin status
service stunnel4 status

Look for a line that starts with 'Active:'. If everything is as it should be, it will be 'active (running)'. Services that are not enabled to auto start or have been manually stopped will report 'inactive (dead)'. A service which has crashed will report as 'active (exited)'. E.g. here's the status of Webmin on my TKLDev server (Webmin is disabled by default on TKLDev):

# service webmin status
* webmin.service - LSB: Webmin
   Loaded: loaded (/etc/init.d/webmin)
   Active: inactive (dead)
And on a fileserver I have running locally (Webmin is running):
# service webmin status
* webmin.service - LSB: Webmin
   Loaded: loaded (/etc/init.d/webmin)
   Active: active (running) since Sat 2017-04-29 05:12:41 UTC; 2 days ago
   CGroup: /system.slice/webmin.service
           `-853 /usr/bin/perl /usr/share/webmin/ /etc/webmin/miniserv.conf

Apr 29 05:12:38 fileserver perl[515]: pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=  user=root
Apr 29 05:12:40 fileserver webmin[515]: Webmin starting
Apr 29 05:12:41 fileserver webmin[500]: Starting webmindone.
Apr 29 05:12:41 fileserver systemd[1]: Started LSB: Webmin.

So if either of those are not in a 'active (running)' state then you'll need to start (or restart) them. In this case, restart is a fine option although note that some services need to be 'stop'/'start' cycled and will error if you 'restart', but it's worth a try! :) So restart is like this:

service webmin restart
service stunnel4 restart

It's probably also worth trying to track down the cause of the crashes. As a general rule, services crashing unexpectedly is a sign that something is not right. Linux in general, but Debian (what TurnKey is based on) in particular should be rock solid stable! So it could be warning you of something wrong. E.g. insufficient resources (most likely RAM or disk space), something configured incorrectly (e.g. services fighting for use of a particular port (only one application can use a port at a time), early stages of hardware failure (RAM and/or disk corruption).

Jeremy Davis's picture

I suggest that next time, you run the status command before you restart. That way you should see the log entries of what caused the issue (instead of info about it restarting). BTW the restart looks fine. The line "pam_unix(webmin:auth): authentication failure; logname= uid...root" is expected on start up.

You can access the full log info pretty easy. Try this command to see the history. What we're looking for is when the service actually crashed. The error message related to that will (hopefully) give us a better understanding of what is going wrong. So try this:

journalctl -u webmin

It's interactive so you can browse up and down through the history and exit with the 'q' key. If you see anything that looks relevant please post the line and the few above and below it. Although, often the more the better... So if you want to post the full last day or so (so long as it's failed within that time).

Marmite Sandwich's picture

Struggling to start new post because of spam filter. Lost 30 mins work composing my first attempt. Will keep trying.


Jeremy Davis's picture

So you should miss most of the spam measures now.

Also FWIW, I use a chrome extension called Lazarus: Form Recovery. It hasn't been updated for a while and isn't as reliable as it used to be. But it still saves me tons of lost typing on websites! Maybe there's a newer/better alternative.

Add new comment