System:
x86_64/CentOS 5.4/Apache 2.2.14/Tomcat 6.0.20
Problem:
I just upgraded from mod_jk 1.2.28 to 1.2.30. I have 4 apache servers
JKing to 4 tomcat servers in load balanced worker. Both apache and
tomcat are on the same servers.
After upgrading, I have started to see mod_jk reporting connection
errors when it talks to its local server. i.e. when server1's apache
talks to server1's tomcat, server2's apache talks to server2's tomcat,
etc.. They do not talk via 127.0.0.1, but via its internal ip like to
every other server.
The errors are:
[debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1152): sending
to ajp13 pos=4 len=4 max=8192
[debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1152): 0000
12 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - .4..............
[debug] jk_is_input_event::jk_connect.c (986): error event during poll
on socket sd = 65 (event=24)
[error] ajp_get_reply::jk_ajp_common.c (2020): (srv2) Timeout with
waiting reply from tomcat. Tomcat is down, stopped or network problems
(errno=24)
[debug] jk_shutdown_socket::jk_connect.c (722): About to shutdown socket
65
[debug] jk_shutdown_socket::jk_connect.c (730): Failed sending SHUT_WR
for socket 65
[error] ajp_service::jk_ajp_common.c (2533): (srv2) sending request to
tomcat failed (unrecoverable), because of reply timeout (attempt=2)
[debug] ajp_reset_endpoint::jk_ajp_common.c (757): (srv2) resetting
endpoint with sd = 4294967295 (socket shutdown)
[debug] ajp_done::jk_ajp_common.c (3010): recycling connection pool
slot=0 for worker srv2
[info] service::jk_lb_worker.c (1388): service failed, worker srv2 is in
error state
[error] service::jk_lb_worker.c (1413): unrecoverable error 504, request
failed. Tomcat failed in the middle of request, we can't recover to
another instance.
[error] service::jk_lb_worker.c (1473): All tomcat instances failed, no
more workers left
Jkstatus lines are for the particular worker are:
Name Type Hostname Address:Port Connection Pool Timeout
Connect Timeout Prepost Timeout Reply Timeout Retries Recovery Options
Max Packet Size
srv2 ajp13 x.x.x.x x.x.x.x:8009 30 30000 20000 20000
2 4 8192
Name Act State D F M V Acc
Err CE RE Wr Rd
Busy Max Con Route RR Cd Rs LR LE
srv2 ACT OK 0 1 1 272 10551 (2/sec)
5 0 0 54M (13K/sec) 65M (16K/sec) 0 5
-20 tr2 0/0 4248
No tomcat changes have been made between 1.2.28 and 1.2.30
workers.properties (local worker only quoted):
worker.template.port=8009
worker.template.type=ajp13
worker.template.lbfactor=1
worker.template.connection_pool_timeout=30
worker.template.connect_timeout=30000
worker.template.fail_on_status=-400,-403,-404,500,503
worker.template.recovery_options=4
worker.template.reply_timeout=20000
worker.template.socket_timeout=20
worker.template.socket_connect_timeout=5000
worker.template.ping_mode=A
worker.template.ping_timeout=20000
worker.srv2.host=x.x.x.x
worker.srv2.reference=worker.template
jk parameters (relevant):
JkWatchdogInterval 60
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURIProxy -ForwardDirectories
JkRequestLogFormat "%w %R %V %B %T %m %U %s"
JkShmFile logs/jk-runtime-status
tomcat parameters:
<Connector port="8009" protocol="AJP/1.3"
maxThreads="400" backlog="25" maxPostSize="4194304"
enableLookups="false" connectionTimeout="30000"
keepAliveTimeout="10000"
redirectPort="8443" />
-Tony
---------------------------
Manager, IT Operations
Format Dynamics, Inc.
303-573-1800x27
[email protected]
http://www.formatdynamics.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]