[ 
https://issues.apache.org/jira/browse/CAMEL-15423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17600682#comment-17600682
 ] 

Alexander Anpilov commented on CAMEL-15423:
-------------------------------------------

[~Amz]  Hi! How are you fixed this errrors? I have the same situation.

> Camel consul leader election
> ----------------------------
>
>                 Key: CAMEL-15423
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15423
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-consul
>    Affects Versions: 3.4.3
>            Reporter: Amin Mohammed-Coleman
>            Priority: Major
>
> Hi there
> I have integrated camel and consult to perform leader election when it come 
> to polling. So far everything is working as expected. If I kill on of my pods 
> then another pod becomes the leader. One thing I have noticed is that when I 
> invalidate the session via Consul UI the camel service throws the following 
> exception:
>  
> {code:java}
> com.orbitz.consul.ConsulException: Consul request failed with status [404]: 
> Session id 'da77a3a5-dbf8-49ab-9a46-f759b325895b' not 
> foundcom.orbitz.consul.ConsulException: Consul request failed with status 
> [404]: Session id 'da77a3a5-dbf8-49ab-9a46-f759b325895b' not found at 
> com.orbitz.consul.util.Http.ensureResponseSuccessful(Http.java:61) at 
> com.orbitz.consul.util.Http.extract(Http.java:33) at 
> com.orbitz.consul.SessionClient.renewSession(SessionClient.java:80) at 
> com.orbitz.consul.SessionClient.renewSession(SessionClient.java:69) at 
> org.apache.camel.component.consul.cluster.ConsulClusterView$Watcher.watch(ConsulClusterView.java:279)
>  at 
> org.apache.camel.component.consul.cluster.ConsulClusterView$Watcher.onComplete(ConsulClusterView.java:252)
>  at com.orbitz.consul.KeyValueClient$1.onComplete(KeyValueClient.java:167) at 
> com.orbitz.consul.util.Http$1.onResponse(Http.java:80) at 
> retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129) at 
> okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) at 
> okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>  at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>  at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
> Which I would expect it to happen. But this continues until I have to 
> manually kill the pod and restart the camel service. 
> Is there anyway to perform a retry X times and then acquire a new session? I 
> couldn't see any configuration that would enable this, unless this is the 
> expected behaviour.
>  
> Any help would be appreciated.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to