网站建设资讯详细

ZooKeeper搭建伪集群模式是启动不了,集群启动报错Invalid config, exiting abnormally,conf\zoo-3.cfg is relative. Prepend .\ to indicate that you

发表日期:2024-08-04 08:10:53   作者来源:水沐科技   浏览:527       

 ZooKeeper搭建伪集群模式是启动不了,集群启动报错Invalid config, exiting abnormally,confzoo-3.cfg is relative. Prepend . to indicate that you,如下所示:

 …confzoo1.cfg is relative. Prepend . to indicate that you’re sure!

ERROR [main:QuorumPeerMain@85] - Invalid config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: 
Error processing /root/zookeeper/apache-zookeeper-3.7.0-bin/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: /tmp/zookeeper-3/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

经过几个小时尝试, 可能是未按正确步骤设置,在提示myid file不存在时,可在数据目录下创建该文件,启动后发现该文件消失,新文件zookeeper_server.pid生成。

数据文件下/tmp/zookeeper-1:

再次./start.sh 重启或者停止都可正常执行,没有再出现错误。