I am running the Tomcat that gets delivered with your Eclipse download (no, I don't want to download and install the entire Tomcat), and sometimes it hangs when stopping or restarting, and the only way I can find to make it work is restarting all my Eclipse. I am using it under Windows.
Is there any way to kill the Tomcat process (which doesn't appear in the Task Manager)?
More specifically, looking at the Eclipse plugin code at https://github.com/eclipse/webtools.servertools/blob/master/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatServerBehaviour.java around line 540 (look for the comment "//ping server for startup") I see that ...
It appears as javaw.exe
in task manager. An alternative is to execute Tomcat/bin/shutdown.bat
.
As to the hang problem, are you sure that your webapp isn't spawning unmanaged threads which might be blocking Tomcat's shutdown?
On Windows, if you know the port Tomcat listens to (below, it is 8080), you can find the PID of the Tomcat process and then kill it from cmd:
> netstat -aon | find "8080" TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 2196 TCP [::]:8080 [::]:0 LISTENING 2196 > taskkill /pid 2196 /f SUCCESS: The process with PID 2196 has been terminated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With