Edyta Nowak created ZOOKEEPER-4652:
--------------------------------------

             Summary: Zookeeper electing two masters
                 Key: ZOOKEEPER-4652
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4652
             Project: ZooKeeper
          Issue Type: Bug
            Reporter: Edyta Nowak


I am using camel's zookeeper-master component for some routes.

I was testing the master election and found out that when I kill the zookeeper, 
and before the kill I was having few instances of that route working correctly 
(with one master elected) and then start zookeeper again, then zookeeper has 
problems with master election. It selects for example two instances as masters 
and for the other instances it returns the error:




```

org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode 
for /camel/zookeepermaster/clusters/master/crewfile
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:118) 
~[zookeeper-3.5.9.jar:3.5.9]
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) 
~[zookeeper-3.5.9.jar:3.5.9]
    at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:2707) 
~[zookeeper-3.5.9.jar:3.5.9]
    at 
org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:242)
 ~[curator-framework-4.3.0.jar:4.3.0]
    at 
org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:231)
 ~[curator-framework-4.3.0.jar:4.3.0]
    at 
org.apache.curator.connection.StandardConnectionHandlingPolicy.callWithRetry(StandardConnectionHandlingPolicy.java:67)
 ~[curator-client-4.3.0.jar:na]
    at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:81) 
~[curator-client-4.3.0.jar:na]
    at 
org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground(GetChildrenBuilderImpl.java:228)
 ~[curator-framework-4.3.0.jar:4.3.0]
    at 
org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:219)
 ~[curator-framework-4.3.0.jar:4.3.0]
    at 
org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:41)
 ~[curator-framework-4.3.0.jar:4.3.0]
    at 
org.apache.camel.component.zookeepermaster.group.internal.ZooKeeperGroup.refresh(ZooKeeperGroup.java:474)
 ~[camel-zookeeper-master-3.14.4.jar:3.14.4]
    at 
org.apache.camel.component.zookeepermaster.group.internal.RefreshOperation.invoke(RefreshOperation.java:30)
 ~[camel-zookeeper-master-3.14.4.jar:3.14.4]
    at 
org.apache.camel.component.zookeepermaster.group.internal.CompositeOperation.invoke(CompositeOperation.java:40)
 ~[camel-zookeeper-master-3.14.4.jar:3.14.4]
    at 
org.apache.camel.component.zookeepermaster.group.internal.ZooKeeperGroup.mainLoop(ZooKeeperGroup.java:585)
 ~[camel-zookeeper-master-3.14.4.jar:3.14.4]
    at 
org.apache.camel.component.zookeepermaster.group.internal.ZooKeeperGroup.access$200(ZooKeeperGroup.java:77)
 ~[camel-zookeeper-master-3.14.4.jar:3.14.4]
    at 
org.apache.camel.component.zookeepermaster.group.internal.ZooKeeperGroup$4.run(ZooKeeperGroup.java:183)
 ~[camel-zookeeper-master-3.14.4.jar:3.14.4]
    at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 ~[na:na]
    at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

```



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

Reply via email to