RedisHealthIndicator:HealthcheckfailedSpringb。。。
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
原因: 项目配置了Spring 健康检查.
spring boot启动之后,spring boot Actuator会对其进行健康检查,对redis检查并没有通过
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId>
</depeቤተ መጻሕፍቲ ባይዱdency>
解决方案:
bootstrap.yml文件 中将自动健康检查关闭
management: health: redis: enabled: false
分析:估计是版本问题. 本地装一个redis,估计能通过检查.
登录后才能查看或发表评论立即登录或者逛逛博客园首页
RedisHealthIndicator: HealthcheckfailedSpringb。。。
错误日志
2021-01-22 17:54:51.568 [,] INFO --- [main] o.s.b.c.e.t.TomcatEmbeddedServletContainer-201 : Tomcat started on port(s): 8503 (http) 2021-01-22 17:54:51.574 [,] INFO --- [main] com.posp.ui.WebUiApplication-57 : Started WebUiApplication in 14.305 seconds (JVM running for 14.728) 2021-01-22 17:54:51.688 [,] WARN --- [RMI TCP Connection(4)-127.0.0.1] o.s.b.a.health.RedisHealthIndicator-46 : Health check failed org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:204)
spring boot启动之后,spring boot Actuator会对其进行健康检查,对redis检查并没有通过
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId>
</depeቤተ መጻሕፍቲ ባይዱdency>
解决方案:
bootstrap.yml文件 中将自动健康检查关闭
management: health: redis: enabled: false
分析:估计是版本问题. 本地装一个redis,估计能通过检查.
登录后才能查看或发表评论立即登录或者逛逛博客园首页
RedisHealthIndicator: HealthcheckfailedSpringb。。。
错误日志
2021-01-22 17:54:51.568 [,] INFO --- [main] o.s.b.c.e.t.TomcatEmbeddedServletContainer-201 : Tomcat started on port(s): 8503 (http) 2021-01-22 17:54:51.574 [,] INFO --- [main] com.posp.ui.WebUiApplication-57 : Started WebUiApplication in 14.305 seconds (JVM running for 14.728) 2021-01-22 17:54:51.688 [,] WARN --- [RMI TCP Connection(4)-127.0.0.1] o.s.b.a.health.RedisHealthIndicator-46 : Health check failed org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:204)