(sending to both lists since I'm not sure where to report bugs these
days)
I'm running Tomcat standalone, testing a simple servlet on a (live)
medium-load site. It's tied to an applet that polls once every N
seconds; as a result, I'm getting upwards of 8 requests per second,
but it seems to be about 2-3 hits per second on average.
It runs fine for hours, then dies silently in the middle of the
night. The VM is still running, but doesn't accept any connections.
As far as I can tell, the problem is a NullPointerException in
InvokerServlet. I'll try to track it down more carefully by turning
off the JIT.
tomcat.log reports several exceptions (see below). Unfortunately, the
logger doesn't timestamp the exceptions (I'd like to log this as a
separate bug, and would if the bug db were working), so I can't figure
out the correlation between the exceptions and the crash. I'm afraid
they might not actually correlate, since my servlet keeps outputting
to servlet.log for several hours after the last modified date of
tomcat.log.
My system: Red Hat Linux 6.2, Blackdown JVM 1.2.2_RC4, Pentium 200, 96M RAM
tomcat.log excerpts:
Starting endpoint port="8080" handler="org.apache.tomcat.service.http.HttpConnection
Handler"
Starting endpoint port="8007" handler="org.apache.tomcat.service.connector.Ajp12Conn
ectionHandler"
Error reading request connection reset
Context log: path="/shoppers" Error in invoker service() : null
java.lang.NullPointerException
at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java, Co
mpiled Code)
then about 3 or 4 repetitions of the same exception from different
sources -- some of which are wrapped in <pre>...</pre> and/or preceded
by "<b>Internal Servlet Error:</b>" which leads me to report yet
another bug, since that text should be going to the client, not the logs.
then a *different* NullPointerException, this time in my code, which I
suspect (but can't prove) is a result of the first one:
Context log: path="/shoppers" Error in ShopperServlet service() : null
java.lang.NullPointerException
at ShopperServlet.doGet(ShopperServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled
Code)
and an "Internal Servlet Error" repetition
then the same thing (error in ShopperServlet service()) 3 more times
again
then a whole bunch of
Error reading request Connection reset by peer: Connection reset by peer
mixed with
Context log: path="/shoppers" Broken pipe /shoppers/ShopperApplet.class
Context log: path="/shoppers" Broken pipe /shoppers/servlet/ShopperServlet
presumably after the connector broke down, it's now refusing all
requests, for a little while, before just falling silent once and for
all.
I'm going to run my server without a JIT to see if I can track down
the line number where the null pointer is happening inside
InvokerServlet.
Cheers -
- Alex
Bug summary:
1. NullPointerException in InvokerServlet
2. tomcat.log doesn't timestamp output
3. error output intended for client is sent to log file
|