You are here
Hi,
I did Distribution Upgrade via Webmin after about a year of Turnkey LAMP appliance working fine. Just wanted to keep up with latest security patches.
That upgrade got hung after a while without any error. Eventually I rebooted and noticed that Webmin doesn't work any more (just getting Connection Reset). So I SSH'd into the server and did apt-get dist-upgrade from the command line. It also failed:
Total 1751 (delta 210), reused 1751 (delta 210)
E: Sub-process /usr/bin/dpkg returned an error code (1)
Internet says "just reboot", I tried 3 reboots by now but still getting error above. Also Webmin still doesn't work, don't know which log to check for root cause on that but when I go to Webmin port I simply get "connection reset". Interestingly most other things seem to work fine on the server, including apache, mysql, etc.
Any ideas?
A few things...
Having said that, running upgrade and/or dist-upgrade should not cause any major issues. Also you didn't specify whether you just ran dist-upgrade, or whether you also adjusted the repos to upgrade the Debian version. If you were trying to upgrade to a new Debian version (e.g. Stretch) before we have (which we haven't yet - it's currently in progress), then problems are to be expected. We don't yet have any packages in our stretch archive, so if you tried to dist-upgrade to that, it's probably uninstalled Webmin (we package that ourselves and haven't yet built it for Stretch). If you want to use Stretch, then let me know as I have a personal repo with TurnKey Stretch packages which you can use for now if you wish. Let me know.
Anyway, it sounds like something didn't complete during the upgrade process. To be able to even have a stab at guessing what the issue is, I'd need to see more of the output. Before it gets to the bit you've posted, it should note the package that it's having issues with. Assuming it's a package that hasn't properly installed, you may not even need to know what it is. The following my just fix it:
That should try to reinstall any packages that are broken and hopefully fix your issue in the meantime.
Hopefully that's enough to give you some ideas. If you want some more suggestions, please give me some more info about what version of TurnKey you are running and exactly what you did, plus some more of the problematic output.
Output
I ran the command you suggested and it failed fairly quickly. Also worth noting that I didn't change any repo prior to attempting dist-upgrade. My Turnkey version is probably a year or so old - how can I confirm what it is?
It kept going with errors, eventually listing errored packages which all start with webmin-
Sorry for slow response...
But this is still quite weird. Unless that file has been deleted by you (or someone with access to your server) it doesn't make any sense to me.
My next thought, was perhaps it's somehow related to a bug that we have discovered during our development of v15.0 (the upcoming next release). I was pretty sure that it was related to a change in Debian (i.e. a change between Jessie/v14.x and Stretch/v15.x). Looking closer at that issue, I'm almost certain that they are unrelated. That issue is an error in install-module.pl, rather than the file missing altogether!
The only thing that I can think to suggest at this point, is to try to reinstall the base webmin package (that's where the missing file comes from). TBH, I don't know if it will work, but probably worth a shot:
Unfortunately, I have a funny feeling that that will also fail because of the other broken packages. There are another couple of commands you could try, but I'm not sure on likelihood of success with these either...:
Failing that, the only way forward that I can think of would be to take note of the names of the 23 packages (obviously webmin-apache is one and webmin-custom is another). Then manually uninstall them all, something like this:
If Webmin itself is one of those, you could probably skip that (and just reinstall as per above), although that's your call. Then once all of that is removed, you can try reinstalling. If you removed all the Webmin packages (not just the modules and theme) I suggest that you start by installing the base Webmin package on it's own: Then check that's working. If it's not, you may need to start webmin:Hopefully it should be working ok now (although it may look really ugly as it's likely no theme is installed yet). So the last step would be to reinstall all the modules (and the theme). Essentially that's the same as removing them (above) except, instead of 'remove' put 'install', i.e.:
I hope that works. I'd still really like to understand how it happened though. It's a very weird issue and something that shouldn't happen, nor one that I can reproduce.
FIXED!!!
Thanks so much - this resolved the issue! In fact I just executed these 3 commands you posted:
After that ran without errors I decided to reboot the server and see how it goes - and it came up with the server this time and looks to work just fine!
Thanks again!
Great news!
Thanks for posting back to confirm what worked for you.
Add new comment