Zookeeper issue in setting kafka

2020-03-18 05:30发布

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

Is it that I need to setup zookeeper separately? How could I resolve this?

10条回答
Juvenile、少年°
2楼-- · 2020-03-18 06:20

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

查看更多
三岁会撩人
3楼-- · 2020-03-18 06:21

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.

查看更多
相关推荐>>
4楼-- · 2020-03-18 06:24

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.

查看更多
淡お忘
5楼-- · 2020-03-18 06:27

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

查看更多
登录 后发表回答