Thanks for that! Makes perfect sense. I'm using Liferay, so it's probably in
their pile of code that the problem arises. I'll ask them for some advice!

On 7/26/06, Shankar Unni <[EMAIL PROTECTED]> wrote:

Mark van Wyk wrote:

> tcp4       0      0  localhost.8005
*.*                    LISTEN
> tcp46      0      0  *.8009
*.*                    LISTEN
> tcp46      0      0  *.http-alt
*.*                    LISTEN
>
> Somehow, that feels right, although I don't really know what it means.

Yes, that's correct. It means tomcat is listening on only the localhost
(127.0.0.1) interface on port 8005 (for the shutdown command), and on
all network interfaces on port 8009 (for mod_jk) and whatever your
http-alt port is defined as in /etc/services (probably 8080).

Nothing unusual here.

> 14:08:28,983 INFO  [org.apache.coyote.http11.Http11BaseProtocol] Pausing
> Coyote HTTP/1.1 on http-8080
> 14:09:43,603 ERROR [org.apache.catalina.connector.Connector] Protocol
> handler pause failed
> java.net.ConnectException: Operation timed out

And

> 14:09:47,861 INFO  [org.apache.coyote.http11.Http11BaseProtocol]
Stopping
> Coyote HTTP/1.1 on http-8080
> Failed to shut down: java.lang.NullPointerException
> java.lang.NullPointerException
>        at org.activemq.broker.BrokerContext.deregisterContainer(
> BrokerContext.java:70)

Looks like you have a Servlet with a destroy() method that tries to make
a call to an MQ server, and that is first timing out, and then the class
gets a NullPointerException.

When a webapp is being undeployed, all the destroy() methods in Servlets
are called *synchronously* by Tomcat.

Doing any heavy-weight work in Servlet destroy()s (e.g. DB calls, MQ or
other remote calls, etc.) is a common source of "shutdown hangs".

If you must do something like this:

* Start the work in a thread, and
* do a Thread.join() *with a timeout*, so that the shutdown is not hung
forever if something goes wrong in your cleanup operation.
(perhaps log an error if the thread join timed out..)


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Mark van Wyk
Portal Co-ordinator
www.GondwanaAlive.org

"Promoting Biodiversity and Stemming the Sixth Extinction"

Cell: 082 831 9227 (ZA +27 )

Reply via email to