When I access the /health
endpoint from my Spring Boot application (1.2.4.RELEASE) it is returning a status of DOWN
:
{
status: "DOWN"
}
Are there any starter projects or libraries that are known to overwrite the status? Is there any other reason (besides writing a custom one) why it would return DOWN
?
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 isDOWN
. An easy way to fix this is to disable the Solr auto configuration in your Application.java with this annotation:@SpringBootApplication(exclude={SolrAutoConfiguration.class})