Zookeeper ensemble not coming up

前端 未结 2 584
说谎
说谎 2021-01-13 10:50

I am trying to configure the ensemble of 3 nodes following the documentation. All of them are on Linux Ubuntu. on all the three nodes configuration file looks like this :

2条回答
  •  我在风中等你
    2021-01-13 11:26

    I had a similar issue. I have got some hints of what the problem may be from here and here. In my case, the output of the command netstat -plutn was showing something including 127.0.0.1:3888 for the election port 3888. I have solved the problem by changing part of zoo.cfg on server n, from something like

    server.1=name.of.s1:2888.3888
    ...
    server.n=localhost:2888:3888
    ...
    

    to

    server.1=name.of.s1:2888.3888
    ...
    server.n=0.0.0.0:2888:3888
    ...
    

    After a ZooKeeper restart, the output of netstat -plutn includes :::3888.

    Apparently this is needed for ZooKeeper to properly expose the election port, in this case 3888.

提交回复
热议问题