On 27.06.2011 18:47, Carlos Juarez wrote:
> 
> 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

No need for server1 and server2 in that list. If you only want to do
balancing, then remove those two from the list.

> 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

You really want sticky session turned off?

> 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?

What about your JkMount or uriworkermap.properties? Are you mounting to
"loadbalancer" or to "server1" resp. "server2"?

In addition: Your config doesn't look to bad. If you want to further
improve, have a look at the example cofig that comes with the source
download of mod_jk 1.2.31.

I assume you are runningthe latest and greatest mod_jk version of course ...

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to