Good morning guys.

I've been working in a RHEL4 box with Apache, two tomcats 7.0.12 trying to 
configure mod_jk to work like a high available enviroment
here is my workers.properties:

#######################
worker.list=loadbalancer,jkstatus,server1,server2
worker.server1.type=ajp13
worker.server1.host=localhost
worker.server1.port=8009
worker.server1.redirect=server2
worker.server1.lbfactor=1
#worker.server1.recovery_options=16
worker.server1.ping_mode=A
worker.server1.ping_timeout=15000
worker.server1.connect_timeout=15000
worker.server1.prepost_timeout=15000
worker.server2.type=ajp13
worker.server2.host=localhost
worker.server2.port=8010
worker.server2.redirect=server1
worker.server2.lbfactor=1
worker.server2.activation=disabled
#worker.server2.recovery_options=16
worker.server2.ping_mode=A
worker.server2.ping_timeout=15000
worker.server2.connect_timeout=15000
worker.server2.prepost_timeout=15000
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=server1,server2
worker.loadbalancer.sticky_session=0
worker.jkstatus.type=status
#####################

the server.xml archive in the 2 tomcats where modified, and httpd.conf too

My problem is that sometimes Tomcat hangs up due to a java application, 
and mod_jk not redirects the newest requests to another tomcat.

this is my mod_jk.log response.

########################################
[Fri MON DD HH:MM:SS 2011] [22329:3086026432] [error] 
ajp_send_request::jk_ajp_common.c (1467): (server1) connecting to backend 
failed. Tomcat is probably not started or is listening on the wrong port 
(errno=111)
[Fri MON DD HH:MM:SS 2011] [22329:3086026432] [error] 
ajp_service::jk_ajp_common.c (2426): (server1) connecting to tomcat failed.
########################################

then to solve the problem i must restart the problematic tomcat manually.

My questions are:

is there something wrong with my tomcat configuration (I looked for examples in 
Apache-tomcat web page and I think all is correct)? why mod_jk is not 
redirecting the requests if there is an "error" and the other tomcat is still 
working correctly?

and for the last, is there a way tomcat could automatically restart after a 
hang, or at least to send a signal when this happens (then to restart it 
manually? 

My apologies and thank you for your attention.

Carlos Juarez.


                                          

Reply via email to