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)
Hmm - I get the same thing - thats surprising. Are you starting Tomcat as a service, that may have something to do with it. Bill
Joined: Mar 05, 2003
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
Joined: Mar 05, 2003
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
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.