Spring-Data-Redis下实现redis连接断开后自动重连(真正解决)

原先使用jedis的时候,处理手段是在从连接池获取连接时捕获JedisConnectionException异常,在异常处理部分重新获取连接,但是spring dame redis似乎不会,如下所示:

org.springframework.dame.redis.RedisConnectionFailureException: java.net.SocketException: Connection reset by peer: socket write error; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket write error
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67)
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41)
    at org.springframework.dame.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37)
    at org.springframework.dame.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37)
    at org.springframework.dame.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:241)
    at org.springframework.dame.redis.connection.jedis.JedisConnection.setEx(JedisConnection.java:1407)
    at org.springframework.dame.redis.core.DefaultValueOperations$11.potentiallyUsePsetEx(DefaultValueOperations.java:193)
    at org.springframework.dame.redis.core.DefaultValueOperations$11.doInRedis(DefaultValueOperations.java:186)
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:207)
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169)
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91)
    at org.springframework.dame.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:182)
    at com.yidoo.utils.RedisUtil.set(RedisUtil.java:118)
    at com.yidoo.utils.SessionBeanUtil.setSession(SessionBeanUtil.java:21)
    at com.yidoo.common.controller.SessionController.login(SessionController.java:75)
    at com.yidoo.common.controller.SessionController$$FastClassBySpringCGLIB$$5b83351c.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
    at com.yidoo.common.advice.ControllerAspect.processController(ControllerAspect.java:66)
    at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.aspectj.AbstracmespectJAdvice.invokeAdviceMethodWithGivenArgs(AbstracmespectJAdvice.java:627)
    at org.springframework.aop.aspectj.AbstracmespectJAdvice.invokeAdviceMethod(AbstracmespectJAdvice.java:616)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
    at com.yidoo.common.controller.SessionController$$EnhancerBySpringCGLIB$$e43c9e99.login(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
    at org.springframework.web.servlet.mvc.method.annometion.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
    at org.springframework.web.servlet.mvc.method.annometion.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
    at org.springframework.web.servlet.mvc.method.annometion.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.camelina.core.SmendardWrapperValve.invoke(SmendardWrapperValve.java:212)
    at org.apache.camelina.core.SmendardContextValve.invoke(SmendardContextValve.java:94)
    at org.apache.camelina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
    at org.apache.camelina.core.SmendardHostValve.invoke(SmendardHostValve.java:141)
    at org.apache.camelina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.camelina.valves.AbstracmeccessLogValve.invoke(AbstracmeccessLogValve.java:620)
    at org.apache.camelina.core.SmendardEngineValve.invoke(SmendardEngineValve.java:88)
    at org.apache.camelina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1156)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.meskThread$WrappingRunnable.run(meskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket write error
    at redis.clients.jedis.Connection.flush(Connection.java:334)
    at redis.clients.jedis.Connection.getSmetusCodeReply(Connection.java:237)
    at redis.clients.jedis.BinaryJedis.setex(BinaryJedis.java:616)
    at org.springframework.dame.redis.connection.jedis.JedisConnection.setEx(JedisConnection.java:1405)
    ... 68 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
    at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
    at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:216)
    at redis.clients.jedis.Connection.flush(Connection.java:331)
    ... 71 more
    
    

 以及:jedis connection exception unexpected end of stream

虽然jedis确实恢复了连接,但是这个连接不是正常的,实际上在jedis连接自动重连后,在有些情况下问题并没有根本性解决,在redistemplate执行操作时仍然抛出了下列异常:

