Configuration Zookeeper设置集群

Configuration Zookeeper设置集群,configuration,apache-zookeeper,Configuration,Apache Zookeeper,您好,我正在尝试在集群环境中设置Zookeeper。为此,我将zoo.cfg设置为: tickTime=2000 # REQUIRED - This will be the basis of timing events (milliseconds) initLimit=5 # REQUIRED - Amount of ticks in initialization syncLimit=2 # R

您好,我正在尝试在集群环境中设置Zookeeper。为此,我将zoo.cfg设置为:

tickTime=2000                # REQUIRED - This will be the basis of timing 

events (milliseconds)
initLimit=5                  # REQUIRED - Amount of ticks in initialization
syncLimit=2                  # REQUIRED - Amount of ticks to determine if node is still connected
dataDir=/var/lib/zookeeper   # REQUIRED - Where to store zookeeper sync data
clientPort=2181              # REQUIRED - Port which clients connect to
server.1=0.0.0.0:2888:3888 # or "0.0.0.0:2888:3888" if server.1 is the current node
server.2=server2host:2888:3888 # or "0.0.0.0:2888:3888" if server.2 is the current node
server.3=server3host:2888:3888 # or "0.0.0.0:2888:3888" if server.N is the current node
当尝试启动当前节点(即1)时,我收到错误:

if server.1 is the current node does not have the form host:port 
or host:port:portor host:port:port:type
但我相信当前节点似乎是好的。 有没有人能告诉我这里遗漏了什么


-V

好吧,我想出来了,不知怎么的,这些注释没有被当作注释处理,因此启动程序抛出了错误,修改了

tickTime=2000
initLimit=5
syncLimit=2
dataDir=/var/lib/zookeeper
clientPort=2181
server.1=0.0.0.0:2888:3888
server.2=server2host:2888:3888
server.3=server3host:2888:3888
工作!
-Vaibhav

好吧,我想出来了,不知怎么的,这些评论没有被当作评论对待,因此启动程序抛出了错误,修改了

tickTime=2000
initLimit=5
syncLimit=2
dataDir=/var/lib/zookeeper
clientPort=2181
server.1=0.0.0.0:2888:3888
server.2=server2host:2888:3888
server.3=server3host:2888:3888
工作! -维巴夫