I have a situation where Zookeeper is configured for 2 nodes but at times it starts running on both the nodes simultaneously. Why this might be happening?
Asked
Active
Viewed 6,067 times
1
-
Don't understand the question. If you have it configured for two nodes then why are you surprised that it's running on both nodes simultaneously? – John Petrone Jun 05 '14 at 14:21
-
am surprised as i have configured it such a way that it should at any given point of time should run in only one server... – user288686 Jun 09 '14 at 15:27
-
you're going to need to share significantly more information about your setup, configuration files, architecture, etc if anyone is going to help you. – John Petrone Jun 09 '14 at 15:32
1 Answers
3
To make an ensemble with Master-slave architecture you need to have odd number of zookeeper server .i.e.{1, 3 ,5,7....etc}. Ensemble of 3 can handle the one server crash ..similarly ensemble of 5 can handle 2 server ...so on .
When you are trying to create an ensemble of 2 servers ,zookeeper actually cannot understand this an ensemble and taking each server as individual ensemble.
The only solution here is to run another zookeeper server and add the 3rd one to this group.Or you can run only one server .To see how to make an ensemble of 3 pls check : what is zookeeper port and its usage?

Community
- 1
- 1

Sandeep Das
- 1,010
- 9
- 22
-
Don't see it complain (nothing in logs) when I create two node cluster then. I am able to see connections between the servers and one as leader, the other as follower. Is there anything else that can go wrong with two node ZK cluster such as replication issues because I do see different data in both? – kisna May 13 '16 at 09:07
-
-
So, instead, is there a setting to say cluster consistency of one or two is fine instead of a quorum? – kisna May 16 '16 at 06:40