Zookeeper - three nodes and nothing but errors

前端 未结 2 725
终归单人心
终归单人心 2020-12-31 02:36

I have three zookeeper nodes. All ports are open. The ip address are correct. Below is my config file. All nodes where booted by chef and all have the same install and c

相关标签:
2条回答
  • 2020-12-31 02:53
    server.1=111.111.111:2888:3888
    server.2=111.111.112:2888:3888
    server.3=111.111.113:2888:3888
    

    Are your servers and IP's

    Then create myid file on each of the nodes with value 1 in 111.111.111 and 2 in 111.111.111.112 and 3 in 111.111.111.113 servers under directory(dataDir=/var/lib/zookeeper)

    If you place value "1" myid file you will get Number format exception and "Invalid config, exiting abnormally" if the myid file is created with any extension.

    Therefore just create myid file without any extension and place integer values 1,2,3 in the corresponding servers without double quotes

    0 讨论(0)
  • 2020-12-31 02:57

    You need create a file named myid and put it into zookeeper var directory, one for each server, consists of a single line containing only the text of that machine's id. So myid of server 1 would contain the text "1" and nothing else. The id must be unique within the ensemble and should have a value between 1 and 255.

    see more at http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_zkMulitServerSetup

    0 讨论(0)
提交回复
热议问题