Hi, Martin
i'm running memcache session manager and Jboss5.1.0GA.

it work, handles tomcat failover, but did not failover memcached.

i have following jars in ${jboss-5.1.0_home}\server\default\lib:
msm-all-memcached-session-manager-1.5.0-SNAPSHOT.jar
msm-all-memcached-session-manager-jbossweb2-1.5.0-SNAPSHOT.jar
msm-all-msm-javolution-serializer-1.5.0-SNAPSHOT.jar
javolution-5.4.3.jar
memcached-2.5.jar
juli-6.0.28.jar
( I did not use kryo. when I use kryo, can not access the
Administration Console, and jboss prompt internal error. The main reason
is kero can not be serialized java.util.concurrent.ConcurrentHashMap,
etc. )

now, there're jboss1(j1) jboss2(j2) memcache1(m1) memcache2(m2) ,
they're working.
And, m1 has sessionids:

bak:validity:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
bak:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
m2 has sessionids:
validity:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
4AFCA68FE3DE6AC970E84A82EB2B5616-n2

Then, I stop m2, m1 did not failover, in this case, m1 should
have 4AFCA68FE3DE6AC970E84A82EB2B5616-n1, but it's not, it has new
sessionid: BBC4133E6D12ED19896F9ADF0A2622FB-n1. so, browser page need to
re-login, and session data loss.

i gets sources of msm from github, but, i do't know solution.

ths, I hope you can give me some advice.

Search Discussions

  • Franklin Sun at Sep 11, 2012 at 4:36 pm
    Hi, Martin
    this problem has been solved.

    today, i looked at the source. I found “thisAccessedTime”, is wrong ,
    it's different in Tomcat and Jboss. the following:

    (Original)
    public class SessionValidityInfo
    {
    //......

    public boolean isValid() {
    long timeNow = System.currentTimeMillis();
    int timeIdle = (int)((timeNow - _thisAccessedTime) /
    1000L);
    return timeIdle < _maxInactiveInterval;
    }
    }

    Should be modified to:
    public class SessionValidityInfo
    {
    //......

    public boolean isValid() {
    int timeIdle = (int)( _thisAccessedTime / 1000L);
    return timeIdle < _maxInactiveInterval;
    }
    }

    The above has been tested.

    In addition, when accessing the administrator console, always return to the
    login page.


    在 2012年9月8日星期六UTC+8下午9时50分12秒,Franklin Sun写道:
    Hi, Martin
    i'm running memcache session manager and Jboss5.1.0GA.

    it work, handles tomcat failover, but did not failover memcached.

    i have following jars in ${jboss-5.1.0_home}\server\default\lib:
    msm-all-memcached-session-manager-1.5.0-SNAPSHOT.jar
    msm-all-memcached-session-manager-jbossweb2-1.5.0-SNAPSHOT.jar
    msm-all-msm-javolution-serializer-1.5.0-SNAPSHOT.jar
    javolution-5.4.3.jar
    memcached-2.5.jar
    juli-6.0.28.jar
    ( I did not use kryo. when I use kryo, can not access the
    Administration Console, and jboss prompt internal error. The main reason
    is kero can not be serialized java.util.concurrent.ConcurrentHashMap,
    etc. )

    now, there're jboss1(j1) jboss2(j2) memcache1(m1) memcache2(m2) ,
    they're working.
    And, m1 has sessionids:

    bak:validity:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
    bak:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
    m2 has sessionids:
    validity:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
    4AFCA68FE3DE6AC970E84A82EB2B5616-n2

    Then, I stop m2, m1 did not failover, in this case, m1 should
    have 4AFCA68FE3DE6AC970E84A82EB2B5616-n1, but it's not, it has new
    sessionid: BBC4133E6D12ED19896F9ADF0A2622FB-n1. so, browser page need to
    re-login, and session data loss.

    i gets sources of msm from github, but, i do't know solution.

    ths, I hope you can give me some advice.



  • Martin Grotzke at Sep 11, 2012 at 10:58 pm
    Hi,
    On 09/11/2012 06:36 PM, Franklin Sun wrote:
    Hi, Martin
    this problem has been solved.
    good to hear you solved it!

    In addition, when accessing the administrator console, always return to
    the login page.
    So this issue is still there? What's special about the admin console?
    Maybe you can turn on debug logging to see if there's an issue?

    Btw, when I tried to create a msm version for jbossweb I couldn't manage
    to get integration tests running (due to a changed/incompatible embedded
    tomcat class IIRC). Therefore I canceled working on jbossweb
    integration, the support I can provide for this is also fairly limited.

    Cheers,
    Martin


    在 2012年9月8日星期六UTC+8下午9时50分12秒,Franklin Sun写道:

    Hi, Martin
    i'm running memcache session manager and Jboss5.1.0GA.

    it work, handles tomcat failover, but did not failover memcached.

    i have following jars in ${jboss-5.1.0_home}\server\default\lib:
    msm-all-memcached-session-manager-1.5.0-SNAPSHOT.jar
    msm-all-memcached-session-manager-jbossweb2-1.5.0-SNAPSHOT.jar
    msm-all-msm-javolution-serializer-1.5.0-SNAPSHOT.jar
    javolution-5.4.3.jar
    memcached-2.5.jar
    juli-6.0.28.jar
    ( I did not use kryo. when I use kryo, can not access the
    Administration Console, and jboss prompt internal error. The main
    reason is kero can not be serialized
    java.util.concurrent.ConcurrentHashMap, etc. )

    now, there're jboss1(j1) jboss2(j2) memcache1(m1)
    memcache2(m2) , they're working.
    And, m1 has sessionids:

    bak:validity:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
    bak:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
    m2 has sessionids:

    validity:4AFCA68FE3DE6AC970E84A82EB2B5616-n2
    4AFCA68FE3DE6AC970E84A82EB2B5616-n2

    Then, I stop m2, m1 did not failover, in this case, m1 should
    have 4AFCA68FE3DE6AC970E84A82EB2B5616-n1, but it's not, it has new
    sessionid: BBC4133E6D12ED19896F9ADF0A2622FB-n1. so, browser page
    need to re-login, and session data loss.

    i gets sources of msm from github, but, i do't know solution.

    ths, I hope you can give me some advice.


    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • Martin Grotzke at Sep 12, 2012 at 10:39 am
    Ok
    On Sep 12, 2012 12:04 PM, "Franklin Sun" wrote:

    hi, Martin:
    Anyway, thank you very muth.

    About Administrator Console, it's
    ${jboss-5.1.0.GA_HOME}/server/default/deploy/admin-console.war, it was
    provided with jboss.

    When i viewed it, i found that the JSESSIONID is inconsistent in
    Chrome and Memcache. so, always return to the login page.

    But, my web project and jboss's other project are work.

    About this, i will continue to solve it .

    Cheers,
    franklin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmemcached-session-manager @
categoriesmemcached
postedSep 8, '12 at 6:51p
activeSep 12, '12 at 10:39a
posts4
users2
websitememcached.org

2 users in discussion

Franklin Sun: 2 posts Martin Grotzke: 2 posts

People

Translate

site design / logo © 2022 Grokbase