Getting issues while using Redisson Tomcat session manager to share one redis instance among multiple tomcats
See original GitHub issueHi,
I am trying to use one redis instance for multiple tomcats to make session storage centralized for my application. But i am getting below error.
org.redisson.client.RedisTimeoutException: Redis server response timeout (3000 ms) occured for command: (HGET) with params: [redisson:tomcat_session:793608B88C44BAB4E33D83A057A2BD09, PooledUnsafeDirectByteBuf(ridx: 0, widx: 9, cap: 256)] channel: [id: 0x9d152a45, L:/127.0.0.1:60560 - R:127.0.0.1/127.0.0.1:6379]
As far as i understood redisson is not able to get the session created previously and then it goes on to create a new one. Because of this every time i use application on one tomcat to login it creates new session and when i come to other tomcat to use the same application its not able to find the created session and goes on to create a new one.
But i do see all the sessions created in redis and being stored properly. Its just that redisson is not able to read the session.
Below are my config:
redisson.yml
singleServerConfig:
idleConnectionTimeout: 10000
pingTimeout: 1000
connectTimeout: 10000
timeout: 3000
retryAttempts: 3
retryInterval: 1500
password: null
subscriptionsPerConnection: 5
clientName: null
address: "redis://127.0.0.1:6379"
subscriptionConnectionMinimumIdleSize: 1
subscriptionConnectionPoolSize: 50
connectionMinimumIdleSize: 32
connectionPoolSize: 64
database: 0
dnsMonitoringInterval: 5000
threads: 0
nettyThreads: 0
codec: !<org.redisson.codec.JsonJacksonCodec> {}
transportMode: "NIO"
Context.xml:
<Manager className="org.redisson.tomcat.RedissonSessionManager"
configPath="${catalina.base}/conf/redisson.yml" readMode="REDIS" updateMode="DEFAULT"/>
I am using redisson 3.7.4
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (6 by maintainers)
Te s
It says JacksonParser needs an empty constructor in your class to be able to decode it from json
Fix works well for me! Thanks @mrniko!