Re: Configuring pseudo distributed zookeeper, followers and leader

2019-02-27 Thread Norbert Kalmar
Hi Weiqi,

How do you start the instances? My theory is that the 2 nodes on the VM
establishes the connection faster than you local machine with the two VM.
So since they already have quorum they will elect the Leader amongst them.
you could start 1 node from VM and on your localhost, and then just wait
until your localhost is the Leader. Then start the 3rd node on the VM.
There really isn't a way to define Leader at startup as much as I can tell.

Hope this helps.

Regards,
Norbert

On Tue, Feb 26, 2019 at 4:46 PM 徐炜淇  wrote:

> Hi,
> I configured a pseudo distributed zookeeper, a master two virtual
> machines. The content of file A are as follows:
> tickTime=2000
> initLimit=10
> syncLimit=5
> dataDir=/home/v7/RyaInstall/zookeeper-3.4.12/data
> clientPort=2181
> server.1=192.168.122.1:2888:3888
> server.2=192.168.122.92:2888:3888
> server.3=192.168.122.152:2888:3888
>
>
>
> The server is my local computer, server 2 and 3 are ,y virtual machines.
> But when I start zookeerper, my localhost always becomes follower, one of
> server2 or server3 becomes the leader.
> I do not know how to make my local computer becomes the leader.
> Can you help me?
>
>
> Best
> Weiqi
>
>
>
>
>
>
>


Configuring pseudo distributed zookeeper, followers and leader

2019-02-26 Thread 徐炜淇
Hi,
I configured a pseudo distributed zookeeper, a master two virtual machines. The 
content of file A are as follows:
tickTime=2000 
initLimit=10 
syncLimit=5 
dataDir=/home/v7/RyaInstall/zookeeper-3.4.12/data
clientPort=2181
server.1=192.168.122.1:2888:3888 
server.2=192.168.122.92:2888:3888
server.3=192.168.122.152:2888:3888 



The server is my local computer, server 2 and 3 are ,y virtual machines.
But when I start zookeerper, my localhost always becomes follower, one of 
server2 or server3 becomes the leader.
I do not know how to make my local computer becomes the leader.
Can you help me?


Best
Weiqi