Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
I'm using Linux ubuntu with Apache 2.0.55 and mod_jk 1.2.14. (I tried it on redhat 4 also with apache 2.0.52 and mod_jk 1.2.19 it is the same).
With the latest version of jetty (6.1.2rc5) I managed to solve most of my problems with Ajp13 (SSL and other).
With basic configuration the HTTP and HTTPS queries are answered but some strange error appears in the mod_jk.log file.
The mod_jk.log is full of:
[Thu Apr 26 23:17:38 2007] [info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1)
[Thu Apr 26 23:17:38 2007] [info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection
[Thu Apr 26 23:17:38 2007] [info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead
[Thu Apr 26 23:17:38 2007] [info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1
[Thu Apr 26 23:17:39 2007] [info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1)
[Thu Apr 26 23:17:39 2007] [info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection
Suspecting connections not keep alive I changed my worker.properties with:
worker.list=jetty
worker.jetty.port=8011
worker.jetty.host=localhost
worker.jetty.type=ajp13
worker.jetty.lbfactor=1
worker.jetty.socket_keepalive=1
worker.jetty.socket_timeout=60
worker.jetty.recycle_timeout=60
worker.jetty.connect_timeout=60000
worker.jetty.prepost_timeout=60000
Now I get on jetty:
2007-04-26 23:43:18.934::WARN: handle failed
java.lang.IllegalStateException: State==HEADER
at org.mortbay.jetty.ajp.Ajp13Generator.flush(Ajp13Generator.java:431)
at org.mortbay.jetty.ajp.Ajp13Generator.sendCPong(Ajp13Generator.java:765)
at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:294)
at org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:142)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java :378)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
2007-04-26 23:43:18.937::INFO: AJP13: CPING is sent by peer ![]()
and on mod_jk.log:
[Thu Apr 26 23:37:31 2007] [info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14
[Thu Apr 26 23:37:31 2007] [info] ajp_handle_cping_cpong::jk_ajp_common.c (833): awaited reply cpong, not received
[Thu Apr 26 23:37:31 2007] [info] ajp_send_request::jk_ajp_common.c (1248): Error connecting to the Tomcat process.
[Thu Apr 26 23:37:31 2007] [info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=3
[Thu Apr 26 23:37:31 2007] [error] ajp_service::jk_ajp_common.c (1758): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=jetty failed
[Thu Apr 26 23:37:31 2007] [info] jk_handler::mod_jk.c (1971): Service error=0 for worker=jetty
when flushing a data the state of generator is checked if its equals to header, and throws and illegal state exception STATE==HEADER, at this point of time, when apache sents a CPING request, we need to flush CPONG data as an immediate response to the request, so I decided to ignore this state checking during flushing if its a CPING request