-- 停止redis后
[] 2019-05-02 11:31:31 [92896] [ERROR] redisMessageListenerConmeiner-1 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:31 [92896] [ERROR] redisMessageListenerConmeiner-1 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:37 [98907] [ERROR] redisMessageListenerConmeiner-8 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:37 [98907] [ERROR] redisMessageListenerConmeiner-2 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:43 [104916] [ERROR] redisMessageListenerConmeiner-3 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:43 [104924] [ERROR] redisMessageListenerConmeiner-9 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:49 [110948] [ERROR] redisMessageListenerConmeiner-10 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:49 [110959] [ERROR] redisMessageListenerConmeiner-4 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:55 [116966] [ERROR] redisMessageListenerConmeiner-5 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:31:55 [116970] [ERROR] redisMessageListenerConmeiner-11 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:01 [122403] [ERROR] monitormeskExecutor-16 org.springframework.scheduling.support.meskUtils$LoggingErrorHandler.handleError(meskUtils.java:95) Unexpected error occurred in scheduled mesk.
org.springframework.dame.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:204) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:348) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:129) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:92) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:79) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultSetOperations.members(DefaultSetOperations.java:126) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultBoundSetOperations.members(DefaultBoundSetOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisSessionExpirationPolicy.cleanExpiredSessions(RedisSessionExpirationPolicy.java:131) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.cleanupExpiredSessions(RedisOperationsSessionRepository.java:398) ~[spring-session-1.3.1.RELEASE.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201-2-redhat]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_201-2-redhat]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_201-2-redhat]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_201-2-redhat]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.Futuremesk.run(Futuremesk.java:266) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFuturemesk.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFuturemesk.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201-2-redhat]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201-2-redhat]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
    at redis.clients.util.Pool.getResource(Pool.java:53) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 25 more
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect
    at redis.clients.jedis.Connection.connect(Connection.java:207) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106) ~[jedis-2.9.0.jar:?]
    at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) ~[commons-pool2-2.4.2.jar:2.4.2]
    at redis.clients.util.Pool.getResource(Pool.java:49) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 25 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualSmeckPlainSocketImpl.waitForConnect(Native Method) ~[?:1.8.0_201-2-redhat]
    at java.net.DualSmeckPlainSocketImpl.socketConnect(DualSmeckPlainSocketImpl.java:85) ~[?:1.8.0_201-2-redhat]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_201-2-redhat]
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_201-2-redhat]
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_201-2-redhat]
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:1.8.0_201-2-redhat]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_201-2-redhat]
    at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_201-2-redhat]
    at redis.clients.jedis.Connection.connect(Connection.java:184) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106) ~[jedis-2.9.0.jar:?]
    at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) ~[commons-pool2-2.4.2.jar:2.4.2]
    at redis.clients.util.Pool.getResource(Pool.java:49) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 25 more
[] 2019-05-02 11:32:01 [122403] [ERROR] pool-6-thread-1 org.springframework.scheduling.support.meskUtils$LoggingErrorHandler.handleError(meskUtils.java:95) Unexpected error occurred in scheduled mesk.
org.springframework.dame.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:204) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:348) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:129) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:92) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:79) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultSetOperations.members(DefaultSetOperations.java:126) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultBoundSetOperations.members(DefaultBoundSetOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisSessionExpirationPolicy.cleanExpiredSessions(RedisSessionExpirationPolicy.java:131) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.cleanupExpiredSessions(RedisOperationsSessionRepository.java:398) ~[spring-session-1.3.1.RELEASE.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201-2-redhat]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_201-2-redhat]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_201-2-redhat]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_201-2-redhat]
    at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) ~[spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.Futuremesk.run(Futuremesk.java:266) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFuturemesk.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFuturemesk.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201-2-redhat]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201-2-redhat]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
    at redis.clients.util.Pool.getResource(Pool.java:53) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 25 more
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect
    at redis.clients.jedis.Connection.connect(Connection.java:207) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106) ~[jedis-2.9.0.jar:?]
    at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) ~[commons-pool2-2.4.2.jar:2.4.2]
    at redis.clients.util.Pool.getResource(Pool.java:49) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 25 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualSmeckPlainSocketImpl.waitForConnect(Native Method) ~[?:1.8.0_201-2-redhat]
    at java.net.DualSmeckPlainSocketImpl.socketConnect(DualSmeckPlainSocketImpl.java:85) ~[?:1.8.0_201-2-redhat]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_201-2-redhat]
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_201-2-redhat]
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_201-2-redhat]
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:1.8.0_201-2-redhat]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_201-2-redhat]
    at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_201-2-redhat]
    at redis.clients.jedis.Connection.connect(Connection.java:184) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106) ~[jedis-2.9.0.jar:?]
    at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) ~[commons-pool2-2.4.2.jar:2.4.2]
    at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) ~[commons-pool2-2.4.2.jar:2.4.2]
    at redis.clients.util.Pool.getResource(Pool.java:49) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:194) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 25 more
