I've been observing similar behavior. I think there is actually a bug in
either apache mod_proxy or tomcat.

Here is what happens:

Sometimes and I'm not quite sure what condition triggers this in
apache_proxy, apache_proxy modifies the cookie value by adding the name of
the worker server so a cookie would look like this:

{original.client.sent.cookie.value}.{worker_name}

So mod_proxy suffixes the cookie value with .{worker_name}. Now then this
cookie is sent to the correct server. When this cookie arrives at the
server, server no longer can find a session stored against this moded cookie
value and rejects the request.

Then what most likely happens client gets an error back from the server (via
proxy) and resets.

Try to install an HTTP traffic sniffer (there are plugins for firefox) and
monitor your cockie value on the client and you will see what I'm talking
about. 

Marat


Plana, Richard wrote:
> 
> 
>> > Basically, I open a user session and go through various 
>> pages on my app.
>> > After a couple of clicks, the app just brings me back to 
>> the start page.
>> > I'm monitoring logs from both sides and I see that as soon 
>> as it comes 
>> > back in error and brings me to the login page, activity switches to 
>> > the other app server (the one that I wasn't using prior to 
>> the problem).
>> 
>> Just to make sure: what kind of error do you mean here? The 
>> httpd timeout and that is not the only source of lost 
>> stickyness, or some application error? If it is an 
>> application error, it would not be too strange, that the 
>> application invalidates the session.
> 
> By "error", I just meant that I'd get redirected to the login page
> instead of the expected page. Sorry to confuse. There are no error
> pages, logs or messages. Just that I got switched to a different node.
> 
>> 
>> > Good catch, though. I've added "nofailover=On" to the 
>> ProxyPass line 
>> > and tested it. Again, in the middle of the session, it switched to 
>> > another node and I lost my session again. So not likely an 
>> > error-induced failover.
>> 
>> If you want to debug a little more: In Tomcat you can add a 
>> %S to your log pattern, which will log the session id. In 
>> httpd you can log the Set-Cookie outgoing header 
>> "%{Set-Cookie}o" and the JSESSIONID cookie "%{JSESSIONID}C". 
>> If you are not using cookies, you can of course see the 
>> jsessionid path parameter dircetly in the logged URL.
> 
> Thanks. I'll do that. (First time apache troubleshooter here). I'll get
> back on the results.
> --
> 
> Richi
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/mod_ajp-and-Load-Balancing-Issue-tp18283072p18500347.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to