Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

com.orbitz.consul.ConsulException: Consul cluster has no elected leader #457

Open
windonis opened this issue Nov 15, 2021 · 3 comments
Open

Comments

@windonis
Copy link

Hi Everyone,

We have very huge consul cluster and some project needs consul-client-1.3.3 for cbes integration.

But we are getting error as below.

11:31:45.530 [OkHttp http://consul-api.external:8500/...] ERROR c.o.c.c.ConsulCache - Error getting response from consul for health.service "XXX_pod_name_XXX", will retry in 10000 MILLISECONDS
com.orbitz.consul.ConsulException: Consul cluster has no elected leader
	at com.orbitz.consul.cache.ConsulCache$1.onComplete(ConsulCache.java:159) [consul-client-1.3.3.jar:?]
	at com.orbitz.consul.util.Http$1.onResponse(Http.java:79) [consul-client-1.3.3.jar:?]
	at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129) [retrofit-2.5.0.jar:?]
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) [okhttp-3.12.1.jar:?]
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) [okhttp-3.12.1.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]

I'm sure there is no problem with the consul cluster because the other 4000 clients are working fine. (In particular, there is no such thing as the absence of a leader.) Due to some problems we are not using a version greater than 1.3.3.

Do you have an opinion on this station ?

Best Regards

@kazuare
Copy link

kazuare commented Nov 23, 2021

Hi,
I also get 'Consul cluster has no elected leader', despite both UI and statusClient.getLeader() stating that there is a leader.
Turning off streaming fixed my issue. I suspect this is connected to #456 , but i dont have super-solid evidence

@Yanghsuanming
Copy link

Hi, I also get 'Consul cluster has no elected leader', despite both UI and statusClient.getLeader() stating that there is a leader. Turning off streaming fixed my issue. I suspect this is connected to #456 , but i dont have super-solid evidence

how to Turning off streaming ?

@kazuare
Copy link

kazuare commented Dec 23, 2021

Hi, I also get 'Consul cluster has no elected leader', despite both UI and statusClient.getLeader() stating that there is a leader. Turning off streaming fixed my issue. I suspect this is connected to #456 , but i dont have super-solid evidence

how to Turning off streaming ?

there is "use_streaming_backend" key in consul node configuration to control that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants