在 spring boot 升级到2.2.11.RELEASE后,我们看到以下错误。我认为第一次运行状况检查是否因以下错误而失败,但是当我调用运行状况端点时,我看到运行状况检查成功。
2020-12-28 05:42:08.840 WARN 1 --- [oundedElastic-8] osbarRedisReactiveHealthIndicator:Redis 健康检查失败 org.springframework.data.redis.RedisConnectionFailureException:无法连接到 Redis;嵌套异常是 io.lettuce.core.RedisConnectionException: Unable to connect to xc-dev-redis.xylem-cloud.com:6379 at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.translateException(LettuceConnectionFactory.java :1511) ~[spring-data-redis-2.2.11.RELEASE.jar!/:2.2.11.RELEASE] at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java: 1419)〜[spring-data-redis-2.2.11.RELEASE.jar!/:2.2.11.RELEASE]在org.springframework.data.redis.connection.lettuce。
这是来自健康端点的响应:
{
"status": "UP",
"components": {
"clientConfigServer": {
"status": "UNKNOWN",
"details": {
"error": "no property sources located"
}
},
"discoveryComposite": {
"description": "Discovery Client not initialized",
"status": "UNKNOWN",
"components": {
"discoveryClient": {
"description": "Discovery Client not initialized",
"status": "UNKNOWN"
}
}
},
"diskSpace": {
"status": "UP",
"details": {
"total": 536858308608,
"free": 463599861760,
"threshold": 10485760
}
},
"hystrix": {
"status": "UP"
},
"kubernetes": {
"status": "UP",
"details": {
"inside": true,
"namespace": "dev",
"podName": "xc-api-gateway-647d8c4f5f-sfqx4",
"podIp": "10.16.64.36",
"serviceAccount": "default",
"nodeName": "ip-10-16-64-163.ec2.internal",
"hostIp": "10.16.64.163",
"labels": {
"app": "xc-api-gateway",
"draft": "draft-app",
"pod-template-hash": "647d8c4f5f"
}
}
},
"ping": {
"status": "UP"
},
"reactiveDiscoveryClients": {
"description": "Discovery Client not initialized",
"status": "UNKNOWN",
"components": {
"Kubernetes Reactive Discovery Client": {
"description": "Discovery Client not initialized",
"status": "UNKNOWN"
},
"Simple Reactive Discovery Client": {
"description": "Discovery Client not initialized",
"status": "UNKNOWN"
}
}
},
"redis": {
"status": "UP",
"details": {
"version": "5.0.5"
}
},
"refreshScope": {
"status": "UP"
}
}
}