Zookeeper running on two nodes

半腔热情 提交于 2019-12-12 04:37:23

问题


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?


回答1:


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?



来源:https://stackoverflow.com/questions/24033682/zookeeper-running-on-two-nodes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!