spring-projects / spring-data-redis

Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-redis/
Apache License 2.0
1.77k stars 1.17k forks source link

RedisConnectionFailureException in Spring data redis #3028

Closed captainpro-eng closed 3 weeks ago

captainpro-eng commented 4 weeks ago

DEBUG [2024-10-25 21:05:20,021] i.l.core.RedisClient: Connecting to Redis at 192.168.196.52:6379 DEBUG [2024-10-25 21:05:20,023] i.l.c.p.CommandHandler: [channel=0x283e9cfa, [id: 0xbbf9ce11] (inactive), chid=0xb] channelRegistered() DEBUG [2024-10-25 21:05:20,023] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] channelActive() DEBUG [2024-10-25 21:05:20,023] i.l.c.p.DefaultEndpoint: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, epid=0xb] activateEndpointAndExecuteBufferedCommands 0 command(s) buffered DEBUG [2024-10-25 21:05:20,023] i.l.c.p.DefaultEndpoint: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, epid=0xb] activating endpoint DEBUG [2024-10-25 21:05:20,023] i.l.c.p.DefaultEndpoint: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, epid=0xb] flushCommands() DEBUG [2024-10-25 21:05:20,023] i.l.c.p.DefaultEndpoint: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, epid=0xb] flushCommands() Flushing 0 commands DEBUG [2024-10-25 21:05:20,024] i.l.c.p.ConnectionWatchdog: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, last known addr=/192.168.196.52:6379] channelActive() DEBUG [2024-10-25 21:05:20,024] i.l.c.p.ConnectionWatchdog: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, last known addr=/192.168.196.52:6379] channelActive() DEBUG [2024-10-25 21:05:20,024] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] channelActive() done DEBUG [2024-10-25 21:05:20,024] i.l.core.RedisClient: Connecting to Redis at 192.168.196.52:6379: Success DEBUG [2024-10-25 21:05:20,024] i.l.c.RedisChannelHandler: dispatching command SubscriptionCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.protocol.Command] DEBUG [2024-10-25 21:05:20,024] i.l.c.p.DefaultEndpoint: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, epid=0xb] write() writeAndFlush command ClusterCommand [command=SubscriptionCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.protocol.Command], redirections=0, maxRedirections=5] DEBUG [2024-10-25 21:05:20,024] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] write(ctx, ClusterCommand [command=SubscriptionCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.protocol.Command], redirections=0, maxRedirections=5], promise) DEBUG [2024-10-25 21:05:20,024] i.l.c.p.CommandEncoder: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379] writing command ClusterCommand [command=SubscriptionCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.protocol.Command], redirections=0, maxRedirections=5] DEBUG [2024-10-25 21:05:20,024] i.l.c.p.DefaultEndpoint: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, epid=0xb] write() done DEBUG [2024-10-25 21:05:20,025] i.l.c.p.ConnectionWatchdog: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, last known addr=/192.168.196.52:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@4454ba1d) DEBUG [2024-10-25 21:05:20,025] i.l.c.p.ConnectionWatchdog: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, last known addr=/192.168.196.52:6379] userEventTriggered(ctx, io.lettuce.core.ConnectionEvents$Activated@4454ba1d) DEBUG [2024-10-25 21:05:20,026] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Received: 1024 bytes, 1 commands in the stack DEBUG [2024-10-25 21:05:20,026] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Stack contains: 1 commands DEBUG [2024-10-25 21:05:20,026] i.l.c.p.RedisStateMachine: Decode LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand] DEBUG [2024-10-25 21:05:20,028] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: false DEBUG [2024-10-25 21:05:20,028] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Received: 16384 bytes, 1 commands in the stack DEBUG [2024-10-25 21:05:20,028] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Stack contains: 1 commands DEBUG [2024-10-25 21:05:20,028] i.l.c.p.RedisStateMachine: Decode LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand] ERROR [2024-10-25 21:05:20,031] c.g.p.c.s.RedisUserAccountService: Exception Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1092) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1065) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getClusterConnection(LettuceConnectionFactory.java:362) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:332) at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:132) at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:95) at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:82) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:211) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:171) at org.springframework.data.redis.core.RedisTemplate.getClientList(RedisTemplate.java:1168) at com.generalmobi.progate.cu.service.RedisUserAccountService.svGetBalance(RedisUserAccountService.java:115) at com.generalmobi.progate.pbs.api.UserAccountFC.getWalletBalance(UserAccountFC.java:71) 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:189) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:117) at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:106) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) 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:750) Caused by: io.lettuce.core.RedisConnectionException: Unable to connect at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:94) at io.lettuce.core.AbstractRedisClient.getConnection(AbstractRedisClient.java:261) at io.lettuce.core.cluster.RedisClusterClient.connect(RedisClusterClient.java:348) at org.springframework.data.redis.connection.lettuce.ClusterConnectionProvider.getConnection(ClusterConnectionProvider.java:85) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1085) ... 75 common frames omitted Caused by: java.lang.UnsupportedOperationException: null at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at io.lettuce.core.output.ArrayOutput.set(ArrayOutput.java:48) at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:373) at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:177) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:708) at io.lettuce.core.protocol.CommandHandler.decode0(CommandHandler.java:672) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:658) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:587) at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:556) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:583) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ... 1 common frames omitted DEBUG [2024-10-25 21:05:20,046] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: false DEBUG [2024-10-25 21:05:20,046] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Received: 65536 bytes, 1 commands in the stack DEBUG [2024-10-25 21:05:20,046] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Stack contains: 1 commands DEBUG [2024-10-25 21:05:20,046] i.l.c.p.RedisStateMachine: Decode LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand] DEBUG [2024-10-25 21:05:20,098] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: false DEBUG [2024-10-25 21:05:20,098] i.l.c.p.CommandHandler: [channel=0x7ef6ed9f, /192.168.196.63:32982 -> /192.168.196.52:6379, chid=0x9] Received: 7237 bytes, 1 commands in the stack DEBUG [2024-10-25 21:05:20,098] i.l.c.p.CommandHandler: [channel=0x7ef6ed9f, /192.168.196.63:32982 -> /192.168.196.52:6379, chid=0x9] Stack contains: 1 commands DEBUG [2024-10-25 21:05:20,098] i.l.c.p.RedisStateMachine: Decode LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand] DEBUG [2024-10-25 21:05:20,104] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: false DEBUG [2024-10-25 21:05:20,104] i.l.c.p.CommandHandler: [channel=0x1522410b, /192.168.196.63:32998 -> /192.168.196.52:6379, chid=0xa] Received: 7237 bytes, 1 commands in the stack DEBUG [2024-10-25 21:05:20,104] i.l.c.p.CommandHandler: [channel=0x1522410b, /192.168.196.63:32998 -> /192.168.196.52:6379, chid=0xa] Stack contains: 1 commands DEBUG [2024-10-25 21:05:20,104] i.l.c.p.RedisStateMachine: Decode LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand] DEBUG [2024-10-25 21:05:20,106] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: true DEBUG [2024-10-25 21:05:20,109] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: true DEBUG [2024-10-25 21:05:20,111] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: false DEBUG [2024-10-25 21:05:20,111] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Received: 7237 bytes, 1 commands in the stack DEBUG [2024-10-25 21:05:20,111] i.l.c.p.CommandHandler: [channel=0x283e9cfa, /192.168.196.63:33012 -> /192.168.196.52:6379, chid=0xb] Stack contains: 1 commands DEBUG [2024-10-25 21:05:20,111] i.l.c.p.RedisStateMachine: Decode LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand] DEBUG [2024-10-25 21:05:20,112] i.l.c.p.RedisStateMachine: Decoded LatencyMeteredCommand [type=COMMAND, output=ArrayOutput [output=[], error='null'], commandType=io.lettuce.core.cluster.ClusterCommand], empty stack: true