Tomcat stuck, no app is running, doesn’t show any log (catalina.out) messages either

This happened when I tried to restart a tomcat server.
While starting, catalina.out shows no messages related to the apps that should be loading.
Apps, as expected, don’t work either.
To get more information about what is going on, kill tomcat in a particular way:
While killing tomcat use:
kill -3 [pid]
This tells JVM to kill the process and dump the thread stack, which will show right in catalina.out.
In my case, this happened because I initialized a Spring bean which makes a request to another service, which was not running.
Service was not running, because it was being deployed on the same Tomcat server.
Deadlock occurred because my app was stuck waiting for the service app, which, probably, was down the line but never had a chance to start.

Leave a comment