I’m running Tomcat 6 for a client and the server has had a history of really slow shutdowns. The server admin people couldn’t find a reason but finally, I tracked down the problem
The Ubuntu syslog in /var/log/syslog was showing the following entry:
org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.net.ConnectException: Connection timed out
The cause of this was apparent when I ran the command line
hostname
The result was “www“, not very helpful
I updated the /etc/hostname file and then ran
/etc/init.d/hostname.sh start
The stop time dropped from around 3 minutes to 30 seconds.