Skip to content

/actuator/health returns 404 if no indicator is present #18676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aprantl opened this issue Oct 21, 2019 · 3 comments
Closed

/actuator/health returns 404 if no indicator is present #18676

aprantl opened this issue Oct 21, 2019 · 3 comments
Assignees
Labels
type: regression A regression from a previous release
Milestone

Comments

@aprantl
Copy link

aprantl commented Oct 21, 2019

I am just upgrading our application to Spring Boot 2.2.0. I am basically following the release notes at:
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes
As far as I can see, there is only one behavioral change missing in the documentation.

In my Spring Boot 2.1 application, I had disabled the heath endpoint defaults with:
management.health.defaults.enabled=false
This disabled all health indicators apart from from the ApplicationHealthIndicator.

Now with Sprint Boot 2.2, the same endpoint returns a 404 HTTP response. My other applications still work the same because they additionally define some custom health indicators.

It seems to be related to the following fix:
#17926
It is now always added. But it seems disabled with the defaults. According the HealthContributorAutoConfigurationTests the behavior was changed intentionally, and as such it should be added to the release notes IMHO.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 21, 2019
@philwebb philwebb added type: wiki-documentation A documentation update required on the wiki and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 22, 2019
@philwebb philwebb added this to the 2.2.x milestone Oct 22, 2019
@weiwensangsang
Copy link

@philwebb I am new here. I want to fix it as my first work. Can I do it?

@philwebb
Copy link
Member

@weiwensangsang Thanks for the offer but this is part of the release notes on the WIKI and as such it's a little hard to contribute to.

@snicoll snicoll changed the title Spring Boot 2.2.0: Application-/PingHealthIndicator now disabled with management.health.defaults.enabled=false /actuator/health returns 404 if no indicator is present Nov 5, 2019
@snicoll snicoll added type: regression A regression from a previous release and removed type: wiki-documentation A documentation update required on the wiki labels Nov 5, 2019
@snicoll snicoll modified the milestones: 2.2.x, 2.2.1 Nov 5, 2019
@snicoll
Copy link
Member

snicoll commented Nov 5, 2019

We've discussed this one today and while we have to document the effect of disabling the health indicators, having no indicator shouldn't lead to a 404. It's inconsistent with JMX and having the endpoint disappearing (from an HTTP client’s perspective) doesn’t make sense.

We've decided to return a simple UP with no further details in this case.

@snicoll snicoll self-assigned this Nov 6, 2019
snicoll added a commit to snicoll/spring-boot that referenced this issue Nov 6, 2019
snicoll added a commit to snicoll/spring-boot that referenced this issue Nov 6, 2019
@snicoll snicoll closed this as completed in 86a1c96 Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

5 participants