我正在尝试启动Zookeper
实例,但不断收到错误消息,提示zookeeper.properties
文件不存在。实际上,它确实存在。
$ ./script.sh [2019-06-30 07:40:00,844] INFO读取配置 来自:。\ config \ zookepeer.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)[2019-06-30 07:40:00,844]错误的配置无效,异常退出 (org.apache.zookeeper.server.quorum.QuorumPeerMain) org.apache.zookeeper.server.quorum.QuorumPeerConfig $ ConfigException: 处理./config/zookepeer.properties时出错 在org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:156) 在org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:104) 在org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81) 造成原因:java.lang.IllegalArgumentException: 。\ config \ zookepeer.properties文件丢失 在org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:140) ... 2另外无效的配置,异常退出
文件夹结构
-root
-config
-zookeeper.properties
-bin
-zookeeper-server-start.sh
-script.sh
脚本
./bin/zookeeper-server-start.sh ./config/zookepeer.properties
Zookeeper.properties
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=0
答案 0 :(得分:1)
请在脚本中检查属性文件名。
./ bin / zookeeper-server-start.sh ./config/ zookepeer.properties 。 更改为
./bin/zookeeper-server-start.sh ./config/zookeeper.properties
然后检查。
答案 1 :(得分:0)
尝试一下
./zookeeper-server-start.sh ../config/zookeeper.properties
因此您位于 bin 目录中。