[ 
https://issues.apache.org/jira/browse/NIFI-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Koji Kawamura updated NIFI-2478:
--------------------------------
    Summary: Can not use the same Zookeeper by multiple NiFi clusters  (was: 
Can not use the same Zookeeper with multiple clusters)

> Can not use the same Zookeeper by multiple NiFi clusters
> --------------------------------------------------------
>
>                 Key: NIFI-2478
>                 URL: https://issues.apache.org/jira/browse/NIFI-2478
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.0.0
>            Reporter: Koji Kawamura
>
> I am trying to use the same external Zookeeper from two NiFi clusters. It's 
> expected this deployment is supported since there is 
> 'nifi.zookeeper.root.node' setting.
> Set 'nifi.zookeeper.root.node' to '/nifi-cluster-1' for cluster-1, and 
> '/nifi-cluster-2' for cluster-2.
> Cluster-1 started successfully. But Cluster-2 can't start with following 
> error:
> {code}
> 2016-08-04 07:45:58,787 INFO [main] o.a.c.f.imps.CuratorFrameworkImpl Starting
> 2016-08-04 07:45:58,794 INFO [main-EventThread] 
> o.a.c.f.state.ConnectionStateManager State change: CONNECTED
> 2016-08-04 07:45:58,795 INFO [main] o.a.n.c.c.node.CuratorNodeProtocolSender 
> No node has yet been elected Cluster Coordinator. Cannot establish connection 
> to cluster yet.
> 2016-08-04 07:45:58,795 INFO [Curator-Framework-0] 
> o.a.c.f.imps.CuratorFrameworkImpl backgroundOperationsLoop exiting
> 2016-08-04 07:45:58,797 WARN [main] o.a.nifi.controller.StandardFlowService 
> Failed to connect to cluster due to: 
> org.apache.nifi.cluster.protocol.ProtocolException: No node has yet been 
> elected Cluster Coordinator. Cannot establish connection to cluster yet.
> org.apache.nifi.cluster.protocol.ProtocolException: No node has yet been 
> elected Cluster Coordinator. Cannot establish connection to cluster yet.
>         at 
> org.apache.nifi.cluster.coordination.node.CuratorNodeProtocolSender.getServiceAddress(CuratorNodeProtocolSender.java:108)
>  ~[nifi-framework-cluster-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
> {code}
> I looked at the Zookeeper znodes and found 'leaders' is not under configured 
> root node:
> {code}
> [zk: localhost:2181(CONNECTED) 17] ls /
> [leaders, nifi-cluster-1, zookeeper]
> {code}
> Then, I looked at the source code, and found CuratorLeaderElectionManager has 
> following code:
> {code}
>         final String rootPath = zkConfig.getRootPath();
>         final String leaderPath = (rootPath.endsWith("/") ? "" : "/") + 
> "leaders/" + roleName;
> {code}
> It doesn't include rootPath while it should. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to