tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: problem with tomcat 5.5 and apache AJP
Date Fri, 22 Jan 2010 13:20:18 GMT
David Delbecq wrote:
>  <Connector
>         port="8019"
>         protocol="AJP/1.3" request.secret="MyPass"
>         protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
>         redirectPort="443">
>     </Connector>
> and apache is configured as follow:
> worker.list=lbJboss,lbOld,lbTomcat,status
> # Define jbossBoromir
> # modify the host as your host IP or DNS name.
> worker.jbossBoromir.port=8009
> worker.jbossBoromir.type=ajp13
> worker.jbossBoromir.lbfactor=1
> worker.jbossBoromir.prepost_timeout=10000 #Not required if using ping_mode=A
> worker.jbossBoromir.connect_timeout=10000 #Not required if using ping_mode=A
> worker.jbossBoromir.secret="MyPass"
> #worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
> # worker.tomcatBoromir.connection_pool_size=10 (1)
> worker.tomcatBoromir.port=8019
> worker.tomcatBoromir.type=ajp13
> worker.tomcatBoromir.lbfactor=1
> worker.tomcatBoromir.prepost_timeout=10000 #Not required if using
> ping_mode=A
> worker.tomcatBoromir.connect_timeout=10000 #Not required if using
> ping_mode=A
> worker.tomcatBoromir.secret="MyPass"
> #worker.tomcatBoromir.ping_mode=A #As of mod_jk 1.2.27
> #worker.tomcatBoromir.connection_pool_size=10 (1)
> worker.tomcatIlluin.port=8019
> worker.tomcatIlluin.type=ajp13
> worker.tomcatIlluin.lbfactor=1
> worker.tomcatIlluin.prepost_timeout=10000 #Not required if using ping_mode=A
> worker.tomcatIlluin.connect_timeout=10000 #Not required if using ping_mode=A
> worker.tomcatIlluin.secret="MyPass"
> # Load-balancing behaviour
> worker.lbJboss.type=lb
> worker.lbJboss.balance_workers=jbossBoromir
> worker.lbTomcat.type=lb
> worker.lbTomcat.balance_workers=tomcatBoromir
> worker.lbOld.type=lb
> worker.lbOld.balance_workers=tomcatIlluin
> # Status worker for managing load balancer
> worker.status.type=status

(In the hope that solving this will help improve the weather in Belgium)

About your main issue : in my own experience, whenever we
get the kind of error messages which you indicate, they are right.
It really means that
the back-end Tomcat is for some reason not responding to Apache/mod_jk
within a certain limit of time.  That can be because it is really down,
or because it is very busy doing something else (all threads are already
processing requests, or the requested webapp is busy starting up, or
something like that). Or, you may be having network connectivity
problems (but that would normally not be the case if both Apache and
Tomcat are on the same host).
But maybe the confusion below about load balancing is the root cause of
the problems.

I don't know if I am understanding your quoted configuration correctly,
but if I do, it puzzles me a bit.

You seem to have 3 separate servlet engines : on "localhost", you have a
jBoss and a Tomcat and on "illuin", you have a Tomcat.

The jBoss on localhost has an AJP Connector listening on port 8009.
The corresponding "worker" is named "jbossBoromir".

The Tomcat on localhost has an AJP Connector listening on port 8019.
The corresponding "worker" is named "tomcatBoromir".

The Tomcat on illuin has an AJP Connector listening on port 8019.
The corresponding "worker" is named "tomcatIlluin".

Then for each one, you have an additional "load balancer" worker.
So each load balancer worker only "balances" a single Tomcat/jBoss.
This seems a bit counter-intuitive.

Why not have
directly, and take the load balancer workers out of the equation, since
they each balance only 1 back-end ?

Or, if your idea is really to balance all requests between all 3
back-ends, then use one single load-balancer worker, but have it balance
  all 3 "real" workers. Like :


The point is, in my understanding, a load balancer worker only makes
sense if it balances at least 2 real workers (tomcat or jboss).
Otherwise it seems pretty pointless. Or is it only in order to be able 
to use the status worker ?

What do your "JkMount" lines at the Apache level look like ?
That may allow us to figure out what you are trying to achieve.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message