This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Connection refused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark " Connection refused" Watch " Connection refused" New topic
Author Connection refused

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518

I am running tomcat in trixbox (cent os package).when I start tomcat,it starts fine and working .But when i stop tomcat,
the following error displayed and i am unable to stop the tomcat.

Mar 22, 2009 7:11:38 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop: Connection refused
at Method)
at org.apache.catalina.startup.Catalina.stopServer(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.Bootstrap.stopServer(
at org.apache.catalina.startup.Bootstrap.main(

Any help to solve this problem would be appreciated.

Kees Jan Koster
JavaMonitor Support

Joined: Mar 31, 2009
Posts: 251
Dear preethi,

This is most likely a configuration issue caused by the repackaging done for the RPM package. I really dislike yum/rpm/apt packages for Tomcat. The mostly cause more problems than they solve and to top it off they stick you with old versions of Tomcat.

Best install a real Tomcat from and these problems tend to go away.

If you want to debug and solve this problem yourself, check out the configured stop port (default 8005) in Tomcat's server.xml. Look for a line like: <Server port="8005" shutdown="SHUTDOWN">. To check if Tomcat is listening on that port, use netstat as discussed here:

Kees Jan

Java-monitor, JVM monitoring made easy <- right here on Java Ranch
subject: Connection refused
Similar Threads
Tomcat Shutdown problem
Shutdown generates error in tomcat.
Networked Programs that work across countries
Another shutting down problem
connection refused on tomcat web server