I'm not able to stop tomcat. I'm running on Fedora 13, and stopping the service in the usual way:

/etc/init.d/tomcat6 stop

but I get a FAILED message. Catalina.out says:

Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8086; nested exception is:
    java.net.BindException: Address already in use


2 Answers 2


Find process, who listens 8086:

lsof -i :8086

and kill

kill -9 PID

Or stop all Java application:

 killall java

if it does not help

 killall -9 java
  • Thanks for your answer. Actually what I usually do is: ps aux | grep tomcat and then: kill -9 PID, and it works. But I'd like to know why the tomcat stop is not working.
    – Andres
    Commented Feb 3, 2011 at 17:32
  • Opt for pkill over killall, it may save your butt if you ever log on to a Solaris machine.
    – Jodie C
    Commented Jul 3, 2011 at 1:35

The answer to your question is in the exception thrown. Another application is listening on the same port 8086. This could perhaps be the fact that you have 2 instance of tomcat running. Main possibility could have been a container/java app thread ended prematurely and therefore left an instance still hanging. Normally doing ps aux | grep java should tell you what is currently utilising jvm. Then you can kill all and restart tomcat to resolve the issue. But if this is not the case and thus another service is listening on port 8086 - then my advice will be, go to $CATALINA_HOME/conf/server.xml and search and replace 8086 with different port number.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .