Skip to content
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

When using WebFlux /actuator/health/{component} returns a 200 response when the component is down #16109

Closed
jrushto1 opened this issue Mar 6, 2019 · 2 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@jrushto1
Copy link

jrushto1 commented Mar 6, 2019

When using the spring-boot-starter-webflux dependency custom health indicators return a status code of 200 when navigating to /actuator/health/{custom} despite the health object being down.

Sample project here.

@snicoll snicoll changed the title Bug: Custom health indicators return status code 200 despite being down with spring webflux Custom health indicators return status code 200 despite being down with spring WebFlux Mar 6, 2019
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 6, 2019
@wilkinsona wilkinsona changed the title Custom health indicators return status code 200 despite being down with spring WebFlux When using WebFlux /actuator/health/{component} returns a 200 response when the component is down Mar 6, 2019
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 6, 2019
@wilkinsona wilkinsona added this to the 2.1.x milestone Mar 6, 2019
@wilkinsona
Copy link
Member

Thanks for the sample. The problem isn't specific to a custom health indicator and can be recreated by, for example, setting a very large threshold for diskSpace health:

http :8080/actuator/health/diskSpace
HTTP/1.1 200 OK
Content-Length: 98
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8

{
    "details": {
        "free": 782707150848,
        "threshold": 54975581388800,
        "total": 1000240963584
    },
    "status": "DOWN"
}

Both ReactiveHealthIndicator and HealthIndicator implementations are affected.

The problem does not occur when using the Servlet-based stack:

http :8080/actuator/health/diskSpace
HTTP/1.1 503 
Connection: close
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Date: Wed, 06 Mar 2019 10:15:04 GMT
Transfer-Encoding: chunked

{
    "details": {
        "free": 782717988864,
        "threshold": 54975581388800,
        "total": 1000240963584
    },
    "status": "DOWN"
}

@wilkinsona wilkinsona self-assigned this Mar 6, 2019
@snicoll snicoll modified the milestones: 2.1.x, 2.1.4 Mar 6, 2019
@avyyaaggarwal

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants