如何解决zookeeper.properties文件丢失错误

b91juud3  于 12个月前  发布在  Apache
关注(0)|答案(3)|浏览(271)

我试图启动一个Zookeper示例,我一直得到一个错误,说zookeeper.properties文件不存在..而事实上它确实存在。
$ ./script.sh [2019-06-30 07:40:00,844] INFO阅读配置来自:.\website\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 at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:156)at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:104)at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81)Caused by:java.lang.IllegalArgumentException:.\n\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

mf98qq94

mf98qq941#

请检查脚本中的属性文件名。
./bin/zookeeper-server-start.sh./config/zookepeer.properties.将其更改为,

./bin/zookeeper-server-start.sh ./config/zookeeper.properties

字符串
并检查。

0qx6xfy6

0qx6xfy62#

试试这个

./zookeeper-server-start.sh ../config/zookeeper.properties

字符串
您所在的位置是bin目录。

ct3nt3jp

ct3nt3jp3#

在D:\Learning\kafka\kafka_2.13-3.5.0\bin\windows>中打开cmd并运行

zookeeper-server-start.bat ..\..\config\zookeeper.properties

字符串
在D:\Learning\kafka\kafka_2.13-3.5.0\bin\windows>中打开另一个cmd并运行

kafka-server-start.bat ..\..\config\server.properties

相关问题