Hi 

I have 3 zookeeper nodes. Ports 2181, 2888 and 3888 are open between them.

My zoo.cfg has respectively 

On host 1 ( with /var/lib/zookeeper/myid = 1)

server.1=ip-10-0-0-65.ec2.internal:2888:3888
server.1=ip-10-0-1-234.ec2.internal:2888:3888
server.1=ip-10-0-2-207.ec2.internal:2888:3888

On host 2 ( with /var/lib/zookeeper/myid = 2)

server.2=ip-10-0-0-65.ec2.internal:2888:3888
server.2=ip-10-0-1-234.ec2.internal:2888:3888
server.2=ip-10-0-2-207.ec2.internal:2888:3888

On host 3 ( with /var/lib/zookeeper/myid = 3)

server.3=ip-10-0-0-65.ec2.internal:2888:3888
server.3=ip-10-0-1-234.ec2.internal:2888:3888
server.3=ip-10-0-2-207.ec2.internal:2888:3888

Yet if I run the srvr command on any host I see

Zookeeper version: 3.7.0-e3704b390a6697bfdf4b0bef79e3da7a4f6bac4b, built on 
2021-03-17 09:46 UTC
Latency min/avg/max: 0/0.0858/11
Received: 2148
Sent: 2147
Connections: 2
Outstanding: 0
Zxid: 0x46
Mode: standalone
Node count: 28

And in the log file I see

2021-11-04 12:10:00,901 [myid:3] - WARN  [main:QuorumPeerMain@139] - Either no 
config or no quorum defined in config, running in standalone mode

What am I doing wrong? Note I am using 
https://github.com/sleighzy/ansible-zookeeper 
<https://github.com/sleighzy/ansible-zookeeper> and supplying the zookeeper_id 
to each of the hosts which results in the zoo.cfg / myid config described.

I have tried altering (for host 1) the zoo.cfg to

server.1=ip-10-0-0-65.ec2.internal:2888:3888
server.2=ip-10-0-1-234.ec2.internal:2888:3888
server.3=ip-10-0-2-207.ec2.internal:2888:3888

But this results in 

2021-11-04 16:28:05,324 [myid:1] - WARN  [NIOWorkerThread-4:NIOServerCnxn@380] 
- Close of session 0x0
java.io.IOException: ZooKeeperServer not running
        at 
org.apache.zookeeper.server.NIOServerCnxn.readLength(NIOServerCnxn.java:554)
        at 
org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:339)

What do I do to do to get the cluster to cluster.

With thanks












 <https://www.aerospike.com/summit/>
 <https://www.aerospike.com/summit/>



Reply via email to