External zookeeper and nifi cluster connection issue
i have issue in connecting external zookeeper and nifi cluster , i have 3 nodes like zookeepernode1 zookeepernode2 zookeepernode3 and nifinode1 and nifinode2
nifiuser@zookeepernode3:~$ /opt/zookeeper/bin/zkServer.sh status
/usr/bin/java
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
myid could not be determined, will not able to locate clientPort in the server configs.
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: follower
root@zookeepernode1:~# /opt/zookeeper/bin/zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
Client port not found in static config file. Looking in dynamic config file.
grep: : No such file or directory
Client port not found in the server configs
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: follower
root@zookeepernode2:/opt/zookeeper/logs# /opt/zookeeper/bin/zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
Client port not found in static config file. Looking in dynamic config file.
grep: : No such file or directory
Client port not found in the server configs
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: leader
checking nifi logs [since both nodes logs are same so pasting logs from nifinode2]
root@nifinode2:~# tail -f /opt/nifi/logs/nifi-app.log
2025-02-17 16:05:41,069 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is disconnected: [id: 0x41871c79
, L:/53.13.138.69:55258 ! R:zookeepernode2/53.13.138.72:2181]
2025-02-17 16:05:41,069 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is told closing
2025-02-17 16:05:41,111 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty SSL handler added for channel: [id: 0x29
83cd7a]
2025-02-17 16:05:41,113 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is connected: [id: 0x2983cd7a, L
:/53.13.138.69:57908 - R:zookeepernode1/53.13.138.71:2181]
2025-02-17 16:05:41,114 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is disconnected: [id: 0x2983cd7a
, L:/53.13.138.69:57908 ! R:zookeepernode1/53.13.138.71:2181]
2025-02-17 16:05:41,114 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is told closing
2025-02-17 16:05:41,157 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty SSL handler added for channel: [id: 0x80
2bf7fc]
2025-02-17 16:05:41,158 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is connected: [id: 0x802bf7fc, L
:/53.13.138.69:38350 - R:zookeepernode3/53.13.247.198:2181]
2025-02-17 16:05:41,159 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is disconnected: [id: 0x802bf7fc
, L:/53.13.138.69:38350 ! R:zookeepernode3/53.13.247.198:2181]
2025-02-17 16:05:41,159 INFO [epollEventLoopGroup-4-1] o.apache.zookeeper.ClientCnxnSocketNetty channel is told closing
here are my configurations in Nifi.properties
# zookeeper properties, used for cluster management #
nifi.zookeeper.connect.string=zookeepernode1:2181,zookeepernode2:2181,zookeepernode3:2181
nifi.zookeeper.connect.timeout=10 secs
nifi.zookeeper.session.timeout=10 secs
nifi.zookeeper.root.node=/nifi
root@nifinode1:/opt/nifi/conf# cat ./zookeeper.properties
initLimit=10
autopurge.purgeInterval=24
syncLimit=5
tickTime=2000
dataDir=./state/zookeeper
autopurge.snapRetainCount=30
server.1=zookeepernode1:2888:3888;2181
server.2=zookeepernode2:2888:3888;2181
server.3=zookeepernode3:2888:3888;2181
also i have myid file created properly in all 3 zookeeper nodes as 1 2 and 3 and there
root@zookeepernode1:~# ls /var/lib/zookeeper/
myid version-2
root@zookeepernode1:~# cat /var/lib/zookeeper/myid
1
same but id will be 2 and 3 respectively in other nodes.
please do help me here . your response will be appreciated