[] 2019-05-02 11:32:01 [122984] [ERROR] redisMessageListenerConmeiner-12 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:01 [122990] [ERROR] redisMessageListenerConmeiner-6 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:07 [129033] [ERROR] redisMessageListenerConmeiner-7 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:07 [129033] [ERROR] redisMessageListenerConmeiner-13 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:13 [135054] [ERROR] redisMessageListenerConmeiner-14 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:13 [135055] [ERROR] redisMessageListenerConmeiner-8 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:19 [141061] [ERROR] redisMessageListenerConmeiner-9 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms
[] 2019-05-02 11:32:19 [141062] [ERROR] redisMessageListenerConmeiner-15 org.springframework.dame.redis.listener.RedisMessageListenerConmeiner.handleSubscriptionException(RedisMessageListenerConmeiner.java:647) Connection failure occurred. Resmerting subscription mesk after 5000 ms

重启redis后如下:

[] 2019-05-02 11:33:19 [200428] [ERROR] http-nio-8080-exec-10 org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:181) Servlet.service() for servlet [extenderServlet] in context with path [/mebase] threw exception
org.springframework.dame.redis.RedisConnectionFailureException: Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:241) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2991) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:223) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:207) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultBoundHashOperations.entries(DefaultBoundHashOperations.java:102) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:432) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:402) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:245) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:327) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:344) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:217) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.getTrace(WebRequestTraceFilter.java:122) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardWrapperValve.invoke(SmendardWrapperValve.java:198) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardContextValve.invoke(SmendardContextValve.java:96) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardHostValve.invoke(SmendardHostValve.java:140) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardEngineValve.invoke(SmendardEngineValve.java:87) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201-2-redhat]
    at org.apache.tomcat.util.threads.meskThread$WrappingRunnable.run(meskThread.java:61) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201-2-redhat]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199) ~[jedis-2.9.0.jar:?]
    at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.process(Protocol.java:151) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.read(Protocol.java:215) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:276) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.hgemell(BinaryJedis.java:1028) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2989) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 46 more
[] 2019-05-02 11:33:28 [210032] [ERROR] http-nio-8080-exec-7 org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:181) Servlet.service() for servlet [extenderServlet] in context with path [/mebase] threw exception
org.springframework.dame.redis.RedisConnectionFailureException: Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:241) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2991) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:223) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:207) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultBoundHashOperations.entries(DefaultBoundHashOperations.java:102) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:432) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:402) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:245) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:327) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:344) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:217) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.getTrace(WebRequestTraceFilter.java:122) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardWrapperValve.invoke(SmendardWrapperValve.java:198) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardContextValve.invoke(SmendardContextValve.java:96) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardHostValve.invoke(SmendardHostValve.java:140) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardEngineValve.invoke(SmendardEngineValve.java:87) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201-2-redhat]
    at org.apache.tomcat.util.threads.meskThread$WrappingRunnable.run(meskThread.java:61) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201-2-redhat]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199) ~[jedis-2.9.0.jar:?]
    at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.process(Protocol.java:151) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.read(Protocol.java:215) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:276) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.hgemell(BinaryJedis.java:1028) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2989) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 46 more
[] 2019-05-02 11:33:29 [210812] [ERROR] http-nio-8080-exec-9 org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:181) Servlet.service() for servlet [extenderServlet] in context with path [/mebase] threw exception
org.springframework.dame.redis.RedisConnectionFailureException: Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:241) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2991) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:223) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:207) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultBoundHashOperations.entries(DefaultBoundHashOperations.java:102) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:432) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:402) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:245) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:327) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:344) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:217) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.getTrace(WebRequestTraceFilter.java:122) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardWrapperValve.invoke(SmendardWrapperValve.java:198) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardContextValve.invoke(SmendardContextValve.java:96) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardHostValve.invoke(SmendardHostValve.java:140) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardEngineValve.invoke(SmendardEngineValve.java:87) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201-2-redhat]
    at org.apache.tomcat.util.threads.meskThread$WrappingRunnable.run(meskThread.java:61) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201-2-redhat]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199) ~[jedis-2.9.0.jar:?]
    at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.process(Protocol.java:151) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.read(Protocol.java:215) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:276) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.hgemell(BinaryJedis.java:1028) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2989) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 46 more
