It took way too long to find a solution. Others in this list have described this
problem, so hopefully this might solve it for them too.
The problem: Tomcat starts and runs fine. It listens on 8080 as usual, and does
its stuff. But when you try shutting down, you get the following error:
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:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:434)
at java.net.Socket.connect(Socket.java:384)
at java.net.Socket.<init>(Socket.java:291)
at java.net.Socket.<init>(Socket.java:119)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:581)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
----------------------------------------
It's identical to the error you get when you try shutting down when it's not
running. But in my case (and some others in this list) it _was_ running.
Well, in my case the problem was iptables. My firewall settings were very
restrictive, and port 8005 was being blocked, which tomcat uses for shutdown. I
opened port 8005 on the firewall and all worked fine.
Hope this saves someone from all the trouble that I went through... It took me
hours, several jdk and tomcat re-installations and a visit to IRC #tomcat to
find that one out.
Regards
Daniel Farinha
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]