On one of our servers, we're using Tomcat 4.1.29 under Java 1.4.2_02, connecting to Apache 2.0.48 with mod_jk 1.2.4, all running on Red Hat Linux 6.2. (Wow, what a zoo of version numbers!)
Recently we got a support call because some (all?) HTTP requests were failing with "Internal Server Error". The support tech who took the call noticed this in mod_jk's log file: [Sat Aug 28 15:59:39 2004] [jk_ajp_common.c (1309)]: sending request to tomcat failed in send loop. err=2 [Sat Aug 28 15:59:39 2004] [jk_ajp_common.c (1318)]: Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. Failed errno = 104 (Errno 104, for the curious, is ECONNRESET -- "Connection reset by peer".) He tried restarting Tomcat, which sounds like the right thing to me. That didn't help, so then he tried restarting Apache. Still nothing, so he rebooted the server, after which things started working again. Hmmmm. Looking in catalina.out after the reboot, I saw this stack trace: java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END at java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:933) at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529) at sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:358) at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:414) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:160) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222) at java.io.PrintWriter.close(PrintWriter.java:137) at org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:483) at org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:253) at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:191) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:479) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576) at java.lang.Thread.run(Thread.java:534) Of course, catalina.out is clobbered with every Tomcat restart, so there's no way of knowing if this exception is actually the cause of the problem, i.e. if it was happening before the first Tomcat restart. Nevertheless, I poked around a bit and stumbled across these two entries in Tomcat's bug database: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7725 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6519 Both of these have a *nearly* identical stack trace (the connector is different -- org.apache.catalina.connector.http.HttpProcessor vs org.apache.ajp.tomcat4.Ajp13Processor in my example) that ends with the same IllegalStateException. Both are about 2 years old, around the time that Tomcat 4.0 and Java 1.4 were in beta. And it sorta-kinda-vaguely sounded like the bug(s), whatever they were, have been fixed. First of all, from those two bug reports, it's not clear if this is a Tomcat bug or a Java bug. Second of all, has anyone else seen this on stable, mature versions of Tomcat 4.0 and Java 1.4 (ie. 4.0.29 and 1.4.2_02)? Thanks -- Greg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
