Skip to content

HealthEndpointGroupMembershipValidator does not consider reactive health indicators causing NoSuchHealthContributorException to be thrown #48387

Closed

Description

@aschepp

Spring Boot 4.0.0

I tried to add the ReactiveMongoHealthIndicator to a health group (with management.endpoint.health.group.liveness.include: mongo)

The app won't start with NoSuchHealthContributorException error.

If I set management.endpoint.health.validate-group-membership to false, the app starts, but the HealthIndicator is not part of the health group.

I then debugged the HealthEndpointGroupMembershipValidator and saw, that only non reactive HealthIndicator are included.

I was able to temporarily fix it, by defining a normal MongoHealthIndicator bean.

Activity

  1. philwebb commented on Dec 4, 2025

    @philwebb
    Member

    It looks like HealthEndpointGroupMembershipValidator should also check against the reactive registry if it's available.

    If I set management.endpoint.health.validate-group-membership to false, the app starts, but the HealthIndicator is not part of the health group.

    Can you expand a bit on "the HealthIndicator is not part of the health group"? Do you mean it doesn't appear in the JSON response?

  2. aschepp commented on Dec 4, 2025

    @aschepp
    Author

    Yes, it's not part of the response.

  3. philwebb commented on Dec 4, 2025

    @philwebb
    Member

    @aschepp, I can replicate the HealthEndpointGroupMembershipValidator issue, but I'm having trouble reproducing the indicator being missing from the response.

    This is my application.properties:

    management.endpoint.health.group.liveness.include=mongo
    management.endpoint.health.validate-group-membership=false
    management.endpoints.web.exposure.include=*
    management.endpoint.health.show-details=always

    This is the response:

    $ http http://localhost:8080/actuator/health/liveness
    
    HTTP/1.1 200 OK
    Content-Length: 125
    Content-Type: application/vnd.spring-boot.actuator.v3+json
    
    {
        "components": {
            "mongo": {
                "details": {
                    "databases": [
                        "config",
                        "admin",
                        "local"
                    ],
                    "maxWireVersion": 27
                },
                "status": "UP"
            }
        },
        "status": "UP"
    }
    

    Do you have management.endpoint.health.show-details=always set in your code?

  4. changed the title [-]Reactive Health Indicators can't be added to health groups[/-] [+]HealthEndpointGroupMembershipValidator does not consider reactive health indicators causing NoSuchHealthContributorException to be thrown[/+] on Dec 4, 2025
  5. added
    type: regressionA regression from a previous release
    and removed
    status: waiting-for-triageAn issue that has not yet been triaged. Contributions will not be accepted.
    on Dec 4, 2025
  6. added this to the 4.0.x milestone on Dec 4, 2025
  7. self-assigned this
    on Dec 4, 2025
  8. modified the milestones: 4.0.x, 4.0.1 on Dec 4, 2025
  9. philwebb commented on Dec 4, 2025

    @philwebb
    Member

    @aschepp I think I've fixed the validation problem. Please open a new issue if you can reproduce the indicator being missing from the response (#48387 (comment)).

  10. added a commit that references this issue on Dec 4, 2025
    739b92e
  11. aschepp commented on Dec 5, 2025

    @aschepp
    Author

    I tried several versions, but I couldn't replicate the indicator being missing anymore. So all good from my side. Thanks for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions