joyieldInc / predixy

A high performance and fully featured proxy for redis, support redis sentinel and redis cluster
BSD 3-Clause "New" or "Revised" License
1.48k stars 350 forks source link

Redis health check failed #178

Open davie5201314 opened 1 year ago

davie5201314 commented 1 year ago

springboot框架进行健康检测的时候,会抛异常 Redis health check failed

2023-09-15 11:10:20.219 | | | WARN | 1 | xxx-xxxx | k3s-master | [lettuce-nioEventLoop-4-1] | o.s.b.a.r.RedisReactiveHealthIndicator | Redis health check failed java.lang.IllegalArgumentException: Value must not be null at org.springframework.util.Assert.notNull(Assert.java:201) at org.springframework.boot.actuate.health.Health$Builder.withDetail(Health.java:248) at org.springframework.boot.actuate.redis.RedisHealth.up(RedisHealth.java:37) at org.springframework.boot.actuate.redis.RedisReactiveHealthIndicator.up(RedisReactiveHealthIndicator.java:74) at org.springframework.boot.actuate.redis.RedisReactiveHealthIndicator.lambda$getHealth$4(RedisReactiveHealthIndicator.java:70) at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:106) at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82) at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122) at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79) at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onNext(MonoFlatMapMany.java:250) at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82) at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82) at io.lettuce.core.RedisPublisher$ImmediateSubscriber.onNext(RedisPublisher.java:886) at io.lettuce.core.RedisPublisher$RedisSubscription.onNext(RedisPublisher.java:291) at io.lettuce.core.RedisPublisher$SubscriptionCommand.doOnComplete(RedisPublisher.java:773) at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:65) at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:63) at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:747) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:682) at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:599) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) 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:750)

caojiajun commented 1 year ago

应该是info命令的返回缺少一个字段,让RedisReactiveHealthIndicator判定为异常了