Hello,

I'm using httpd 2.2.22 with mod_jk 1.2.32 and 2 load balanced tomcat
workers (TC 6.0.35). I have a question about recovery in case when active
worker becomes abruptly inactive.

Here's my test scenario:
1. Web service client sends SOAP request to apache server. This client
sends requests in 2 flavors, either it is a generic SOAP call (A case) or a
soap request with some files attached with MTOM (B case). Web service is
capable of handling both types of requests.
2. Once the processing starts, I kill this tomcat with "kill -9".

The results are:
A - when tomcat1 is killed, the request is automatically transmitted to
tomcat2. Client receives correct results. This is OK.
B - when tomcat1 is killed, the request is not transmitted to tomcat2.
Client receives 502 error: bad gateway instead.

The configuration is unchanged (no recovery options set). The only
difference is the request which is obviously larger in B case (some text
files attached).
These lines I found particularly mysterious:
(tomcat1) sending request to tomcat failed (recoverable)
(tomcat1) sending request to tomcat failed (unrecoverable),  (attempt=1)

Why is one request failure considered to be recoverable and the other is
not ?

Best regards,
Kate

Logs for A:
[Fri Apr 27 12:15:11 2012] [1757184:1] [info] init_jk::mod_jk.c (3252):
mod_jk/1.2.32 () initialized
[Fri Apr 27 12:15:29 2012] [1331310:1] [info]
ajp_connection_tcp_get_message::jk_ajp_common.c (1266): (tomcat1) can't
receive the response header message fro
[Fri Apr 27 12:15:29 2012] [1331310:1] [error]
ajp_get_reply::jk_ajp_common.c (2118): (tomcat1) Tomcat is down or refused
connection. No response has been se
[Fri Apr 27 12:15:29 2012] [1331310:1] [info] ajp_service::jk_ajp_common.c
(2607): (tomcat1) sending request to tomcat failed (recoverable),
(attempt=1)
[Fri Apr 27 12:15:29 2012] [1331310:1] [info] jk_open_socket::jk_connect.c
(626): connect to x.x.x.15:8191 failed (errno=79)
[Fri Apr 27 12:15:29 2012] [1331310:1] [info]
ajp_connect_to_endpoint::jk_ajp_common.c (1008): Failed opening socket to
(x.x.x.15:8191) (errno=79)
[Fri Apr 27 12:15:29 2012] [1331310:1] [error]
ajp_send_request::jk_ajp_common.c (1630): (tomcat1) connecting to backend
failed. Tomcat is probably not start
[Fri Apr 27 12:15:29 2012] [1331310:1] [info] ajp_service::jk_ajp_common.c
(2607): (tomcat1) sending request to tomcat failed (recoverable), because
of error
[Fri Apr 27 12:15:29 2012] [1331310:1] [error] ajp_service::jk_ajp_common.c
(2626): (tomcat1) connecting to tomcat failed.
[Fri Apr 27 12:15:29 2012] [1331310:1] [info] service::jk_lb_worker.c
(1400): service failed, worker tomcat1 is in error state
[Fri Apr 27 12:15:42 2012] Req: tomcat1 15.197145 s POST 1553 200

Logs for B:
[Fri Apr 27 12:16:23 2012] [1757184:1] [info] init_jk::mod_jk.c (3252):
mod_jk/1.2.32 () initialized
[Fri Apr 27 12:19:08 2012] [1376450:1] [info]
ajp_connection_tcp_get_message::jk_ajp_common.c (1266): (tomcat1) can't
receive the response header message fro
[Fri Apr 27 12:19:08 2012] [1376450:1] [error]
ajp_get_reply::jk_ajp_common.c (2118): (tomcat1) Tomcat is down or refused
connection. No response has been se
[Fri Apr 27 12:19:08 2012] [1376450:1] [error] ajp_service::jk_ajp_common.c
(2600): (tomcat1) sending request to tomcat failed (unrecoverable),
(attempt=1)
[Fri Apr 27 12:19:08 2012] [1376450:1] [info] service::jk_lb_worker.c
(1400): service failed, worker tomcat1 is in error state
[Fri Apr 27 12:19:08 2012] [1376450:1] [error] service::jk_lb_worker.c
(1425): unrecoverable error 502, request failed. Tomcat failed in the
middle of reques
[Fri Apr 27 12:19:08 2012] [1376450:1] [error] service::jk_lb_worker.c
(1485): All tomcat instances failed, no more workers left
[Fri Apr 27 12:19:08 2012] Req: tomcat1 2.968299 s POST 0 200
[Fri Apr 27 12:19:08 2012] [1376450:1] [info] jk_handler::mod_jk.c (2678):
Service error=0 for worker=loadbalancer

Reply via email to