I had a problem like this, and determined that the jvmRoute value in my server.xml did not match the names of the tomcat workers in the workers.properties file. If your workers.properties file defines workers, t1 and t2, and "worker.loadbalancer.balanced_workers=t1,t2", then your server.xml file must use t1 and t2 as the value for jvmRoute= in the tomcat configuration.

You may want to test load balancing using a simple .jsp that just prints the value of the sessionid on each of the tomcat boxes so you can determine if the problem is in basic sticky sessions or in your servlet code that switches sessions on the user after authentication.

-Mike Schulz


William Lee wrote:

I'm using Apache 2.0.43, mod_ssl, mod_jk 1.2, and Tomcat 4.1.14 (the test release). I've set up Tomcat so it runs behind the apache. My test of having 1 worker behind a load balancer works perfectly without any problem. However, once I added another machine, it seems like my user's session is jumping back and forth between the two machines. This, of course creates a big problem.

My servlet involves a form-based login page, in which the login code would remove the old session and attach a new one once the user has authenticated against the authority. Would this create a problem? I'm wondering how mod_jk handles the stick sessions. It does seem to be pretty random when it jumps back and forth between the two machines I have here.

I've turned on the debug log in mod_jk but it doesn't tell me all that much. Is there any other mechanism available for me to debug this?


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to