Rainer, et al,

Obvious (now that you point it out! (:-\).

Moving my settings to JAVA_OPTS corrected the behavior.

THANKS TO ALL!

John
Cornell University
(607) 255-9356
john.a.par...@cornell.edu

-----Original Message-----
From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
Sent: Thursday, July 22, 2010 11:27 AM
To: Tomcat Users List
Subject: Re: Connection Refused On Tomcat Server Shutdowns if...

On 22.07.2010 17:02, John A Parker wrote:
> Using apache-tomcat-6.0.28...
>
> We are encountering issue with "catalina.sh stop"s IF we use a variable to 
> set the SHUTDOWN port.
>
> e.g.:
> CATALINA_OPTS = "...-Dco.shutdown.port=8104 ..."
> server.xml =    "...
>                   <!-
>                   <Server port="8104" shutdown="SHUTDOWN">
>                   -->
>                   <Server port="${co.shutdown.port}" shutdown="SHUTDOWN">
>                   ..."
>
>
> After startup we see...
>
> ...
> java     24389 tcowner   42u  IPv6 8406404       TCP 
> localhost.localdomain:8104 (LISTEN)
>
>
> But on shutdown we get...
>
> SEVERE: Catalina.stop:
> java.net.ConnectException: Connection refused
>          at java.net.PlainSocketImpl.socketConnect(Native Method)
>          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>          at 
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>          at java.net.Socket.connect(Socket.java:529)
>          at java.net.Socket.connect(Socket.java:478)
>          at java.net.Socket.<init>(Socket.java:375)
>          at java.net.Socket.<init>(Socket.java:189)
>          at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:408)
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>          at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>          at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:597)
>          at 
> org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:338)
>          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:416)
> Tomcat did not stop in time. PID file was not removed.
>
>
> IF however I swap the server.xml SHUTDOWN port lines shown above then the 
> catalina.sh stop works as it should.
>
>
> Any ideas on why the dynamic port definition works on startup but not on 
> shutdown?

CATALINA_OPTS is only used during startup. If you want to add parameters 
for startup and shutdown, use JAVA_OPTS. See also the comments at the 
beginning of catalina.(sh|bat).

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to