bossadvisors / memcached-session-manager

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

Could not store secondary backup of session #157

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
  Thank u for u interested with the issuse.

 i use mms in this environment:msm-1.6.3,tc7-1.6.3,spymemcached2.7.3 and kyro 1.6.3

 When i visit my web site ,i got this log output:

INFO: Could not store secondary backup of session 
1B7D569C36DB1D7CE5161B9A49870BA6-n1
java.lang.IllegalArgumentException: No node found for key 
bak:1B7D569C36DB1D7CE5161B9A49870BA6-n1 (nodeId: null, known nodeIds: [n1, n2])

 And here is the useful content in my context.xml:

  <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"  
    memcachedNodes="n1:51.123.34.5:11211 n2:51.123.34.6:11211" 
    failoverNodes="n2"
    sticky="false"         
    sessionBackupAsync="false"  
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$" 
    lockingMode="uriPattern:/path1|/path2"
    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"     
    />     

how to solve? thanks!

Original issue reported on code.google.com by softguy...@gmail.com on 2 Mar 2013 at 5:31

GoogleCodeExporter commented 9 years ago
This happens because you're using failoverNodes with sticky="false", which does 
not make sense. FailoverNodes are only useful for sticky sessions. Once you 
remove the failoverNodes configuration the mentioned log messages should be 
gone.

Original comment by martin.grotzke on 2 Mar 2013 at 9:23

GoogleCodeExporter commented 9 years ago
I'm  not set failoverNodes:
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="nd47:192.168.29.47:11211,nd48:192.168.29.48:11211"
    sticky="false"
    sessionBackupAsync="false"
    lockingMode="auto"
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
    />
but ,it still happens,so any idea with this problem?
========================logs==============================
2013-08-24 02:12:54.163 WARN net.spy.memcached.MemcachedConnection:  handling 
node for operation is not set
Aug 24, 2013 2:12:54 AM 
de.javakaffee.web.msm.LockingStrategy$OnBackupWithoutLoadedSessionTask call
INFO: Could not store secondary backup of session 
835ECC64588362E99D3E451C31108870-nd47.jvm4
java.lang.IllegalArgumentException: No node found for key 
bak:835ECC64588362E99D3E451C31108870-nd47.jvm4 (nodeId: null, known nodeIds: 
[nd47, nd48])
        at de.javakaffee.web.msm.SuffixBasedNodeLocator.getPrimary(SuffixBasedNodeLocator.java:100)

Original comment by bighead99 on 23 Aug 2013 at 2:33

GoogleCodeExporter commented 9 years ago
Does this happen always, or only sometimes? I looked at the code and verified 
some test cases, and I'd say this should only happen if nd48 is *not* 
available. If it happens in your case even if nd48 is available please provide 
a test case or a sample app that allows me to reproduce this issue.

Also it would help if you'd provide the full stack trace.

Original comment by martin.grotzke on 23 Aug 2013 at 7:42

GoogleCodeExporter commented 9 years ago
>>>>>>>>>
My architecture is:
            LVS(192.168.29.100 it's ok,when I test from the VIP,its on machine 192.168.29.47) 
                                                           /             \
                                   http(192.168.29.47:80)  http(192.168.29.48:80)
                                                       /           \ /     \
         Tomcat1(ajp://192.168.29.47:8109:jvm1) Tomcat2(ajp://192.168.29.48:8109:jvm4)  
=====================================================
I use apache mod_proxy as a balancer for tomcat1(jvm1)and tomcat2(jvm4)
here is the configuration:
=====================================================
<Proxy balancer://is-cluster/>
BalancerMember ajp://192.168.29.47:8109/ loadfactor=1 route=jvm1
BalancerMember ajp://192.168.29.48:8109/ loadfactor=1 route=jvm4
ProxySet lbmethod=bytraffic
</Proxy>
ProxyPass / balancer://is-cluster/ stickysession=JSESSIONID|jsessionid
=====================================================
I use ie explorer to access 192.168.29.100:80 , then apache(I dont know on 
which one) refer to jvm4(29.48:8109), then I success to login,and then  I 
reboot the machine(29.48), I got the error,can you unstand what i say ,my 
english is soso. :)

Original comment by bighead99 on 23 Aug 2013 at 8:20

GoogleCodeExporter commented 9 years ago
>>>>>>>>>
Now ,I found the error on both Tomcat:
=============================log=========================
WARNING: Found no validity info for session id 
AEBD1FE6A416C82B304DF13A50CF9349-nd47.jvm1
Aug 24, 2013 8:04:48 AM de.javakaffee.web.msm.LockingStrategy 
onBackupWithoutLoadedSession
WARNING: Found no validity info for session id 
AEBD1FE6A416C82B304DF13A50CF9349-nd47.jvm1
Aug 24, 2013 8:04:48 AM de.javakaffee.web.msm.LockingStrategy 
onBackupWithoutLoadedSession
WARNING: Found no validity info for session id 
AEBD1FE6A416C82B304DF13A50CF9349-nd47.jvm1
Aug 24, 2013 8:04:48 AM de.javakaffee.web.msm.LockingStrategy 
onBackupWithoutLoadedSession
WARNING: Found no validity info for session id 
AEBD1FE6A416C82B304DF13A50CF9349-nd47.jvm1
Aug 24, 2013 8:04:49 AM de.javakaffee.web.msm.LockingStrategy 
onBackupWithoutLoadedSession
WARNING: Found no validity info for session id 
AEBD1FE6A416C82B304DF13A50CF9349-nd47.jvm1

Original comment by bighead99 on 23 Aug 2013 at 8:24

GoogleCodeExporter commented 9 years ago
Not sure what's happening, but an issue might be that non-sticky sessions 
(sticky=false) are used in combination with a jvmRoute / with stickyness in 
apache.

Can you run apache without stickyness (and remove jvmRoute from tomcat config) 
and see if this changes the situation?

Original comment by martin.grotzke on 23 Aug 2013 at 8:46

GoogleCodeExporter commented 9 years ago
>>>>>>>>>>>>>>
When I use sticky in memcached and set failoverNodes,I did not see the error 
again:
WARNING: Found no validity info for session id 
AEBD1FE6A416C82B304DF13A50CF9349-nd47.jvm1
but when I do the same things ,I got an apache 503 error.
 When I run apache without stickyness (and remove jvmRoute from tomcat config),I login the app ,and click any link ,and I soon be refer to the login page ,and login again!

Original comment by bighead99 on 23 Aug 2013 at 9:19

GoogleCodeExporter commented 9 years ago
Can you please activate debug logging according to 
https://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#C
onfigure_logging and send the output? Also post the configuration used for the 
test.

Original comment by martin.grotzke on 31 Aug 2013 at 10:19

GoogleCodeExporter commented 9 years ago
Issue 191 has been merged into this issue.

Original comment by martin.grotzke on 27 Dec 2013 at 8:52