Zookeeper无法运行,因为无效的配置

时间:2016-06-10 02:01:48

标签: config apache-zookeeper

问题是当我运行“./zkServer.sh start”时,zookeeper STRATED。但是当我检查状态时,它会显示:

Error contacting service. It is probably not running.

我在vmware上创建了三个节点,我的配置是

tickTime=2000 
dataDir=/usr/src/zookeeper
clientPort=2181
initLimit=10
syncLimit=5
server.1=192.168.237.129:2888:3888
server.2=192.168.237.130:2888:3888
server.3=192.168.237.132:2888:3888

我已经创建了myid: myid and zookeeper creates zookeeper_server.pid each time when I start zookeeper

Zookeper不使用myid,但每次都会创建一个新的随机zookeeper_server.pid。

下面是zookeeper.out:

2016-06-09 19:06:28,768 [myid:] - INFO  [main:QuorumPeerConfig@103] - Reading configuration from: /usr/src/zookeeper-3.4.6/bin/../conf/zoo.cfg
2016-06-09 19:06:28,778 [myid:] - INFO  [main:QuorumPeerConfig@340] - Defaulting to majority quorums
2016-06-09 19:06:28,779 [myid:] - ERROR [main:QuorumPeerMain@85] - Invalid config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /usr/src/zookeeper-3.4.6/bin/../conf/zoo.cfg
    at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:123)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.lang.IllegalArgumentException: /usr/src/zookeeper/myid file is missing
    at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:350)
    at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:119)
    ... 2 more
Invalid config, exiting abnormally

0 个答案:

没有答案