RE: Tomcat doesn't shutdown: java.net.ConnectException: Connection refused

2003-07-21 Thread Shapira, Yoav

Howdy,
Annoying problem, good solution, good post.  Thanks!

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Daniel Farinha [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:50 PM
To: [EMAIL PROTECTED]
Subject: Tomcat doesn't shutdown: java.net.ConnectException: Connection
refused

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.ja
va:3
9)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImp
l.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]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat doesn't shutdown: java.net.ConnectException: Connection refused

2003-07-18 Thread Daniel Farinha
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]