Bug 40551 - Sticky sessions using PersistentManager enter indeterminate state on node failover
Summary: Sticky sessions using PersistentManager enter indeterminate state on node fai...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: Nightly Build
Hardware: All All
: P2 major with 2 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-20 01:33 UTC by Chris Chandler
Modified: 2009-07-17 04:38 UTC (History)
0 users



Attachments
Recommended patch (2.80 KB, patch)
2006-09-20 01:34 UTC, Chris Chandler
Details | Diff
Additional strings for StringManager (983 bytes, patch)
2007-01-26 12:32 UTC, Chris Chandler
Details | Diff
Modifications to JvmRouteBinderValve (2.41 KB, patch)
2007-01-26 12:33 UTC, Chris Chandler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Chandler 2006-09-20 01:33:41 UTC
If a cluster of nodes is being load balanced with sticky sessions, and a
particular node becomes unavailable, any sessions bound to that node must be
redistributed.  Particularly in the case of mod_jk these sessions will not be
bound to whichever node the failover occurred on because the jessionid will
still contain the JVM route of the original failed node, thus placing the
session in an indeterminate state and losing sticky properties.

I am attaching a patch that will trigger a session to rebind itself to a new
node if the jvmroutes don't match and replace the jessionid in the browser's cookie.
Comment 1 Chris Chandler 2006-09-20 01:34:40 UTC
Created attachment 18890 [details]
Recommended patch
Comment 2 Mark Thomas 2006-12-11 19:47:24 UTC
A slightly modified version of your patch has been applied to SVN and will be
included in 5.5.21 onwards.

Many thanks for the patch.
Comment 3 Mark Thomas 2006-12-13 18:06:42 UTC
Re-opening to change resolution type.
Comment 4 Mark Thomas 2006-12-13 18:09:38 UTC
As per the discussion on the dev list -
http://marc.theaimsgroup.com/?t=116592092300008&r=1&w=2 - this patch will nto be
commmitted.

The JvmRouteBinderValve should provide the functionality you require in this case.
Comment 5 Chris Chandler 2007-01-26 12:32:06 UTC
Created attachment 19470 [details]
Additional strings for StringManager

Added an additional string for logging
Comment 6 Chris Chandler 2007-01-26 12:33:11 UTC
Created attachment 19471 [details]
Modifications to JvmRouteBinderValve

Modifications made to JvmRouteBinderValve to make it agnostic of whether or not
in-memory clusting is being used.
Comment 7 Chris Chandler 2007-01-26 12:34:49 UTC
Please reopen and investigate this bug.  I have made the modifications to the
JvmRouteBinderValve as per the discussion on the dev mailing list.  My initial
testing shows this valve now works as expected for JDBC clustering.
Comment 8 Yoav Shapira 2007-03-25 14:47:23 UTC
Filip, what do you think about the patch as it is right now, for Tomcat 5.5 (not
6.0)?
Comment 9 Mark Thomas 2009-07-16 13:11:20 UTC
I have applied a modified fix to trunk and proposed it for 6.0.x and 5.5.x
Comment 10 Mark Thomas 2009-07-17 04:38:35 UTC
This has been applied to 6.0.x and 5.5.x and will be included in 6.0.21 and 5.5.28 onwards.