释放双眼,带上耳机,听听看~!
🤖 由 ChatGPT 生成的文章摘要
springboot启动错误日志如下
2023-03-29 21:42:50.857 ERROR [lettuce-eventExecutorLoop-3-2] com.abcdocker.fc.maas.gateway.config.GlobalErrorExceptionHandler:156 -[defaultExceptionHandler]
io.lettuce.core.RedisCommandTimeoutException: Command timed out after 6 second(s)
at io.lettuce.core.internal.ExceptionFactory.createTimeoutException(ExceptionFactory.java:53)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
解决方法:
完整错误输出如下org.springframework.dao.QueryTimeoutException: Redis command timed out; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out after 5 second(s)
开发反馈Redis cluster集群启动jar包失败,之前都正常。查阅资料后发现需要开发将连接池从lettuce改为jedis:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>