• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat can't be stopped

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic