ran-jit / tomcat-cluster-redis-session-manager

Tomcat clustering redis session manager java client.
https://github.com/ran-jit/tomcat-cluster-redis-session-manager/wiki
GNU General Public License v3.0
440 stars 208 forks source link

findSession Error occurred while de-serializing the session object.. #65

Open posondlq opened 3 years ago

posondlq commented 3 years ago

[http-nio-8080-exec-5] tomcat.request.session.redis.SessionManager.findSession Error occurred while de-serializing the session object.. java.lang.NullPointerException at org.apache.catalina.session.StandardSession.doReadObject(StandardSession.java:1604) at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1077) at tomcat.request.session.Session.readObjectData(Session.java:125) at tomcat.request.session.SerializationUtil.deserializeSessionData(SerializationUtil.java:74) at tomcat.request.session.redis.SessionManager.findSession(SessionManager.java:160) at tomcat.request.session.redis.SessionManager.findSession(SessionManager.java:28) at org.apache.catalina.connector.Request.doGetSession(Request.java:3008) at org.apache.catalina.connector.Request.getSessionInternal(Request.java:2729) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:463) at tomcat.request.session.redis.SessionHandlerValve.invoke(SessionHandlerValve.java:29) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

For this error, I am using the following library file:

tomcat-cluster-redis-session-manager-3.0 jedis-2.9.0.jar one server tomcat 8.5.34 the other server tomcat 8.5.65

There are two services, one writes to session, and the other reports an error when reading.

posondlq commented 3 years ago

After step into tracking,Session newSession = createEmptySession(); newSession is null。