magro / memcached-session-manager

A tomcat session manager that backups sessions in memcached and pulls them from there if asked for unknown sessions
Apache License 2.0
760 stars 346 forks source link

memcached sessions do not redirect #367

Open davedennis opened 6 years ago

davedennis commented 6 years ago

I set up memcache on two amazon ec2 instances. Along with a ElastiCache runing memcache. If I log into either of my instances separately I have no problem loging in then redirecting. But if I go through my AWS loadblancer it seems to just redirect me back to the login.xhtml page. But if I tail the logs in both instances I can see soap request and a 200 response code.

What I have. It's a spring/tomcat 8 app in my tomcat lib I have three jars. -memcached-session-manager-2.1.1.jar -memcached-session-manager-tc8-2.1.1.jar -spymemcached-2.11.1.jar in my context.xml I have

  <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
        memcachedNodes="n1:memcache-one-node.drkx12.cfg.usw2.cache.amazonaws.com:11211"
             memcachedProtocol="binary"
             sticky="true"
             sessionBackupAsync="true"
             requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"
             transcoderFactoryClass="de.javakaffee.web.msm.JavaSerializationTranscoderFactory" 
          />

I'm at a loss as to why it won't redirect on the load balancer. Like I said when I tail the logs I see the request working well and it looks like it is using the memcahce. Since i'm using the built in java serialization I figured I don't need to add anything to WEB-INF/lib/. Am I missing something obvious? Thanks

davedennis commented 6 years ago

@magro Seen anything like this before?

magro commented 6 years ago

@davedennis Sorry for the late response here. Is this still relevant or can we close this issue?