当我在cmd中运行此命令以在windows 上启动Zookeeper时
PS D:Userse.akbarDownloadsconfluent-community-7.0.1confluent-7.0.1binwindows> .zookeeper-server-start.bat .etckafkazookeeper.properties
但我得到了这个错误:
PS D:Userse.akbarDownloadsconfluent-community-7.0.1confluent-7.0.1binwindows> .zookeeper-server-start.bat .etckafkazookeeper.properties
[2022-01-25 13:26:02,943] INFO Reading configuration from: .etckafkazookeeper.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 .etckafkazookeeper.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: .etckafkazookeeper.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 ....etckafkazookeeper.properties
Confluent不支持在Windows上运行其服务。
如果必须使用windows主机,请使用WSL2https://www.confluent.io/blog/set-up-and-run-kafka-on-windows-linux-wsl-2/
相关帖子无法从Windows 生成运行在WSL 2上的Kafka主题