Trying to setup a tomcat cluster with non-sticky sessions using redis.
Trying to use: https://github.com/redisson/redisson/wiki/14.-Integration%20with%20frameworks#145-spring-session
The 2 jar files are added. Using Tomcat 7.
context.xml:
<Manager className="org.redisson.tomcat.RedissonSessionManager"
configPath="${catalina.base}/conf/redisson.yml"
readMode="REDIS"
redisson.yml:
---
sentinelServersConfig:
idleConnectionTimeout: 10000
pingTimeout: 1000
connectTimeout: 10000
timeout: 3000
retryAttempts: 3
retryInterval: 1500
reconnectionTimeout: 3000
failedAttempts: 3
password: null
subscriptionsPerConnection: 5
clientName: null
loadBalancer: !<org.redisson.connection.balancer.RoundRobinLoadBalancer> {}
subscriptionConnectionMinimumIdleSize: 1
subscriptionConnectionPoolSize: 50
slaveConnectionMinimumIdleSize: 10
slaveConnectionPoolSize: 64
masterConnectionMinimumIdleSize: 10
masterConnectionPoolSize: 64
readMode: "SLAVE"
subscriptionMode: "SLAVE"
sentinelAddresses:
- "redis://redis-sentinel:26379"
masterName: "redismaster"
database: 0
threads: 0
nettyThreads: 0
codec: !<org.redisson.codec.JsonJacksonCodec> {}
useLinuxNativeEpoll: false
Redis is up. It finds the servers. I don't see any errors.
Now when I go to say the manager to test. It will do a round-robin load balance. I log into the first server and I get a session. I refresh, it doesn't seem to pull up the correct session and acts like i never logged in. The cookie is still set. I refresh a few times to get back to the first server and I'm still logged in.
Any ideas about what I am missing?