Zookeeper issue in setting kafka

房东的猫 提交于 2019-12-01 17:58:23

This is basically because of this
java.lang.IllegalArgumentException: config/zookeeper.properties file is missing

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)

Hemant Rajguru

For Windows:

  1. Go to "kafka_2.11-2.0.0\bin\windows" folder
  2. Then run "zookeeper-server-start.bat ../../config/zookeeper.properties"
Siddharth Mevada

I faced the exact same error, and after a while I realized that the reason for the error was, I wasn't able to find the zookeeper.properties file, and that was because the path wasn't correct, I installed kafka through brew so the config folder was created inside libexec, so find where the config directory is and check for zookeeper.properties inside it and give that path.

I saw when you run the above command it doesn't take config file. So if you Put complete path like c:\Kafka\config\zookeeper.properties... this works.

Had the same issue.

I was following this guide and step 2 mentions to run this command: bin/zookeeper-server-start.sh config/zookeeper.properties I had 2 problems, that first was that I wasn't inside the root directory of the file you untar and the second was that I didn't copy the complete command. Make sure both of them are correct and try again.

Just make sure that whether /config folder exist or not.

Try to type properties directly. e.g. zookeeper-server-start zookeeper.properties

I installed it with homebrew, it works.

pratik mishra

This happens because bin/windows is added to the path but kafka/config is not.
Just navigate to your kafka folder and then try to run. I am adding screenshot if it can help.

Before

After

kieronjava

You can use Powershell as an alternative to CMD.

Consider myKafka is your kafka home directory, Extract your kafka tar file here. Extracted folder(KafkaDir) will be having ./bin,/config, etc. internal folders.

  1. Now, open Powershell prompt, go to myKafka folder.
  2. Run below command:
.\kafkaDir\bin\windows\zookeeper-server-start.bat
.\kafkaDir\config\zookeeper.properties

Zookeeper will get start.

I too faced the same issue when I installed kafka from Brew on Macbook

This is happening because the zookeeper.properties file is not in config of bin.

Follow these step.

  1. Enter the command---> cd /usr/local/Cellar/kafka/2.3.0

  2. Enter the command ---->cd libex

  3. Now enter the command--->zookeeper-server-start config/zookeeper.properties

You will get the INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory) Message.

Earlier I was getting this error:

$ zookeeper-server-start config/zookeeper.properties [2019-10-02 14:35:20,159] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig) [2019-10-02 14:35:20,160] ERROR 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:156) at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:104) at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81) Caused by: java.lang.IllegalArgumentException: config/zookeeper.properties file is missing at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:140) ... 2 more Invalid config, exiting abnormally

Have to run in from Kafka home directory, but you are running from the bin.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!