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
Kubernetes readiness probe endpoint returning 404 #22562
Comments
After a bit more digging, I'm not really sure why or whether it was intended, however the issue seems to be that This seems to work as expected.
|
Yes this is an unintended side effect of #22107. The workaround you're mentioning is the right one in the meantime. Thanks for raising this issue! |
No problem - feel free to re-title it as appropriate. Unfortunately this is a transparently breaking change for many people, they probably won't realise the probe status isn't being included in the status in addition to, say, |
I've tagged this issue as a regression. I'm really sorry for letting in that one. |
Does this cover the fact that they are listed under |
I precisely have the same issue than @OrangeDog . On my container with
|
I agree this is potentially confusing, but doesn't seem to be the main problem here? I wonder whether the I guess this is a matter of design - the group exists but has no (valid) components, therefore its status is indeterminate, therefore the implementation returns a 404? It certainly can't return Would we
|
Instead of referencing When On the other hand, when properties are enabled, The problem is in |
The API response is supposed to be for consumers of the API, not documenting configuration options for the developer. Like the rest of the actuator system, only endpoints that are currently available should be listed as available. |
FYI surprisingly enough Spring Boot decided to name the readiness state property See the reference: https://docs.spring.io/spring-boot/docs/2.3.2.RELEASE/reference/html/appendix-application-properties.html#actuator-properties |
@antoinegrappin no, that's just a documentation error. The property is |
@OrangeDog indeed, I confirm after tests. |
This issue is now fixed in the 2.3.3 and 2.4.0 SNAPSHOTs. I've carefully read the comments on this issue regarding the following surprising behavior: getting a 404 status on a configured health group, when no indicator is present. In this very case it's arguably wrong, but we're in a case of a regression. But some of you thought that
The first alternative sounds nice, especially for detecting bad configurations. But it's also likely to fail in perfectly valid cases. Your application could configure a group The second alternative is debatable. Right now our health groups support is auto-configured with the configuration properties and does not look into the application context to check for the existence of health indicators. We seem to all agree that a 404 response status is right in this case. Removing the group information would, in my opinion, make things less consistent as we wouldn't know that a group has been configured. After all, a health group is just a way to wrap several indicators under the same name and customize its global health status - but health indicators are still dynamic. After discussing that briefly with the team, we didn't think that this needs to be changed. Note that this behavior exists since the introduction of the health groups feature. If you can make a stronger case for changing this, please create a dedicated issue and explain how this behavior is inconsistent or could lead to issues. Thanks! |
It seems that this regression in 2.3.2 causes the liveness endpoint to 404: spring-projects/spring-boot#22562 and the app goes in a crash loop
Thanks @bclozel - fix is working fine in |
@chadlwilson can you share your configurations in 2.3.3? I am finding the same issue there.. |
@salaboy If your application runs on kubernetes, you don't need any specific configuration.
|
@bclozel what are values am supported to give in my deployment manifests |
...
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: http
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: http
... The issue has been resolved with version 2.3.3. You can expose separate probes with dedicated Health Indicators. You may want to look up here. |
There appears to be some change in behaviour for the Kubernetes-oriented
readiness
group endpoint on2.3.2
compared to2.3.1
.For a service that has no external dependencies (and only
readinessState
in the health group), the/actuator/health/readiness
endpoint is returning a404
.Configuration we are using:
Expected Behaviour
We expect this to just return
200
with{ "status": "UP" }
Actual Behaviour
Full
health
call:This may relate to #22107.
The text was updated successfully, but these errors were encountered: