consul提示某服务service checks错误

启动某个微服务后,consul控制台看到该服务service checks有个错误。
访问

http://localhost:8500/v1/agent/checks

查看服务状态,提示该服务状态为down。访问output提供的地址,

http://192.168.1.102:5001/actuator/health

只是简单的提示了down。并没有详细信息。
修改yaml配置文件,添加如下配置:

management:
  endpoint:
    health:
      show-details: always

重启服务后,访问http://192.168.1.102:5001/actuator/health就可以看到详细的报错信息了。

{"status":"DOWN","details":{"diskSpace":{"status":"UP","details":{"total":499963174912,"free":412283940864,"threshold":10485760}},"db":{"status":"UP","details":{"database":"MySQL","hello":1}},"refreshScope":{"status":"UP"},"discoveryComposite":{"status":"UP","details":{"discoveryClient":{"status":"UP","details":{"services":["consul","waiter-authcenter-web","waiter-gateway-web"]}}}},"hystrix":{"status":"UP"},"redis":{"status":"DOWN","details":{"error":"org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: NOAUTH Authentication required."}}}}

可以看出来是redis在启动时候密码的问题了。
检查配置文件,是redis的登录密码没有设置。

发布了139 篇原创文章 · 获赞 35 · 访问量 18万+

猜你喜欢

转载自blog.csdn.net/kanglovejava/article/details/102967139
今日推荐