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.

Use of DiscoveryClientHealthIndicator AND ReactiveDiscoveryClientHealthIndicator

See original GitHub issue

Hello 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:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanjbaxtercommented, Jun 13, 2022

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.

0reactions
spring-cloud-issuescommented, Jun 27, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

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