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.
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
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?