Spring Boot Actuator Health Returning DOWN

后端 未结 12 1084
面向向阳花
面向向阳花 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 03:00

    In your Spring properties, set endpoints.health.sensitive = false. The /health endpoint will then return the list of various health indicators and you can debug from there.

    For a production environment you should enable security around the /health endpoint.

    Edit

    As Vincent pointed out below, you'll also need management.security.enabled = false if the health endpoint is secured, which seems to be the default in more recent versions of Spring Boot.

    A common issue that I've seen with Spring Boot out of the box is that it auto-configures Solr, and without additional configuration the /health endpoint indicates that Solr is DOWN. An easy way to fix this is to disable the Solr auto configuration in your Application.java with this annotation: @SpringBootApplication(exclude={SolrAutoConfiguration.class})

提交回复
热议问题