Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat can't be stopped

 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:579)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm - I get the same thing - thats surprising.
Are you starting Tomcat as a service, that may have something to do with it.
Bill
 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Thanks
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic