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的登录密码没有设置。

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值