As I understand, the property defined in http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_health_indicator should deactivate the config server validation in the spring boot /health endpoint. However we have not been able to deactivate this check using this property. Could it be a bug or we didn't get the point in the above documentation?
Comment From: spencergibb
That's for the config server itself, not config clients. You want health.config.enabled=false.
Comment From: jpuigsegur
Ok. Thanks. This one is not documented in http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html.
Would it be health.config.enabled=false or management.health.config.enabled=false?
Comment From: spencergibb
It's exactly what I told you it is and it wouldn't be documented in spring-boot since it's not part of spring boot.
Comment From: jpuigsegur
Ok. Thanks!!
Comment From: markthegrea
Sorry, but can someone explain this a bit more? I am having the same problem. Is the server in my app? How can it not be part of spring boot?
Can I put something in my properties file to shut this off?
Comment From: jpuigsegur
It means that in order to stop the health check in Spring Boot to check config server you need to include the following configuration: health.config.enabled=false
Comment From: markthegrea
Thanks for the reply but that does not work. I am using Spring boot 1.5.9.RELEASE. I have put it in my application.properties file but it is still rebooting.
Does all this run inside my spring boot app? It seems above that it is running elsewhere? I am in Azure and maybe it is pinging my app?
##This shuts the Tomcat server off.
spring.main.web-environment=false
health.config.enabled=false
management.security.enabled=true
##should we store sessions?
spring.session.store-type=none
Comment From: marcingrzejszczak
Is it still a problem with Finchley.RELEASE?
Comment From: markthegrea
I can't figure it out. There are about 4 posts on the web about it and none of it works.
Comment From: ryanjbaxter
@markthegrea are you using Spring Cloud Config?
Comment From: markthegrea
I have a standalone app. I am doing this in the Azure Cloud.
What I don't understand is the above quote: "It's exactly what I told you it is and it wouldn't be documented in spring-boot since it's not part of spring boot."
How can this not be part of spring boot? Does Spring Boot somehow monitor itself?
Comment From: ryanjbaxter
health.config.enabled=false is not part of Spring Boot, it a property from Spring Cloud
http://cloud.spring.io/spring-cloud-static/Edgware.SR4/single/spring-cloud.html#_health_indicator_3
Comment From: maxxyme
Despite setting health.config.enabled=false in my application.properties, org.springframework.cloud.health.RefreshScopeHealthIndicator was still getting called...
Alas, I finally discovered in spring-cloud-context-2.1.3.RELEASE.jar the existence of these 2 files:
spring-configuration-metadata.json
{
"name": "management.health.refresh.enabled",
"type": "java.lang.Boolean",
"description": "Enable the health endpoint for the refresh scope.",
"defaultValue": true
},
additional-spring-configuration-metadata.json
{
"name": "management.health.refresh.enabled",
"type": "java.lang.Boolean",
"description": "Enable the health endpoint for the refresh scope.",
"defaultValue": true
}
So basically the prop name we can see everywhere is erroneous, it's actually management.health.refresh.enabled NOT health.config.enabled.
e.g. official doc @ https://cloud.spring.io/spring-cloud-config/reference/html/#_health_indicator_2
Also found an answer from 2017 telling the correct properties: https://stackoverflow.com/a/46775306 So probably this has been "fixed" by the time, or done as requested in https://github.com/spring-cloud/spring-cloud-config/issues/552