Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache node failover not working in AutoDiscovery mode (ElastiCache) #417

Open
otbe opened this issue Mar 16, 2020 · 0 comments
Open

Cache node failover not working in AutoDiscovery mode (ElastiCache) #417

otbe opened this issue Mar 16, 2020 · 0 comments

Comments

@otbe
Copy link

otbe commented Mar 16, 2020

Hi,

I followed your wiki entry by using a config like this

    <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
             memcachedNodes="mypool.acdbd.cfg.euc1.cache.amazonaws.com:11211"
             sticky="true"
             sessionBackupAsync="true"
    />

I included the following libs
Screenshot 2020-03-16 at 18 16 26

I use this test setup:
One ALB (LB stickiness enabled) in front of an ASG with 2 Tomcats. The ElastiCache cluster has also 2 nodes.

My catalina out says only this during startup. Theres no indication that an auto discovery took place (like described in the wiki).
Screenshot 2020-03-16 at 18 20 22

Failover scenarios:
A tomcat failover seems to work. I killed both tomcats and after the ASG recreated two instances I was still signed in. I tried this with 5 different sessions. I saw items/get commands on both cache nodes. I dont understand why this works because my session id looks like JSESSIONID=1276981FC20CF9073C5CCA9BE91F9B78. I would expect a suffix like -001 at the end so the manager knows where to ask for the session.

But a cache node failover doesnt work at all. If I remove one of the cache nodes the tomcat does not seem to notice it. Theres no log entry and the cached items dont get synced to the remaining node (that what I expected from the docs). If I kill the tomcat (and get rerouted to another tomcat) Im signed out and the log says something like "Couldnt find session id x in memcached".

I tried to increase the log level like suggested in the wiki but I only see some thing like that
Screenshot 2020-03-16 at 18 32 25

Any idea whats wrong?
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant