0

I host a few things on my Ubuntu server. I use Apache (80), Tomcat (8080), and PlexMediaServer (32400).

Lately I've tried to install Deluge which opened Pandora's box for me. It hung when it got to the point "configuring apache2(versionxx)". I had to kill the install. This led to me noticing that no service call to apache2 or tomcat will work.

sudo service tomcat7 (start/stop/restart) - hangs

sudo service apache2 (start/stop/restart) - hangs

Getting status works, it will tell me those services are running. I can access my pages hosted by those respective services just fine, but I can't configure the service in any way. When I issue start/stop/restart, the system hangs on the next line until I issue CTRL + C. Sometimes that doesn't respond and I have to use CTRL + Z.

example:

x@X:~$ sudo service apache2 stop

<- cursor hangs here on the next line

I've tried about every iteration of apt-get you can imagine, including purge, remove, install.

I've tried killall on the respective processes and another fruitless series of attempts to run apt-get, even dpkg reconfigure. They always hang on configuring Apache2(version), sometimes removing Apache2(version).

I've tried strace with the PID of Apache2 (not child Apache listeners) to no avail, but really I don't know what I'm looking at.

Nothing I do will make these services respond. What's more, I can only reboot my computer by issuing "sudo reboot --force". Shutdown now with or without -h doesn't work, nor does sudo reboot by itself. The computer will remain responsive and accept commands after running anything that's supposed to shut it down EXCEPT sudo reboot --force.

This guy was having the same issue as me, but he said a reboot allowed him to remove and reinstall apache. That didn't work for me.

What can I do next?

  • Try sudo pkill apache2. – Jand Oct 19 '15 at 17:01
  • No luck. After running sudo pkill apache2 and then running sudo apt-get purge apache2, it hung on: apache2_invoke prerm: Disable module php5 – Franklin Skipdiddle Oct 19 '15 at 17:44
0

After much Googling, I forced a reinstall of dpkg and ran a series of cleans, autoremoves, and the like. I also ran an apt-get update && upgrade -y which had new linux headers and a new plexmediaserver (which I had to force install).

All of a sudden I can stop/start/restart both apache2 and tomcat7, and am able to reboot by simply running sudo reboot.

I'm not 100% sure what I did if I'm honest, but I think it was largely the dpkg reinstall and the successive operations ran with the reinstalled version mentioned above.

EDIT: I will try to remember to accept my own answer. Mods, feel free to do so before 21 hours in case I forget. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.