【问题标题】:consul health check: 503 Service Unavailable领事健康检查:503 服务不可用
【发布时间】:2016-08-05 19:50:22
【问题描述】:

我在我的应用程序中使用 spring cloud consul。当我启动应用程序时,我没有例外(在领事中注册的服务)。但是当领事检查健康时我得到了这个错误:

HTTP GET https://xxxxxxxxxx:8181/health: 503 Service Unavailable Output: {
"status" : "DOWN"
}

这是我的配置文件:

   spring:
    application:
      name: @pom.artifactId@
    cloud:
     config:
       enabled: false

   consul:
     config:
       enabled: true
        host: localhost
        port: 8500
     discovery:
        scheme: https

  endpoints:
   health:
    sensitive: false
   restart:
     enabled: true
   shutdown:
     enabled: true

我的pom如下:

     <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-consul-all</artifactId>
        <version>1.0.0.M6</version>
    </dependency>

【问题讨论】:

    标签: spring spring-boot spring-cloud consul


    【解决方案1】:

    您的配置似乎有点不正确。 最新的documentation包含如下配置示例:

    spring:
      cloud:
        consul:
          host: localhost
          port: 8500
    

    顺便说一句:最新的spring-cloud-consul 版本是RC1

    【讨论】:

      猜你喜欢
      • 2021-12-18
      • 2020-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多