On 12.08.2011 15:30, Lataxes, Karl wrote:
> The jvmRoute's for both server.xmls are properly set to the worker names and 
> are not commented out.  This was the first thing I verified.
> 
>     <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat7A">
>     <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat7C"> 
> 
> Here are the settings in workers.properties (worker tomcat7A identical to 
> tomcat7C except for port, since both are running on the same server for 
> testing.  In production, we will probably install them on separate boxes):
> 
> worker.list=loadbalancer,jkstatus
> worker.tomcat7C.type=ajp13
> worker.tomcat7C.host=<host_name>
> worker.tomcat7C.port=4931
> worker.tomcat7C.lbfactor=1
> worker.loadbalancer.type=lb
> worker.loadbalancer.balance_workers=tomcat7A,tomcat7C
> worker.loadbalancer.sticky_session=1
> worker.jkstatus.type=status

OK

> Here are the JkMount settings in mod_jk.conf:
> 
> JkMount /jkmanager/* jkstatus
> JkMount / servlet/* loadbalancer

I hope the space before "servlet" is a copy and paste error and not in
the original config ...

> Load balancing is working, but subsequent requests from a single client are 
> being routed to the other Tomcat instance despite sticky_session being set to 
> 1.

OK, then maybe your cookie header is not OK. To debug:

- Add %{Cookie}i to the LogFormat you are using in Apache. It will log
all cookies. Check the values.

- Add %{JSESSIONID}C to the same LogFormat. It will log the value of the
JSESSIONID cookie found by the web server. Check the values.

- Optional: Add %{Set-Cookie}o to the same LogFormat. It will log the
setting of the cookie (sending a cookie from the server to the client).
Probably of no use for you, since you seem to parse that info in some
other way.

- Increase log level of mod_jk to debug or even trace (not in
production) and look at the log lines written when your client sends a
request, which isn't handled sticky.

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