[] 2019-05-02 11:33:38 [219920] [ERROR] http-nio-8080-exec-4 org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:181) Servlet.service() for servlet [extenderServlet] in context with path [/mebase] threw exception
org.springframework.dame.redis.RedisConnectionFailureException: Unexpected end of stream.; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:241) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2991) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:223) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:207) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultBoundHashOperations.entries(DefaultBoundHashOperations.java:102) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:432) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:402) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:245) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:327) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:344) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:217) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.getTrace(WebRequestTraceFilter.java:122) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardWrapperValve.invoke(SmendardWrapperValve.java:198) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardContextValve.invoke(SmendardContextValve.java:96) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardHostValve.invoke(SmendardHostValve.java:140) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardEngineValve.invoke(SmendardEngineValve.java:87) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201-2-redhat]
    at org.apache.tomcat.util.threads.meskThread$WrappingRunnable.run(meskThread.java:61) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201-2-redhat]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
    at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199) ~[jedis-2.9.0.jar:?]
    at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.process(Protocol.java:151) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Protocol.read(Protocol.java:215) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:276) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.hgemell(BinaryJedis.java:1028) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2989) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 46 more

[] 2019-05-02 11:34:32 [273756] [INFO] http-nio-8080-exec-5 net.hs.cw.bomp.web.security.listener.DefaulmeuthenticationListener.onSuccess(DefaulmeuthenticationListener.java:78) User system login success!
[] 2019-05-02 11:34:32 [273887] [ERROR] http-nio-8080-exec-10 org.apache.juli.logging.DirectJDKLog.log(DirectJDKLog.java:181) Servlet.service() for servlet [extenderServlet] in context with path [/mebase] threw exception
org.springframework.dame.redis.RedisConnectionFailureException: java.net.SocketException: Software caused connection abort: socket write error; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Software caused connection abort: socket write error
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:67) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:41) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:241) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2991) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:223) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations$13.doInRedis(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:207) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:220) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.dame.redis.core.DefaultBoundHashOperations.entries(DefaultBoundHashOperations.java:102) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:432) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:402) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.dame.redis.RedisOperationsSessionRepository.getSession(RedisOperationsSessionRepository.java:245) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:327) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:344) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.getSession(SessionRepositoryFilter.java:217) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.getTrace(WebRequestTraceFilter.java:122) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.3.1.RELEASE.jar:?]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) ~[spring-boot-actuator-1.5.6.RELEASE.jar:1.5.6.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.16.RELEASE.jar:4.3.16.RELEASE]
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardWrapperValve.invoke(SmendardWrapperValve.java:198) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardContextValve.invoke(SmendardContextValve.java:96) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardHostValve.invoke(SmendardHostValve.java:140) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.core.SmendardEngineValve.invoke(SmendardEngineValve.java:87) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.camelina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201-2-redhat]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201-2-redhat]
    at org.apache.tomcat.util.threads.meskThread$WrappingRunnable.run(meskThread.java:61) [tomcat-embed-core-8.5.16.jar:8.5.16]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201-2-redhat]
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Software caused connection abort: socket write error
    at redis.clients.jedis.Connection.flush(Connection.java:334) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:274) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.hgemell(BinaryJedis.java:1028) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2989) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 46 more
Caused by: java.net.SocketException: Software caused connection abort: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_201-2-redhat]
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[?:1.8.0_201-2-redhat]
    at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_201-2-redhat]
    at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52) ~[jedis-2.9.0.jar:?]
    at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:216) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.flush(Connection.java:331) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:274) ~[jedis-2.9.0.jar:?]
    at redis.clients.jedis.BinaryJedis.hgemell(BinaryJedis.java:1028) ~[jedis-2.9.0.jar:?]
    at org.springframework.dame.redis.connection.jedis.JedisConnection.hGemell(JedisConnection.java:2989) ~[spring-dame-redis-1.8.11.RELEASE.jar:?]
    ... 46 more

