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
Netflix Eureka Client Health Check Handler not sending correct status back to Netflix Eureka server #4072
Comments
Hello Team, Kindly do assist on above request on priority. |
Hello, @kamaldesingh, Spring Cloud |
Hello @OlgaMaciaszek , have tried using Spring Cloud 2021.0.1 with Spring Boot 2.6.3 version as well, still have same issue. Eureka Client is not considering nested components of application while sending the aggregate health status of application as explained above . |
@kamaldesingh Please provide a minimal, complete, verifiable example that reproduces the issue. |
@OlgaMaciaszek - Below are couple of code snippet...one is property file having 2 ldap beans and other is pom.xml with the dependencies I am using in my project. application.properties
pom.xml
|
Hello Team,
I have upgraded my application and below are details for same.
Previous Version-
spring boot-1.5.6.RELEASE
spring cloud version-Edgware.M1
Migrated Version-
spring boot-2.4.4
spring cloud version-2020.0.2
Herein, after migration I am faced issue with Client Eureka Health Check handler sending status as up always even though one of dependency say DB is down. This happens only in case where we have 2 or more beans of same type supposing in my application I had 2 LDAP connections and out of which one was down. Ideally, Eureka Client Health Check Handler should have sent DOWN status to Eureka Server but when I debugged it was sending UP status. Moreover, same works fine if I only have 1 LDAP connection then if connection is DOWN it sends back correct status.
Moreover, if we hit actuator health endpoint then it shows correct status as down but Eureka Client Health Check Handler sends UP status back to Eureka Server. Additionally, we have enabled the eureka health check by specifying property in application properties - eureka.client.healthcheck.enabled=true.
It was working fine in previous version we were using even I observed this is working fine with Spring Boot-2.1.18.RELEASE version, post that issue is occurring.
One more observation is that in Spring Boot 2.4.4 we saw that if we have 2 beans of same type they are getting registered under HealthContributor bean whereas in versions till Spring Boot-2.1.18.RELEASE beans were registered under HealthIndicators bean.
I am attaching the jsons from Spring Boot -1.5.6.RELEASE, 2.4.4 version with one bean and multiple beans of same type. Here you would see that for LDAP if I say we have nested components the health status by Eureka client for same is being skipped and if we don't have nested components in LDAP bean or any other dependency then health check by Eureka client is being checked for them as well.
Note-
I am referring to EurekaHealthCheckHandler present under spring-cloud-netflix-eureka-client jar. I am referring to health status being returned from this class back to Spring Cloud Netflix Eureka Server.
The text was updated successfully, but these errors were encountered: