File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat can't be stopped Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat can Watch "Tomcat can New topic

Tomcat can't be stopped

Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
I am trying to learn using Tomcat. But I found whenever I try to stop Tomcat using shutdown.bat in Windows2000, I get the following result. Thus prevents me from restarting Tomcat. I have to restart my Windows every time to restart Tomcat. Does anyone know why that happens and how to solve it? Thank you very much.

Using CATALINA_BASE: /usr/jakarta-tomcat-4.1.24
Using CATALINA_HOME: /usr/jakarta-tomcat-4.1.24
Using CATALINA_TMPDIR: /usr/jakarta-tomcat-4.1.24/temp
Using JAVA_HOME: /usr/java/jdk1.3.1_01
Catalina.stop: Connection refused Connection refused
at Method)
at org.apache.catalina.startup.Catalina.stop(
at org.apache.catalina.startup.Catalina.execute(
at org.apache.catalina.startup.Catalina.process(
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Hmm - I get the same thing - thats surprising.
Are you starting Tomcat as a service, that may have something to do with it.
Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
Yes, I also use Tomcat as the HTTP server. The whole thing is a standalone container. Anybody knows how to shutdonw Tomcat in this case? Thanks
Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
I found one solution. It is really related to windows service. Since when I install the Tomcat I included the NT service. And now I am trying to shut down the whole service in "Adminstrative Tools" -> "Services". And this works.
Now the question becomes if I install Tomcat without NT service I always has problem to start Tomcat. How to solve this?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Either install the service and use the Services control panel to stop and start tomcat (the whole point of installing it as a service is to have a "hands off" approach to running and stopping the program).

If you want to be able to start and stop tomcat from batch files, then install the service, but using the Services control panel, set the startup mode to "manual". This will ensure it won't start automatically with windows, and your batch files will work.

Third, never mind the service and use batch files exclusively.

finally, you can use the service, and create your own batch files, a single line for each.
R Kap

Joined: Oct 22, 2002
Posts: 2
You could go to the services and there change the startup type of Tomcat from automatic to Manual.Doing this you can start and stop the server through the start and stop commands.
I agree. Here's the link:
subject: Tomcat can't be stopped
It's not a secret anymore!