We're not using cookies.

Our application is not web based, but accepts HTTP PUTS via client requests 
that enter our network from external sources.  We are not URL encoding, as our 
clients are not configured to accept it.  If we have to include URL encoding, 
both our client and server applications will have to be modified accordingly, 
which may be an option.

-----Original Message-----
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, July 13, 2011 11:23 AM
To: Tomcat Users List
Subject: Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

On 13/07/2011 14:37, Lataxes, Karl wrote:
> We are attempting to run identical servlets under several Tomcat 7.0.8 nodes 
> behind a load balancer (Apache 2.0.54 using mod_jk), but we have been unable 
> to get sticky sessions to work.  Initial requests are forwarded to a node as 
> expected, but subsequent requests from the same client are being forwarded to 
> the second node ala round robin, which triggers session not found logic in 
> our application and causes the connection to terminate.  Due to environment 
> limitations, we cannot employ session persistence to our Tomcat instances and 
> must make use of sticky sessions.  My Tomcat instances have been properly 
> configured (HTTP connector commented out, AJP 1.3 connected uncommented, 
> jvmRoute attribute in each instance set to the workers listed in 
> workers.properties file).
> 
> Here are the mod_jk entries in my httpd.conf file:
> 
> LoadModule jk_module /<path_to>/apache/modules/mod_jk.so
> 
> JkWorkersFile /<path_to>/apache/conf/workers.properties
> JkLogFile logs/mod_jk.log
> JkLogLevel debug
> 
> JkMount /* loadbalancer
> 
> Here are the entries in my workers.property file:
> 
> worker.list=loadbalancer
> 
> worker.tomcat7A.type=ajp13
> worker.tomcat7A.host=<host_name>
> worker.tomcat7A.port=4911
> worker.tomcat7A.lbfactor=1
> 
> 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
> 
> What am I doing wrong?


Are they always forwarded to the wrong node, or do some succeed?

If you monitor the response headers (look for Set-Cookie:
NNNNNN.tomcat7X) is a new session sent each time?

Is the client sending the Cookie: header with the second request?

Are you URL encoding each link in the page?


p







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

Reply via email to