Hello! Set a different id in the myid file of server 0 (the one that is down), restart it, verify that it joins the quorum. If it joins the quorum, set the myid value in server 1 to one, restart it, verify that it joins the quorum. If it joins the quorum, update again the myid file of server 0, this time to the correct 0 value. Restart, verify that it all works.
If any of the steps fails, stop and think it all over again. Good luck. On Tuesday, February 18, 2014, Marcin Cabaj <[email protected]> wrote: > Hi all, > > My ZooKeeper ensemble contains 3 servers, unfortunately somehow servers ids > have been messed up. > > zoo.cfg on all servers: > server.0=zoo0:2888:3888 > server.1=zoo1:2888:3888 > server.2=zoo2:2888:3888 > > but: > on ZOO0: > [xxx@zoo0]$ cat /var/zookeeper/myid > 1 > [xxx@zoo0]$ echo conf | nc localhost 2181 > This ZooKeeper instance is not currently serving requests > > on ZOO1: > [xxx@zoo1] $ cat /var/zookeeper/myid > 0 > [xxx@zoo1:~]$ echo conf | nc localhost 2181 | grep serverId > > serverId=0 > > on ZOO2: > [xxx@zoo2:~]$ cat /var/zookeeper/myid > 2 > [xxx@zoo2:~]$ echo conf | nc localhost 2181 | grep serverId > serverId=2 > > How to fix this without shutting down whole ensemble? > Currently I have connections established to ZOO1 and ZOO2. > ZOO0 is listening on 2181 but doesn't accept connections. > ZOO2 is the leader. > > Zookeeper version: 3.3.5-cdh3u5--1, built on 10/06/2012 01:58 GMT > > Cheers >
