question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HealthIndicator always returning UNKNOWN status even if connected

See original GitHub issue

Hey there !

I’m experiencing an issue with Spring Cloud Stream, the Kafka Stream Binder, and the auto configured Health Indicator for the Actuator.

Here is a sample minimal project that reproduces my issue. You’ll need a Kafka running (I’m working with an older 2.2.0 version, which constraints me to keep the Hoxton.SR8 and avoid Hoxton.SR9 and further) with two topics, IN and OUT. Just startup the application (after adapting the broker’s address/port of course), you may try to send it a message and see that it goes through without issue.

I’m then calling the Health endpoint, which returns me the following:

{
  "status": "UP",
  "components": {
    "binders": {
      "status": "UNKNOWN",
      "components": {
        "enricherKStreamBinder": {
          "status": "UNKNOWN"
        }
      }
    },
    "diskSpace": {
      "status": "UP",
      "details": {
        "total": 499963174912,
        "free": 344081379328,
        "threshold": 10485760,
        "exists": true
      }
    },
    "ping": {
      "status": "UP"
    }
  }
}

As the application is working as properly and can talk to Kafka, I would have expected to see a $.component.binders.status and $.component.binders.components.enricherKStreamBinder set to UP.

When debugging, I see that the code goes through org.springframework.cloud.stream.config.BindersHealthIndicatorAutoConfiguration.BindersHealthContributor#getContributor(), called with an empty Map as argument, causing it to return the static private static final HealthIndicator UNKNOWN = () -> {return Health.unknown().build();};. I naively would expect the map to not be empty there, but I’m no expert.

Hoping you can help, it may only be a configuration issue. Thanks a lot for your work !

And of course feel free to redirect me if i’m in the wrong repo, or anything.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sobychackocommented, Jan 5, 2021

@mborgraeve There was an issue in the way health indicators were configured when using an application with a multi-binder context. This is now addressed on both master and 3.0.x branches. Thanks for pointing out this issue.

1reaction
mborgraevecommented, Dec 14, 2020

Ahh I see, no worries. SR8 is the spring-cloud-dependencies train version, Hoxton.SR8, it’s in the pom.xml (I corrected my initial post).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Actuator Health Returning DOWN - Stack Overflow
If one of the health indicator is down, the health will be down and you can ... /actuator/health returned { status: "DOWN" }...
Read more >
Health Indicators in Spring Boot - Baeldung
Some of those indicators are almost always registered, such as ... endpoint will return a status report from the DiskSpaceHealthIndicator:
Read more >
47. Endpoints - Spring
If no HealthIndicator returns a status that is known to the HealthAggregator , an UNKNOWN status is used. 47.6 Security with HealthIndicators. Information ......
Read more >
Spring Boot health status switch to DOWN when circuit ...
I've experienced a huge drop in performance with the health indicator enabled in general without any failing backends (so circuit always CLOSED) ...
Read more >
13 Spring Boot Actuator Interview Questions Answers ... - Java67
UNKNOWN — The component state is unknown. 13. How do you change the Health Indicator status severity order? You can use the property...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found