Spring Boot Actuator Health Returning DOWN

后端 未结 12 1077
面向向阳花
面向向阳花 2021-01-31 02:49

When I access the /health endpoint from my Spring Boot application (1.2.4.RELEASE) it is returning a status of DOWN:

{
    status: \"DO         


        
12条回答
  •  情话喂你
    2021-01-31 02:56

    If the health url shows "DOWN" or HTTP 503 - Service Unavailable error, then try adding the below property in application.properties

    URL - http://localhost:8080/actuator/health

    management.endpoint.health.show-details=always
    

    Now the url should show more than just DOWN. If Solr host is not reachable, then ignore the Solr check using the below exclusion -

    @SpringBootApplication(exclude = { SolrAutoConfiguration.class })
    

    Now the health should come up. The health check basically validates predefined health check internally (Example - DataSourceHealthIndicator, DiskSpaceHealthIndicator, CassandraHealthIndicator, etc).

    If one of the health indicator is down, the health will be down and you can see the error as a response after adding the property mentioned above to application.properties.

提交回复
热议问题