bcxs051 / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

After tomcat failover a session may be stored in a failoverNode while other nodes are available #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.3 host,1 tomcat instance and 1 memcached instance on each host.
2.use sticky session and set failoverNodes like this.

------10.100.10.21:host1:tomcat1-------
<Context>
  <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="n1:10.100.10.21:11211,n2:10.100.10.22:11211,n3:10.100.10.23:11211"
    failoverNodes="n1"//In the node of IP 22 is n2 and In the node of IP 23 is n3
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
    />
</Context>

3.nginx use ip_hash strategy for these 3 tomcat instances.
4.open a page and send a request to nginx, assuming that the request has been 
processed by tomcat1.Then the session will be backup in memcached2 or 
memcached3.Now,assuming that the session is backup in memcached2.Next, to kill 
tomcat1,then flush the page.
At this time if the request fails over to tomcat2, tomcat2 will obtain session 
from memcached2 and the result will be successful. At this time, session will 
only exist in tomcat2 and memcached2.

What is the expected output? What do you see instead?
My expectation is that, if the session has been obtained from memcached2 
successfully,the session should be transferred to memcached1 or 
memcached3,rather than still exists only in memcached2 and tomcat2.

What version of the product are you using? On what operating system?
tomcat 6,msm 1.6.5  

I use ubuntu 10.04 os on a VMware,and install nginx and 3 memcached instances 
with port 11211,11212,11213.
I start 3 tomcat instances on my local machine with win7 os.

Original issue reported on code.google.com by 150349...@qq.com on 3 Jan 2014 at 5:29

GoogleCodeExporter commented 9 years ago
Thanx for reporting, fixed in master.

Original comment by martin.grotzke on 3 Jan 2014 at 11:29

GoogleCodeExporter commented 9 years ago

Original comment by martin.grotzke on 2 Feb 2014 at 2:08