How do I stop all running instances of Tomcat?

Chris Green

["Address already in use" error running Tomcat on Apache

I'm running Tomcat 3.2.2 through an Apache 1.3.19 server on a Linux box. I shut down Tomcat; when trying to restart, I get the error msg "Address already in use". I read the thread on this topic telling me to fully stop other instances of the servlet engine or another service before restarting Tomcat.

The problem is that I'm a Linux newbie, so don't know how to make sure that other instances or servers are fully stopped. Doing a lot of flailing about here. Help!]

Try doing a "ps -ef | grep java" (I think -ef can work under linux as well). This should give you the tomcat process. Do a "kill -9 #PID" to kill the tomcat process. You have to be root or PID owner to do this.

I have experienced this myself while using different unix shells to stop and start. Try sticking with the same shell next time.

Jeff Williams adds:

Try lsof command to list open sockets and their associated executables. On windows you can use the fport tool.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.