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的登錄密碼沒有設置。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章