Use of DiscoveryClientHealthIndicator AND ReactiveDiscoveryClientHealthIndicator
See original GitHub issueHello Spring Cloud Kubernetes Team,
I just wanted to raise a small issue, please feel free to screen and add your expertise.
Facts: My app, a Spring WebFlux app, not MVC at all, non blocking at all, is deployed in Kubernetes.
I activate the liveness probe. The liveness probe shows the following:
s.c.c.d.h.DiscoveryClientHealthIndicator : Error
io.fabric8.kubernetes.client.KubernetesClientException: Operation: [list] for kind: [Service] with name: [null] in namespace: [abc] failed.
r.ReactiveDiscoveryClientHealthIndicator : Error
io.fabric8.kubernetes.client.KubernetesClientException: Operation: [list] for kind: [Service] with name: [null] in namespace: [abc] failed.
I paste the log for an error, to make things a bit more relevant. You can clearly see there are the use of both DiscoveryClientHealthIndicator AND ReactiveDiscoveryClientHealthIndicator
The success will also use both.
Finally, this is reproducible with any Spring Webflux app deployed in Kubernetes.
May I ask why the use of DiscoveryClientHealthIndicator AND ReactiveDiscoveryClientHealthIndicator in a Spring Webflux app please?
Thank you.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
org.springframework.cloud.client.discovery.health.reactive ...
ReactiveDiscoveryClientHealthIndicator Java Examples. The following examples show how to use org.springframework.cloud.client.discovery.health.reactive.
Read more >2. Spring Cloud Commons: Common Abstractions
A generic HealthIndicator based on DiscoveryClient is auto-configured ( DiscoveryClientHealthIndicator ). To disable it, set spring.cloud.discovery.client.
Read more >Class ReactiveDiscoveryClientHealthIndicator - javadoc.io
A health indicator which indicates whether or not the discovery client has been initialized. Author: Tim Ysewyn. Field Summary ...
Read more >Download spring-cloud-commons (2.2.0.RELEASE)
These are the files of the artifact spring-cloud-commons version 2.2.0.RELEASE from the group org.springframework.cloud. Spring Cloud Commons.
Read more >health "description":"Discovery Client not initialized","status ...
DiscoveryClientHealthIndicator has its discoveryInitialized field set ... the application is actually ready to work with discovery client.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Not sure I agree because the autoconfiguration containing this health indicator should only be enabled if there is a DiscoveryClient bean, in this case there shouldnt be. https://github.com/spring-cloud/spring-cloud-commons/blob/c2a22346cde819971263c47b321a81a7908c4f40/spring-cloud-commons/src/main/java/org/springframework/cloud/client/CommonsClientAutoConfiguration.java#L57
@patpatpat123 Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.