redis集群连接不上

Blade 未结 0 410

生产环境中,单体的SpringBoot版本:配置如下:

a684ffb2d0e8b9e90b931fcabfef0d4.png

打开登录页获取验证码就报错如下:

2023-03-27 08:56:46.341  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.

2023-03-27 08:56:46.471  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 114ms. Found 0 Redis repository interfaces.

org.springframework.data.redis.RedisConnectionFailureException: Redis connection failed; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to [RedisURI [host='10.0.81.11', port=6379], RedisURI [host='10.0.81.10', port=6379], RedisURI [host='10.0.81.9', port=6379], RedisURI [host='10.0.81.7', port=6379], RedisURI [host='10.0.81.5', port=6379], RedisURI [host='10.0.81.3', port=6379]]

at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:66)

at org.springframework.data.redis.connection.lettuce.LettuceFutureUtils.join(LettuceFutureUtils.java:74)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionProvider.getConnection(LettuceConnectionProvider.java:53)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1417)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1205)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1188)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getClusterConnection(LettuceConnectionFactory.java:378)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:355)

at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:134)

at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:97)

at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:84)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:215)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188)

at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96)

at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:256)

at org.springframework.data.redis.core.ValueOperations.set(ValueOperations.java:75)

at com.dmf.core.redis.cache.EmsRedis.setEx(EmsRedis.java:70)

Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to [RedisURI [host='10.0.81.11', port=6379], RedisURI [host='10.0.81.10', port=6379], RedisURI [host='10.0.81.9', port=6379], RedisURI [host='10.0.81.7', port=6379], RedisURI [host='10.0.81.5', port=6379], RedisURI [host='10.0.81.3', port=6379]]

at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)

at io.lettuce.core.cluster.RedisClusterClient.lambda$transformAsyncConnectionException$32(RedisClusterClient.java:1136)

at io.lettuce.core.cluster.RedisClusterClient$$Lambda$1230/00000000203D6600.apply(Unknown Source)

at io.lettuce.core.RedisPublisher$ImmediateSubscriber.onError(RedisPublisher.java:890)

at io.lettuce.core.RedisPublisher$State.onError(RedisPublisher.java:687)

at io.lettuce.core.RedisPublisher$RedisSubscription.onError(RedisPublisher.java:344)

at io.lettuce.core.RedisPublisher$SubscriptionCommand.onError(RedisPublisher.java:800)

at io.lettuce.core.RedisPublisher$SubscriptionCommand.completeExceptionally(RedisPublisher.java:794)

at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:360)

at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:139)

at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:358)

org.springframework.data.redis.RedisConnectionFailureException: Redis connection failed; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to [RedisURI [host='10.0.81.11', port=6379], RedisURI [host='10.0.81.10', port=6379], RedisURI [host='10.0.81.9', port=6379], RedisURI [host='10.0.81.7', port=6379], RedisURI [host='10.0.81.5', port=6379], RedisURI [host='10.0.81.3', port=6379]]

at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:66)

at org.springframework.data.redis.connection.lettuce.LettuceFutureUtils.join(LettuceFutureUtils.java:74)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionProvider.getConnection(LettuceConnectionProvider.java:53)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1417)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1205)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1188)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getClusterConnection(LettuceConnectionFactory.java:378)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:355)

at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:134)

at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:97)

at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:84)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:215)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188)

at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96)

at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:256)

at org.springframework.data.redis.core.ValueOperations.set(ValueOperations.java:75)

at com.dmf.core.redis.cache.EmsRedis.setEx(EmsRedis.java:70)

Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to [RedisURI [host='10.0.81.11', port=6379], RedisURI [host='10.0.81.10', port=6379], RedisURI [host='10.0.81.9', port=6379], RedisURI [host='10.0.81.7', port=6379], RedisURI [host='10.0.81.5', port=6379], RedisURI [host='10.0.81.3', port=6379]]

at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)

at io.lettuce.core.cluster.RedisClusterClient.lambda$transformAsyncConnectionException$32(RedisClusterClient.java:1136)

at io.lettuce.core.cluster.RedisClusterClient$$Lambda$1230/00000000203D6600.apply(Unknown Source)

at io.lettuce.core.RedisPublisher$ImmediateSubscriber.onError(RedisPublisher.java:890)

at io.lettuce.core.RedisPublisher$State.onError(RedisPublisher.java:687)

at io.lettuce.core.RedisPublisher$RedisSubscription.onError(RedisPublisher.java:344)

at io.lettuce.core.RedisPublisher$SubscriptionCommand.onError(RedisPublisher.java:800)

at io.lettuce.core.RedisPublisher$SubscriptionCommand.completeExceptionally(RedisPublisher.java:794)

at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:360)

at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:139)

at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:358)

org.springframework.data.redis.RedisConnectionFailureException: Redis connection failed; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to [RedisURI [host='10.0.81.11', port=6379], RedisURI [host='10.0.81.10', port=6379], RedisURI [host='10.0.81.9', port=6379], RedisURI [host='10.0.81.7', port=6379], RedisURI [host='10.0.81.5', port=6379], RedisURI [host='10.0.81.3', port=6379]]

at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:66)

at org.springframework.data.redis.connection.lettuce.LettuceFutureUtils.join(LettuceFutureUtils.java:74)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionProvider.getConnection(LettuceConnectionProvider.java:53)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1417)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getNativeConnection(LettuceConnectionFactory.java:1205)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$SharedConnection.getConnection(LettuceConnectionFactory.java:1188)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getClusterConnection(LettuceConnectionFactory.java:378)

at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:355)

at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:134)

at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:97)

at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:84)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:215)

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188)

at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96)

at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:256)

at org.springframework.data.redis.core.ValueOperations.set(ValueOperations.java:75)

at com.dmf.core.redis.cache.EmsRedis.setEx(EmsRedis.java:70)

Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to [RedisURI [host='10.0.81.11', port=6379], RedisURI [host='10.0.81.10', port=6379], RedisURI [host='10.0.81.9', port=6379], RedisURI [host='10.0.81.7', port=6379], RedisURI [host='10.0.81.5', port=6379], RedisURI [host='10.0.81.3', port=6379]]

at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)

at io.lettuce.core.cluster.RedisClusterClient.lambda$transformAsyncConnectionException$32(RedisClusterClient.java:1136)

at io.lettuce.core.cluster.RedisClusterClient$$Lambda$1230/00000000203D6600.apply(Unknown Source)

at io.lettuce.core.RedisPublisher$ImmediateSubscriber.onError(RedisPublisher.java:890)

at io.lettuce.core.RedisPublisher$State.onError(RedisPublisher.java:687)

at io.lettuce.core.RedisPublisher$RedisSubscription.onError(RedisPublisher.java:344)

at io.lettuce.core.RedisPublisher$SubscriptionCommand.onError(RedisPublisher.java:800)

at io.lettuce.core.RedisPublisher$SubscriptionCommand.completeExceptionally(RedisPublisher.java:794)

at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:360)

at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:139)

at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:358)




集群的各个节点redis服务都是通的,程序配置单体都是正常访问的,请问还有啥原因还会导致这种连接不上。


回答
  • 消灭零回复
提交回复