Hi there,

I am trying to connect to couchbase (membase) server from tomcat to share
the sessions and am having issues. Here are the details:

F5 load balancer, 2 tomcats, 2 couchbase servers.

In case of a failover, LB routes to the active server/tomcat in the pool.

We have similar to below configuration on both the tomcat context.xml
files, necessary library files and build configs in place except that we
are using Json transcoder.

<Context>
...
<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:host1.yourdomain.com:11211,n2:host2.yourdomain.com:11211"
failoverNodes="n1"
requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
/>
</Context>


This is how we are testing it:

I have the web app open (it's a multi-page application) and the request
lands on server1 and a sessionid is created. To test the failover, I
stopped server1 and the traffic is currently flowing on server2 (as managed
by the F5 load balancer). But, I get the session expired error as this
tomcat on server2 is unable to find the session on memcache cluster.

Any idea on what I am missing here?

Thanks in advance.

Search Discussions

  • Martin Grotzke at Oct 18, 2012 at 10:07 am
    First of all, sorry for the delay!
    On 10/10/2012 11:12 PM, catch Sam wrote:
    Hi there,

    I am trying to connect to couchbase (membase) server from tomcat to
    share the sessions and am having issues. Here are the details:

    F5 load balancer, 2 tomcats, 2 couchbase servers.

    In case of a failover, LB routes to the active server/tomcat in the pool.

    We have similar to below configuration on both the tomcat context.xml
    files, necessary library files and build configs in place except that we
    are using Json transcoder.

    <Context>
    ...
    <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="n1:host1.yourdomain.com:11211,n2:host2.yourdomain.com:11211"
    failoverNodes="n1"
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
    />
    </Context>
    Just to make sure you know about it: msm also supports membase buckets,
    just use s.th. like http://host:8091/pools for memcachedNodes (see also
    https://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Overview_over_memcached-session-manager_configuration_attributes).

    This is how we are testing it:

    I have the web app open (it's a multi-page application) and the request
    lands on server1 and a sessionid is created. To test the failover, I
    stopped server1 and the traffic is currently flowing on server2 (as
    managed by the F5 load balancer). But, I get the session expired error
    as this tomcat on server2 is unable to find the session on memcache
    cluster.

    Any idea on what I am missing here?
    Can you share some logs of server1 and server2 with debug logs enabled
    (https://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Configure_logging)?

    Cheers,
    Martin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmemcached-session-manager @
categoriesmemcached
postedOct 10, '12 at 11:27p
activeOct 18, '12 at 10:07a
posts2
users2
websitememcached.org

2 users in discussion

catch Sam: 1 post Martin Grotzke: 1 post

People

Translate

site design / logo © 2022 Grokbase