On Thu, Jul 21, 2011 at 2:05 PM, Daniel Yazbek <[email protected]>wrote:
> Hi all, > > I am a newbie to zookeeper, so please be patient :) > > I have setup two zookeeper servers on two separate machines (A and B). > I can start servers A and B ok. > > I have a client C, running on machine A. I can start the client, connect to > the server, and create/change/remove znodes, and everything works nicely. > > Now, when I stop server B, the client C on machine A throws a > ConnectionLossException when I try to get a znode. > > I initially thought that server A would be fine to run in standalone mode, > but unfortunately this is not the case. > > Can someone please explain this behaviour to me? Is there some bit of > configuration I am missing? Or, is this how it works by design? > According to the documentation<http://zookeeper.apache.org/doc/r3.3.2/zookeeperAdmin.html#sc_zkMulitServerSetup>" *As long as a majority of the ensemble are up, the service will be available.*" The above behavior should be because 1 out of 2 is not a majority. > The same scenario with three servers (and bringing one down) works just > fine. > > Further, is there a way to configure zookeeper server to dynamically > "sniff" out its peers (via a UDP broadcast maybe) instead of hard-coding > them in the zoo.cfg? > > Thanks > > -Daniel.
