-
Couldn't load subscription status.
- Fork 1.1k
Closed
Labels
status: waiting-for-feedbackWe need additional information before we can continueWe need additional information before we can continue
Description
Bug Report
yes
Current Behavior
lettuce upgrade from 5.0.5.RELEASE to 5.3.2.RELEASE, together with springboot from 2.0.6.RELEASE to 2.3.2.RELEASE,after upgrade, the application cannot start up because it cannot connect to Redis cluster.
Before upgrade, nothing wrong ever happened.
Stack trace
2021-09-06 17:40:24.492 [main] WARN [TraceId=,SpanId=] o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource [org/springframework/boot/autoconfigure/session/RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisException: Cannot retrieve initial cluster partitions from initial URIs [RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI []]
2021-09-06 17:40:24.504 [main] INFO [TraceId=,SpanId=] o.s.scheduling.concurrent.ThreadPoolTaskScheduler - Shutting down ExecutorService
2021-09-06 17:40:24.514 [lettuce-nioEventLoop-4-6] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.514 [lettuce-nioEventLoop-4-1] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.514 [lettuce-nioEventLoop-4-5] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.514 [lettuce-nioEventLoop-4-4] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.514 [lettuce-nioEventLoop-4-3] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.514 [lettuce-nioEventLoop-4-2] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.519 [lettuce-eventExecutorLoop-1-2] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.519 [lettuce-eventExecutorLoop-1-8] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : Command timed out after 12 second(s)
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 12 second(s)
at io.lettuce.core.ExceptionFactory.createTimeoutException(ExceptionFactory.java:51)
at io.lettuce.core.protocol.CommandExpiryWriter.lambda$potentiallyExpire$0(CommandExpiryWriter.java:172)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:24.523 [main] INFO [TraceId=,SpanId=] o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Shutting down ExecutorService 'getAsyncExecutor'
2021-09-06 17:40:24.534 [lettuce-nioEventLoop-4-3] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : java.nio.channels.ClosedChannelException
2021-09-06 17:40:24.534 [lettuce-nioEventLoop-4-2] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : java.nio.channels.ClosedChannelException
2021-09-06 17:40:24.534 [lettuce-nioEventLoop-4-1] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : java.nio.channels.ClosedChannelException
2021-09-06 17:40:24.534 [lettuce-nioEventLoop-4-4] WARN [TraceId=,SpanId=] i.l.core.cluster.topology.ClusterTopologyRefresh - Unable to connect to : java.nio.channels.ClosedChannelException
2021-09-06 17:40:24.645 [main] INFO [TraceId=,SpanId=] o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Shutting down ExecutorService
2021-09-06 17:40:25.666 [main] WARN [TraceId=,SpanId=] z.reporter.AsyncReporter$BoundedAsyncReporter - Timed out waiting for in-flight spans to send
2021-09-06 17:40:25.672 [main] INFO [TraceId=,SpanId=] com.netflix.discovery.DiscoveryClient - Shutting down DiscoveryClient ...
2021-09-06 17:40:28.355 [main] INFO [TraceId=,SpanId=] com.netflix.discovery.DiscoveryClient - Unregistering ...
2021-09-06 17:40:28.374 [main] INFO [TraceId=,SpanId=] com.netflix.discovery.DiscoveryClient - Completed shut down of DiscoveryClient
2021-09-06 17:40:28.375 [main] INFO [TraceId=,SpanId=] org.apache.catalina.core.StandardService - Stopping service [Tomcat]
2021-09-06 17:40:28.410 [main] WARN [TraceId=,SpanId=] org.apache.catalina.loader.WebappClassLoaderBase - The web application [ui] appears to have started a thread named [RxIoScheduler-1 (Evictor)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
2021-09-06 17:40:28.412 [main] INFO [TraceId=,SpanId=] c.a.d.c.c.a.l.ApplicationFailedEventListener - ------------------------------
2021-09-06 17:40:28.413 [main] INFO [TraceId=,SpanId=] c.a.d.c.c.a.l.ApplicationFailedEventListener - [xxx]启动失败
2021-09-06 17:40:28.414 [main] INFO [TraceId=,SpanId=] c.a.d.c.c.a.l.ApplicationFailedEventListener - ------------------------------
2021-09-06 17:40:28.431 [main] INFO [TraceId=,SpanId=] o.s.b.a.l.ConditionEvaluationReportLoggingListener -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-09-06 17:40:28.442 [main] ERROR [TraceId=,SpanId=] org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource [org/springframework/boot/autoconfigure/session/RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisException: Cannot retrieve initial cluster partitions from initial URIs [RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI []]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1794)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at com.test.test.common.core.application.testApplication.run(TestApplication.java:24)
at com.test.test.UiApplication.main(UiApplication.java:11)
Caused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisException: Cannot retrieve initial cluster partitions from initial URIs [RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI []]
at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:109)
at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1225)
at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1206)
at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getClusterConnection(LettuceConnectionFactory.java:374)
at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:351)
at org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet(RedisHttpSessionConfiguration.java:331)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790)
... 16 common frames omitted
Caused by: io.lettuce.core.RedisException: Cannot retrieve initial cluster partitions from initial URIs [RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI [], RedisURI []]
at io.lettuce.core.cluster.RedisClusterClient.doLoadPartitions(RedisClusterClient.java:872)
at io.lettuce.core.cluster.RedisClusterClient.loadPartitions(RedisClusterClient.java:841)
at io.lettuce.core.cluster.RedisClusterClient.initializePartitions(RedisClusterClient.java:816)
at io.lettuce.core.cluster.RedisClusterClient.getPartitions(RedisClusterClient.java:826)
at org.springframework.data.redis.connection.lettuce.ClusterConnectionProvider.getConnectionAsync(ClusterConnectionProvider.java:92)
at org.springframework.data.redis.connection.lettuce.ClusterConnectionProvider.getConnectionAsync(ClusterConnectionProvider.java:40)
at org.springframework.data.redis.connection.lettuce.LettuceConnectionProvider.getConnection(LettuceConnectionProvider.java:53)
at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.lambda$null$0(LettucePoolingConnectionProvider.java:97)
at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:211)
at io.lettuce.core.support.ConnectionPoolSupport$RedisPooledObjectFactory.create(ConnectionPoolSupport.java:201)
at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:58)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:899)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:354)
at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:122)
at io.lettuce.core.support.ConnectionPoolSupport$1.borrowObject(ConnectionPoolSupport.java:117)
at org.springframework.data.redis.connection.lettuce.LettucePoolingConnectionProvider.getConnection(LettucePoolingConnectionProvider.java:103)
... 23 common frames omitted
Process finished with exit code 1Input Code
Input Code
// your code here;after checking the log on server, I found that no lettuce clients connected to the server, however, when i turn the loglevel of client to debug, it shows that "Connecting to Reids at xxxxxx success".
Expected behavior/code
Environment
- Lettuce version(s): [e.g. 5.3.2.RELEASE]
- Redis version: [3.2.11 cluster]
Possible Solution
Additional context
Metadata
Metadata
Assignees
Labels
status: waiting-for-feedbackWe need additional information before we can continueWe need additional information before we can continue