Created attachment 25927 [details] Catalina log Hi, when Tomcat is under load from an Apache httpd server (through mod_jk and ajp13) and I shutdown it, I get NullPointerException: ^C 23-ago-2010 11.06.47 org.apache.coyote.http11.AbstractHttp11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-9080 23-ago-2010 11.06.47 org.apache.coyote.ajp.AjpProtocol pause INFO: Pausing Coyote AJP/1.3 on ajp-9009 23-ago-2010 11.06.48 org.apache.catalina.core.StandardService stopInternal INFO: Stopping service Catalina 23-ago-2010 11.06.48 org.apache.catalina.connector.CoyoteAdapter service GRAVE: An exception or error occurred in the container during the request processing java.lang.NullPointerException at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:638) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:397) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:450) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:385) ... I think the stopping of the Coyote AJP Connector doesn't work. In fact, if you go with jconsole on MBean Catalina->Connector->8009 and do "Stop" on "operation tab", nothing happens. To reproduce this bug: * Download Tomcat 7.0.2 * Confingure an Apache httpd with a JkMount /examples/* * Use ab to generate request (ex: ab -c 3 -n 1000000 "http://localhost/examples/jsp/jsp2/el/basic-arithmetic.jsp") Thank you, Domenico Briganti
The NPE you are seeing is a side-effect. The root cause is bug 49497. JMX not having any obvious affect is a separate bug. The connector is stopped (the state changes) but nothing is logged and it will continue to work since there is a mis-match in the state transitions between the Connector and the underlying ProtocolHandler. I have a patch for the start/stop issue but I want to take a closer look at the Connector & ProtocolHandler life-cycles to see if I can align them.
This bug has been fixed in 7.0.x and will be included in 7.0.3 onwards. Note: There is scope for further re-factoring to align the protocols and the endpoints with the new life-cycle code in 7.0.x.