在窗口上安装kafka返回错误无效配置,异常退出(org.apache.zookeeper.server.quorum.QuorumPeerMain)

mepcadol  于 2022-12-16  发布在  Apache
关注(0)|答案(2)|浏览(271)

当我在cmd中运行这个命令来启动Windows上的Zookeeper时

PS D:\Users\e.akbar\Downloads\confluent-community-7.0.1\confluent-7.0.1\bin\windows> .\zookeeper-server-start.bat .\etc\kafka\zookeeper.properties

但我得到这个错误:

PS D:\Users\e.akbar\Downloads\confluent-community-7.0.1\confluent-7.0.1\bin\windows> .\zookeeper-server-start.bat .\etc\kafka\zookeeper.properties
[2022-01-25 13:26:02,943] INFO Reading configuration from: .\etc\kafka\zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2022-01-25 13:26:02,944] ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing .\etc\kafka\zookeeper.properties
        at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:198) 
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:124)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:90)
Caused by: java.lang.IllegalArgumentException: .\etc\kafka\zookeeper.properties file is missing
        at org.apache.zookeeper.server.util.VerifyingFileFactory.doFailForNonExistingPath(VerifyingFileFactory.java:54)
        at org.apache.zookeeper.server.util.VerifyingFileFactory.validate(VerifyingFileFactory.java:47)
        at org.apache.zookeeper.server.util.VerifyingFileFactory.create(VerifyingFileFactory.java:39)
        at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:180)
        ... 2 more
Invalid config, exiting abnormally
[2022-01-25 13:26:02,948] INFO ZooKeeper audit is disabled. (org.apache.zookeeper.audit.ZKAuditProvider)
[2022-01-25 13:26:02,950] ERROR Exiting JVM with code 2 (org.apache.zookeeper.util.ServiceUtils)
bf1o4zei

bf1o4zei1#

该命令应为:

.\zookeeper-server-start.bat ..\..\etc\kafka\zookeeper.properties

字符串

kninwzqo

kninwzqo2#

Confluent不支持在Windows上运行其服务。
如果必须使用Windows主机,请使用WSL2 https://www.confluent.io/blog/set-up-and-run-kafka-on-windows-linux-wsl-2/
相关帖子无法从Windows生成运行在WSL 2上的Kafka主题

相关问题