Hi - I've just upgraded Webmin to 1.560, and I find the startup action that's been successfully starting Webmin at boot time has gone away. What's more, I can't get it back.
When I visit "Bootup and Shutdown" I select Webmin and press the "Start on Boot" button, which takes me to a message saying "Enabling service webmin at boot time". However when I go back to the Bootup and Shutdown list, Webmin is still not enabled at startup (marked "No" in the column marked "Start at Boot?").
The same thing happens if I visit "Webmin Configuration" - select the radio button that says "Yes" next to "Start at Boot Time", click the button, and the page reloads, but it still displays "No" as being checked.
I've confirmed that in fact Webmin is NOT starting at boot, so the displayed settings are technically correct.
Any idea how I can fix this?
I'll hack the startup script into rc.local if I have to, but that seems wrong...
Howdy,
Well, the startup previously worked, and isn't anymore, that may mean you've run into a bug.
My suggestion would be to file a bug report using the Support link above, and to explain there what issues you're running into.
Jamie can then work with you to figure out how to resolve that.
-Eric
I can confirm this issue.
After upgrading to Webmin 1.560, the softlink in
/etc/rc2.d
to Webmin and Usermin disappeared. Like Sam described, the Bootup and Shutdown module consequently lists Webmin as "Start at boot: No". Trying to change that yields the following debug log:Webmin is trying to run
initctl
to change its bootup mode? This results in:It should be using
update-rc.d
to create the softlinks.Update:
Manually adding Webmin to the startup softlinks via
update-rc.d webmin default
worked. Link was created, and Webmin lists "At boot: yes".Removing the link through Webmin worked too.
Re-adding it through Webmin fails, like before.
Debug log for removing the softlinks through Webmin:
Note the
unlink
commands for /etc//rc*.d (superfluous /? works anyway).There are no associated
link
commands when trying to re-add the softlinks through Webmin.I created an issue tracker entry.
Thanks, Locutus.
Sam Moore smoore@resonetrics.com https://resonetrics.com https://www.linkedin.com/in/sammooreatresonetrics https://drupal.org/user/57956
@Sam: As concluded in the issue tracker entry, after quite some back-and-forth between Jamie and me :), it turned out to be an Upstart/insserv related problem.
Try if the following fixes the problem for you. Locate the file
/lib/init/upstart-job
and insert the following part before the line near the end that contains the text*)
When you then run the
insserv
command, you should not get any errors about "lsb-header not valid for upstart jobs" or about "loops in services".Then the Bootup and Shutdown page on Webmin should work again. For me, it does. :)
Perfect - thanks :-)
And PS - much kudos to locutus for excellent troubleshooting and advice.
Sam Moore smoore@resonetrics.com https://resonetrics.com https://www.linkedin.com/in/sammooreatresonetrics https://drupal.org/user/57956
While I have successfully used this fix on two Virtualbox installations, one of the Vbox (after applying the fix) reports the following at every boot:-
/dev/sda1 was not cleanly unmounted, check forced.
Your disk drives are being checked for errors, this may take some time
Press C to cancel all checks currently in progress
/dev/sda1: 206/124496 files (1.9% non-contiguous, 31943/248832 blocks
mountall: fsck /boot [260] terminted with status 1
etc.
etc.
The only difference between the Vbox installations is, the one making that report had the harddrive configured with LVM during partition configuration (not encrypted).
Everything appears to be running fine on both, apart from that forced check at every boot on that one Vbox.
Anyone else come across this? Anyone know how I can 'fix' this?
Thanks for any advice.
Hmm, I don't really think that this unmount issue is related to the fix in upstart-job. I can't see how the two should have anything to do with each other.
Can you double-check this by "unfixing" the fix, and see if you still get the unmount-fsck thing then?
Removing the fix didn't resolve the problem.
I made a clean Virtualbox install with a video of the procedure I followed:-
http://youtu.be/ve8KGM4imFA?hd=1
After much experimentation, it appears that the unmount issue only occurs after applying the fix to '/lib/init/upstart-job' then running '/etc/init.d/webmin start' during a clean installation of Ubuntu 10.04 and Virtualmin.
Reversing the fix and disabling Webmin from running at boot does not resolve the issue.
Any further thoughts on this?
I've run into this too, yesterday after a kernel update I restarted the server just to realize I could no longer connect to webmin/virtualmin after the server was online again. After a brief and minor spasm I restarted it from shell.
Should maybe release a notice since this probably effects all Ubuntu 10.04 servers.
Cheers to Locutus for all of his research!
I think the reason for this hassle is a bug in Ubuntu. The insserv command does not work properly, at least at some point, due to the erroneous "upstart-job" script, and Webmin is trying to make use of it to set its startup.
But putting out a warning, combined with a hint how to fix it, would sure be a nice thing. :)
Howdy.
What would be a good way to notify people of this problem? Would stickying this particular thread help? Perhaps a note in the News forum that includes the fix?
-Eric
Have an Ubuntu 10.04 here, and troubleshooting the same problem so I'd say it's Ubuntu 10.04-wide. Hope a sudo apt-get update then sudo apt-get upgrade will fix things at some point in the future...manual fixing gets tedious.
Here's the summary for others coming along on how to fix the problem. I learned some more about ubuntu going thru this, hopefully the below will also help others like me :)
Verify problem
1) login via ssh and check webmin status
"sudo service webmin status" - This will report webmin not running
"sudo service webmin start" - manually starts webmin for this session
2) Open webmin and goto System | Bootup and Shutdown. Try and enable webmin to start at boot. You will see it won't update start at boot status.
Fix problem - per Locutus thanks!
1) In ssh
"sudo vim /lib/init/upstart-job"
2) and insert the following part before the line near the end that contains the text *)
lsb-header)
$ECHO "### BEGIN INIT INFO"
$ECHO "# Provides: $JOB"
$ECHO "# Required-Start:"
$ECHO "# Required-Stop:"
$ECHO "# Should-Start:"
$ECHO "# Should-Stop:"
$ECHO "# Default-Start:"
$ECHO "# Default-Stop:"
$ECHO "# Short-Description: $JOB, converted to upstart."
$ECHO "### END INIT INFO"
;;
3) run "sudo insserv"
4) Go back to your webmin | Bootup and Shutdown. Enable webmin to start at boot. Setting updates. Yay!
5) Be happy and at peace with the world :)
Trying to implement this fix on another server, and apparently it doesn't work now.
Back to the head-banging board.
I have the same issue with Webmin 1.560 Upstart... I recently have to throw this command # /etc/init.d/webmin start to access Webmin remotely.
Thanks to Locutus for this insert the following part before the line near the end that contains the text *)
lsb-header) $ECHO "### BEGIN INIT INFO" $ECHO "# Provides: $JOB" $ECHO "# Required-Start:" $ECHO "# Required-Stop:" $ECHO "# Should-Start:" $ECHO "# Should-Stop:" $ECHO "# Default-Start:" $ECHO "# Default-Stop:" $ECHO "# Short-Description: $JOB, converted to upstart." $ECHO "### END INIT INFO" ;;
Works great for me. Thanks again!
Howdy,
A quick and simple way to fix this particular issue would be to run this command:
update-rc.d webmin defaults
Thanks Eric - excellent - works for me.
What I did was:-
Edit the Virtualmin install.sh script to include "update-rc.d webmin defaults" (without the quotes and just before Exit 0 at the end of the script).
Run ./install.sh
Run sudo reboot.
Voila - everything OK.
Note: this fix makes it unnecessary to edit /lib/init/upstart job as previously mentioned in this thread.
Note: This fix also resolves the LVM/unmount issue previously mentioned by myself in this thread.
Just discovered this command needs to be run also:-
update-rc.d usermin defaults
Great, I'm glad that worked!
This will all be automatically handled in the next Webmin release.
-Eric
Great, it worked. Let's hope that Webmin will also add support for
systemd
. (Since upstart probably won't be there forever :-)