The servers on machine1 will still try and connect to machine2 to form a quorum because they cannot form a quorum themselves, because they only make up half the cluster, and you need half + 1 machines to form a quorum.
On Tue, Nov 5, 2013 at 4:42 PM, erolagnab <[email protected]> wrote: > I have 2 machines and I have tried to setup 3 ZK instances per machine. > Configs below (i have appropriate myid file in the respected data dir, and > both machines use the same configs): > > zoo1.cfg > -------- > dataDir=/var/tmp/zookeeper/instance1 > clientPort=2181 > server.11=machine1:2888:3888 > server.21=machine2:2888:3888 > server.12=machine1:2889:3889 > server.22=machine2:2889:3889 > server.13=machine1:2890:3890 > server.23=machine2:2890:3890 > > zoo2.cfg > -------- > dataDir=/var/tmp/zookeeper/instance2 > clientPort=2182 > server.11=machine1:2888:3888 > server.21=machine2:2888:3888 > server.12=machine1:2889:3889 > server.22=machine2:2889:3889 > server.13=machine1:2890:3890 > server.23=machine2:2890:3890 > > zoo3.cfg > -------- > dataDir=/var/tmp/zookeeper/instance3 > clientPort=2183 > server.11=machine1:2888:3888 > server.21=machine2:2888:3888 > server.12=machine1:2889:3889 > server.22=machine2:2889:3889 > server.13=machine1:2890:3890 > server.23=machine2:2890:3890 > > In machine1, i try zkServer.sh start for all 3 config but ZK not able to > start. All 3 ZK instances are trying to open channel at election machine2 > address and not to machine1. > > If i start all 3 ZK instances in machine2, then ZK cluster starts nicely > but > then if i shutdown all in machine2, ZK cluster dies. > > > > -- > View this message in context: > http://zookeeper-user.578899.n2.nabble.com/Running-Zookeeper-in-2-machines-tp7579232p7579234.html > Sent from the zookeeper-user mailing list archive at Nabble.com. >
