I'm just starting to experiment with the session manager on the Amazon
cloud using an elasticcache server and Tomcat6.

I'm getting:

WARNING: An error when trying to load/update validity info.
java.lang.IllegalStateException: Shutting down
at
net.spy.memcached.MemcachedConnection.checkState(MemcachedConnecjava:821)
at
net.spy.memcached.MemcachedConnection.enqueueOperation(Memcachedction.java:638)
at net.spy.memcached.MemcachedClient.asyncGet(MemcachedClient.java:
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:997)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1018)

My configuration currently looks like:

<Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:sessions.4q8dq1.0001.euw1.cache.amazonaws.com:11211"
sticky="true"
sessionBackupAsync="true"
sessionBackupTimeout="1000"
memcachedProtocol="binary"
lockingMode="auto"
requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"

transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory"
/>


I've turned the trace level up to FINE on the spy memcached library, and
I've tried updating this to the latest version. Looks like the actual
session data is being transferred, but this validity info is not, for some
reason.

Search Discussions

  • Martin Grotzke at Aug 17, 2012 at 6:52 pm
    Validity info is used with sticky=false, I assume this is a c'p error.
    The exception says that the connection (or the client?) is being shut down,
    so I wonder why this is happening. Are there any exceptions logged before
    this one? Is the memcached service available?

    Btw, with nonsticky sessions I'd recommend using async=false.

    Cheers,
    Martin
    Am 17.08.2012 11:36 schrieb "Malcolm McMahon" <
    malcolm.mcmahon@costcutter.com>:
    I'm just starting to experiment with the session manager on the Amazon
    cloud using an elasticcache server and Tomcat6.

    I'm getting:

    WARNING: An error when trying to load/update validity info.
    java.lang.IllegalStateException: Shutting down
    at
    net.spy.memcached.MemcachedConnection.checkState(MemcachedConnecjava:821)
    at
    net.spy.memcached.MemcachedConnection.enqueueOperation(Memcachedction.java:638)
    at net.spy.memcached.MemcachedClient.asyncGet(MemcachedClient.java:
    at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:997)
    at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1018)

    My configuration currently looks like:

    <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="n1:sessions.4q8dq1.0001.euw1.cache.amazonaws.com:11211
    "
    sticky="true"
    sessionBackupAsync="true"
    sessionBackupTimeout="1000"
    memcachedProtocol="binary"
    lockingMode="auto"
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"

    transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory"
    />


    I've turned the trace level up to FINE on the spy memcached library, and
    I've tried updating this to the latest version. Looks like the actual
    session data is being transferred, but this validity info is not, for some
    reason.

  • Malcolm McMahon at Aug 21, 2012 at 10:17 am
    I seem to be getting the same error whether I've set sticky to true *or*false. The server seems to have been available during this test, because
    there are successful data transfers on the trace log before and after this
    message (no other exceptions are logged. There's certainly no trouble
    connecting to the cache from the EC2 instance by telnet.

    I do get the point about asychronous mode and non-sticky. I want to do some
    tests to see what the response time overhead is on the non-sticky mode. I'm
    hoping I can come up with a compromise which unsticks a session when
    there's a long gap between transactions, thus minimising the impact on
    response time, while allowing sessions to migrate to new instances when the
    autoscaler ramps up the instance count.

    BTW, I'm off on my holidays, so can't respond again until next Thursday.
    On Friday, 17 August 2012 19:52:47 UTC+1, Martin Grotzke wrote:

    Validity info is used with sticky=false, I assume this is a c'p error.
    The exception says that the connection (or the client?) is being shut
    down, so I wonder why this is happening. Are there any exceptions logged
    before this one? Is the memcached service available?

    Btw, with nonsticky sessions I'd recommend using async=false.

    Cheers,
    Martin
    Am 17.08.2012 11:36 schrieb "Malcolm McMahon" <malcolm...@costcutter.com<javascript:>
    :
    I'm just starting to experiment with the session manager on the Amazon
    cloud using an elasticcache server and Tomcat6.

    I'm getting:

    WARNING: An error when trying to load/update validity info.
    java.lang.IllegalStateException: Shutting down
    at
    net.spy.memcached.MemcachedConnection.checkState(MemcachedConnecjava:821)
    at
    net.spy.memcached.MemcachedConnection.enqueueOperation(Memcachedction.java:638)
    at
    net.spy.memcached.MemcachedClient.asyncGet(MemcachedClient.java:
    at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:997)
    at
    net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1018)

    My configuration currently looks like:

    <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="n1:
    sessions.4q8dq1.0001.euw1.cache.amazonaws.com:11211"
    sticky="true"
    sessionBackupAsync="true"
    sessionBackupTimeout="1000"
    memcachedProtocol="binary"
    lockingMode="auto"
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"

    transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory"
    />


    I've turned the trace level up to FINE on the spy memcached library, and
    I've tried updating this to the latest version. Looks like the actual
    session data is being transferred, but this validity info is not, for some
    reason.

  • Martin Grotzke at Aug 22, 2012 at 6:37 am
    How often does this error occur (only sometimes or all the time, in which
    interval)?

    When there's successful data transfer after this exception is anything
    indicating a reconnect? Otherwise it makes no sense to me, or the message
    is just misleading.unfortunately I cannot check spymemcached sources as I'm
    on holiday (too) with my mobile phone only.

    Btw, you shouldn't get this error (with validity info) with sticky
    sessions, as validity info is only used with nonsticky sessions. Either my
    memory is wrong or there's s.th. wrong on your side ;-)

    Cheers,
    Martin
    On Aug 21, 2012 3:17 AM, "Malcolm McMahon" wrote:

    I seem to be getting the same error whether I've set sticky to true *or*false. The server seems to have been available during this test, because
    there are successful data transfers on the trace log before and after this
    message (no other exceptions are logged. There's certainly no trouble
    connecting to the cache from the EC2 instance by telnet.

    I do get the point about asychronous mode and non-sticky. I want to do
    some tests to see what the response time overhead is on the non-sticky
    mode. I'm hoping I can come up with a compromise which unsticks a session
    when there's a long gap between transactions, thus minimising the impact on
    response time, while allowing sessions to migrate to new instances when the
    autoscaler ramps up the instance count.

    BTW, I'm off on my holidays, so can't respond again until next Thursday.
    On Friday, 17 August 2012 19:52:47 UTC+1, Martin Grotzke wrote:

    Validity info is used with sticky=false, I assume this is a c'p error.
    The exception says that the connection (or the client?) is being shut
    down, so I wonder why this is happening. Are there any exceptions logged
    before this one? Is the memcached service available?

    Btw, with nonsticky sessions I'd recommend using async=false.

    Cheers,
    Martin
    Am 17.08.2012 11:36 schrieb "Malcolm McMahon" <malcolm...@costcutter.**
    com>:
    I'm just starting to experiment with the session manager on the Amazon
    cloud using an elasticcache server and Tomcat6.

    I'm getting:

    WARNING: An error when trying to load/update validity info.
    java.lang.**IllegalStateException: Shutting down
    at net.spy.memcached.**MemcachedConnection.**checkState(**
    MemcachedConnecjava:821)
    at net.spy.memcached.**MemcachedConnection.**enqueueOperation(**
    Memcachedction.java:638)
    at net.spy.memcached.**MemcachedClient.asyncGet(**
    MemcachedClient.java:
    at net.spy.memcached.**MemcachedClient.get(**
    MemcachedClient.java:997)
    at net.spy.memcached.**MemcachedClient.get(**
    MemcachedClient.java:1018)

    My configuration currently looks like:

    <Manager className="de.javakaffee.web.**msm.**
    MemcachedBackupSessionManager"
    memcachedNodes="n1:sessions.**4q8dq1.0001.euw1.cache.**
    amazonaws.com:11211<http://sessions.4q8dq1.0001.euw1.cache.amazonaws.com:11211>
    "
    sticky="true"
    sessionBackupAsync="true"
    sessionBackupTimeout="1000"
    memcachedProtocol="binary"
    lockingMode="auto"
    requestUriIgnorePattern=".*\.(**ico|png|gif|jpg|css|js)$"
    transcoderFactoryClass="de.**javakaffee.web.msm.**
    JavaSerializationTranscoderFac**tory"
    />


    I've turned the trace level up to FINE on the spy memcached library, and
    I've tried updating this to the latest version. Looks like the actual
    session data is being transferred, but this validity info is not, for some
    reason.

  • Preeti at Oct 10, 2012 at 12:21 pm
    I am new to this. I want to know how to use memcached session manager for
    EC2 instances for handling session data and how elasticache can be used
    in this context?
  • Martin Grotzke at Oct 10, 2012 at 8:28 pm
    Hi,

    first of all please don't hijack existing threads, but start your own
    ones (as a general rule regarding mailing lists).
    On 10/10/2012 02:06 PM, Preeti wrote:


    I am new to this. I want to know how to use memcached session manager
    for this is
    https://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration
    for EC2 instances for handling session data and how elasticache can be
    used in this context?
    AWS should have documentation regarding this and how to connect to their
    memcacheds.

    Do you have more concrete questions?

    Cheers,
    Martin
  • Billy Bacon at Oct 10, 2012 at 9:54 pm
    The setup for getting MSM working in an AWS environment is very similar to a local development setup but the key piece that is very different when in an AWS environment and you are attempting to use their Elasticache service is setting up the proper security groups. There are EC2 security groups and there are Elasticache Security Groups. You will need to create an Elasticache security group and add the EC2 security group which your instance running your war file is in. This will allow your application to connect to port 11211 on the elasticache side.

    Hope that helps.

    - Billy -
    On Oct 10, 2012, at 1:58 PM, Martin Grotzke wrote:

    Hi,

    first of all please don't hijack existing threads, but start your own
    ones (as a general rule regarding mailing lists).
    On 10/10/2012 02:06 PM, Preeti wrote:


    I am new to this. I want to know how to use memcached session manager
    for this is
    https://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration
    for EC2 instances for handling session data and how elasticache can be
    used in this context?
    AWS should have documentation regarding this and how to connect to their
    memcacheds.

    Do you have more concrete questions?

    Cheers,
    Martin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmemcached-session-manager @
categoriesmemcached
postedAug 17, '12 at 6:36p
activeOct 10, '12 at 9:54p
posts7
users4
websitememcached.org

People

Translate

site design / logo © 2022 Grokbase