Zookeeper 无效的配置,从Kafka启动zookeper时异常退出

xzv2uavs  于 2022-12-16  发布在  Apache
关注(0)|答案(1)|浏览(335)

while doing setup facing the following issue

C:\ProgramData\confluent-6.2.1\bin\windows>zookeeper-server-start.bat zookeeper.properties
[2021-10-12 18:16:00,983] INFO Reading configuration from: zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2021-10-12 18:16:00,985] WARN zookeeper.properties is relative. Prepend .\ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2021-10-12 18:16:00,986] ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing zookeeper.properties
        at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:157)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:113)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82)
Caused by: java.lang.IllegalArgumentException: zookeeper.properties file is missing
        at org.apache.zookeeper.server.util.VerifyingFileFactory.doFailForNonExistingPath(VerifyingFileFactory.java:51)
        at org.apache.zookeeper.server.util.VerifyingFileFactory.validate(VerifyingFileFactory.java:45)
        at org.apache.zookeeper.server.util.VerifyingFileFactory.create(VerifyingFileFactory.java:40)
        at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:142)
        ... 2 more
Invalid config, exiting abnormally

Does anybody know how to solve this?

sulc1iza

sulc1iza1#

It seems that you did not configure the location of the properties file (zookeeper.properties file is missing) in a correct manner. You can fist double check if it exists and then supply the file at launch as in following example from Linux command line (and for a service it will be the same):

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

Here the folder is relative to the current one, but an absolute path is safer. Beware that in windows the slashes will be inverted, so in your case, the correct command should be something like:

C:\ProgramData\confluent-6.2.1\bin\windows>zookeeper-server-start.bat C:\ProgramData\confluent-6.2.1\config\zookeeper.properties

相关问题