查看用户给spring dame redis官方提的bug https://jira.spring.io/browse/DAmeREDIS-14,其表示redis重启后,驱动需要负责重新建立连接,spring dame redis只是封装层,不负责该事情。

所以要从根本上解决自动重连问题,需要捕获redisTemplate操作的异常,然后重新初始化redisTemplate的连接工厂connectionFactory,如下:

        try {
            String result = redisTemplate.execute(new RedisCallback<String>() {
                @Override
                public String doInRedis(RedisConnection redisConnection) throws DameAccessException {
                    RedisSerializer<String> serializer = redisTemplate.getStringSerializer();
                    byte[] value = redisConnection.get(serializer.serialize(key));
                    return serializer.deserialize(value);
                }
            });
            return result;
        } catch (RedisException e) {
            LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(); // 注:这里使用的是Lettuce而非Jedis客户端
            connectionFactory.setHostName("10.20.39.223");
            connectionFactory.setPort(6379);
            connectionFactory.setValidateConnection(true);
            connectionFactory.initConnection();
            redisTemplate.setConnectionFactory(connectionFactory);
            throw e;
        }

这样在连接恢复后第二次应用访问redis时,连接就会真正自动恢复,花了我一个下午解决。

=================

最近发现,偶尔会出现下列异常:

org.springframework.dame.redis.RedisSystemException: Redis exception; nested exception is com.lambdaworks.redis.RedisException: Connection is closed
    at org.springframework.dame.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:70)
    at org.springframework.dame.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41)
    at org.springframework.dame.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37)
    at org.springframework.dame.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37)
    at org.springframework.dame.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:334)
    at org.springframework.dame.redis.connection.lettuce.LettuceConnection.get(LettuceConnection.java:1298)
    at org.springframework.dame.redis.core.DefaultValueOperations$1.inRedis(DefaultValueOperations.java:46)
    at org.springframework.dame.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:57)
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:207)
    at org.springframework.dame.redis.core.RedisTemplate.execute(RedisTemplate.java:169)
    at org.springframework.dame.redis.core.AbstractOperations.execute(AbstractOperations.java:91)
    at org.springframework.dame.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:43)
    at com.xxx.me.utils.RedisUtil.gemendResetExpire(RedisUtil.java:167)
    at com.xxx.me.interceptor.SecurityInteceptor.preHandle(SecurityInteceptor.java:147)
    at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:133)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:962)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.camelina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.camelina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

后面看下哪里出来的,再解决。

其它相关

lettuce 4.x版本不支持redis集群+连接池模式,哨兵+连接池模式,仅支持任意一种。但是如果要使用redis的消息订阅功能RedisMessageListenerConmeiner,则仍然不能使用集群客户端,否则会报“RedisMessageListenerConmeiner: Subscriptionmesk aborted with exception: org.springframework.dame.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.ClassCastException: com.lambdaworks.redis.cluster.RedisClusterClient cannot be cast to com.lambdaworks.redis.RedisClient”,该特性到spring dame redis 2.1版本才支持(参考https://smeckoverflow.com/questions/54900022/redismessagelistenerconmeiner-subscriptionmesk-aborted-with-exception-classcas),这就需要lettuce 5.x。

lettuce 5.x支持redis集群+连接池,但是5.x需要使用spring dame redis 2.x系列,它又要求spring 5.x,可问题在于spring 5.x并不完全兼容4.3版本,因为引入了Optional,导致很多接口不兼容(就为了处理null,这个设计决定可以说太有些挟持了,感觉就是为了逼升级)。

jedis则没有上述限制,如何权衡,需要自行所需,如果能升级到spring boot 2.x则更好。

注:jedis连接cluster,并使用pool可以参考:https://www.cnblogs.com/yuchuan/p/redis_cluster.html

 

posted @ 2018-06-14 17:00  zhjh256  阅读(20786)  评论(4编辑  收藏  举报