在windows上安装kafka returns ERROR Invalid config, exiting exitingly (org.apache.zookeeper.server.quorum.QuorumPeerMain)
Install kafka on windowns returns ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
当我 运行 在 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)
命令应该是这样的:
.\zookeeper-server-start.bat ..\..\etc\kafka\zookeeper.properties
Confluent 不支持 运行 他们在 Windows 上的服务。
如果必须使用 windows 主机,请使用 WSL2 https://www.confluent.io/blog/set-up-and-run-kafka-on-windows-linux-wsl-2/
相关postUnable to produce to Kafka topic that is running on WSL 2 from Windows
当我 运行 在 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)
命令应该是这样的:
.\zookeeper-server-start.bat ..\..\etc\kafka\zookeeper.properties
Confluent 不支持 运行 他们在 Windows 上的服务。
如果必须使用 windows 主机,请使用 WSL2 https://www.confluent.io/blog/set-up-and-run-kafka-on-windows-linux-wsl-2/
相关postUnable to produce to Kafka topic that is running on WSL 2 from Windows