Re: failover with zookeeper-master component

2018-02-22 Thread Dennis Holunder
Undestood. The question is, is the camel zookeeper-master component
capable to reconnect, if after some longer time zk nodes come back? In
logs I've seen something like "retry gave up", which is not desirable.
IMHO, it should never give up, regardles of how many zk nodes are
available


ERROR [Curator-Framework-0] o.a.c.f.i.CuratorFrameworkImpl: Background
operation retry gave up
org.apache.zookeeper.KeeperException$ConnectionLossException:
KeeperErrorCode = ConnectionLoss
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.checkBackgroundRetry(CuratorFrameworkImpl.java:728)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:857)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:809)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.access$300(CuratorFrameworkImpl.java:64)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:267)
at java.util.concurrent.FutureTask.run(Unknown Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown
Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
ERROR [Curator-Framework-0] o.a.c.f.i.CuratorFrameworkImpl: Background
retry gave up
org.apache.curator.CuratorConnectionLossException: KeeperErrorCode =
ConnectionLoss
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:838)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:809)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.access$300(CuratorFrameworkImpl.java:64)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:267)
at java.util.concurrent.FutureTask.run(Unknown Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown
Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

2018-02-22 11:31 GMT+01:00 Claus Ibsen-2 [via Camel]
:
> It uses the zookeeper leader election so only the node that is the
> master is active, anyone else is in slave mode.
>
> Also mind that zk requires a running quorum to function, eg so if you
> have 3, you need 51%+ to be up and running, eg 2 nodes.
> So if you lose 2 nodes, and only have 1 then zk is in zombie mode
> (cant recall what they call this situation) and wont function, you
> need to bring up at least 1 more node to have a quorum.
>
>
>
>
> On Wed, Feb 21, 2018 at 10:13 AM, Dennis Holunder <[hidden email]> wrote:
>
>> Hi guys,
>>
>> having setup with 3 zookeeper servers the zookeeper master policy
>> works fine if one of clients is gone and the new master is then
>> selected. But what will happen if one or two of zookeeper servers are
>> gone and only one is still available? For example, if client is
>> connected to zookeper1 and it is gone, will the client reconnect to
>> zookeeper2 or zookeeper3?
>>
>> Kind regards, D
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
>
> 
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/failover-with-zookeeper-master-component-tp5817804p5817843.html
> To unsubscribe from Camel, click here.
> NAML


Re: failover with zookeeper-master component

2018-02-22 Thread Claus Ibsen
It uses the zookeeper leader election so only the node that is the
master is active, anyone else is in slave mode.

Also mind that zk requires a running quorum to function, eg so if you
have 3, you need 51%+ to be up and running, eg 2 nodes.
So if you lose 2 nodes, and only have 1 then zk is in zombie mode
(cant recall what they call this situation) and wont function, you
need to bring up at least 1 more node to have a quorum.




On Wed, Feb 21, 2018 at 10:13 AM, Dennis Holunder  wrote:
> Hi guys,
>
> having setup with 3 zookeeper servers the zookeeper master policy
> works fine if one of clients is gone and the new master is then
> selected. But what will happen if one or two of zookeeper servers are
> gone and only one is still available? For example, if client is
> connected to zookeper1 and it is gone, will the client reconnect to
> zookeeper2 or zookeeper3?
>
> Kind regards, D



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2