问题描述
为了安装 kafka ,我下载了 kafka tar 文件夹.要启动服务器,我尝试了以下命令:
To install kafka , I downloaded the kafka tar folder. To start the server I tried this command :
bin/zookeeper-server-start.sh config/zookeeper.properties
输入上述命令时出现以下错误:
The following error occured on entering the above command:
INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2014-08-21 11:53:55,748] FATAL Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/zookeeper.properties
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:110)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:99)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:76)
Caused by: java.lang.IllegalArgumentException: config/zookeeper.properties file is missing
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:94)
... 2 more
Invalid config, exiting abnormally
是不是需要单独设置zookeeper?我该如何解决这个问题?
Is it that I need to setup zookeeper separately? How could I resolve this?
推荐答案
基本上就是因为这个java.lang.IllegalArgumentException: config/zookeeper.properties 文件丢失
如果你能分享你到目前为止到底做了什么,那将非常有用.还要检查上述位置是否存在相同的文件,并且您正在从正确的位置运行命令..它应该从您的 $KAFKA_HOME
文件夹(您已在其中解压缩 tar 文件)运行)
it would be really useful if you could share what exactly have you done so far. Also check if the same file exists at the said location and you are running the command from the correct location .. it is supposed to be run from your $KAFKA_HOME
folder (where you've extracted the tar file)
这篇关于设置 kafka 时的 Zookeeper 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!