bossadvisors / memcached-session-manager

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

webapp sets cookie for every page if memcached process is missing #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From context.xml: 

  <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
             memcachedNodes="n1:server1.mydomain.com:11211 
n2:server2.mydomain.com:11211"
             failoverNodes="n1"
             transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
             requestUriIgnorePattern=".*\.(png|gif|jpg|css|js)$"
    />

Assuming that we run our app on server1, now run the webapp on server1 but 
don't run memcached on server2.

What is the expected output? What do you see instead?

Normally the app should be able to handle sessions, but it is not. Instead 
for every page a session cookie is set.

What version of the product are you using? On what operating system?

memcached-session-manager-1.1.jar, msm-javolution-serializer-1.1.jar

$ uname -a
Linux app-01 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:27:37 EST 2009 x86_64 
x86_64 x86_64 GNU/Linux

Redhat Enterprise

Original issue reported on code.google.com by mdie...@gmail.com on 23 Feb 2010 at 9:19

GoogleCodeExporter commented 9 years ago
Is memcached on server1 running?

Original comment by martin.grotzke on 8 Mar 2010 at 4:06

GoogleCodeExporter commented 9 years ago
What I could reproduce: When both memcacheds are not available then with every 
request a 
new session was created and the session id sent as a cookie.

This is fixed now: When generating a session id, only valid memcached node ids 
are encoded. 
If there's no memcached available, the session id will not contain a memcached 
id. Also 
when a session, that was previously stored in memcached, cannot be stored as no 
memcacheds 
are available, this will not trigger a new session.

This change is implemented in the develop branch and will be release with 1.2 
(probably 
next week). If you want to test this earlier I could provide a packaged jar.

Original comment by martin.grotzke on 8 Mar 2010 at 11:56