Zookeeper problem in kafka setup

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 occurred while 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

      

Do I need to configure zookeeper separately? How can I solve this?

+5


source to share


10 replies


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



it would be very helpful if you could share exactly what you have done so far. Also check if the same file exists in the specified location and you are executing the command from the correct location. It is supposed to be run from your folder $KAFKA_HOME

(where you extracted the tar file)

+10


source


For Windows:



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


source


I ran into the same error and after a while I realized that the reason for the error I could not find the file zookeeper.properties

and it was because the path was wrong, I installed kafka via brew, so the config folder was created inside libexec. so find where the config directory is and check zookeeper.properties

inside it and point that path.

+1


source


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

+1


source


There was the same problem.

I followed this tutorial and step 2 mentioned to run this command: bin / zookeeper-server-start.sh config / zookeeper.properties I had 2 problems, firstly I was not in the root directory of a file that you unpacked and secondly, I didn't copy the whole command. Make sure they are both correct and try again.

0


source


Just make sure the / config folder exists or not.

Try entering properties directly. for example zookeeper-server-start zookeeper.properties

I installed this with homebrew, it works.

0


source


This is because it is bin/windows

added to the path and kafka/config

not.
Just go to the kafka folder and try running. I am adding a screenshot if it can help.

Before

After

0


source


You can use Powershell as an alternative to CMD.

Let's assume myKafka

this is your kafka home directory. Extract the tar file for kafka here. The extracted folder (KafkaDir) will have ./bin,/config

etc. Internal folders.

  1. Now open a Powershell prompt and navigate to the myKafka folder.
  2. Run the following command:
.\kafkaDir\bin\windows\zookeeper-server-start.bat
.\kafkaDir\config\zookeeper.properties

      

Zookeeper will start.

0


source


I also faced the same problem when I installed kafka from Brew on Macbook

This is because the zookeeper.properties file is missing from the bin configuration.

Follow these steps.

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

  2. Enter command -> cd libex

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

You will get an INFO binding on port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory).

I was getting this error earlier:

$ zookeeper-server-start config / zookeeper.properties [2019-10-02 14:35: 20,159] INFORMATION Reading configuration from: config / zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig) [2019-10 -02 14: 35: 20,160] ERROR Invalid config, wrong exit (org.apache.zookeeper.server.quorum.QuorumPeerMain) org.apache.zookeeper.server.quorum.QuorumPeerConfig $ ConfigException: Error processing config / zooke.proeper org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse (QuorumPeerConfig.java:156) to org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun (QuorumPeer4Mainver.java.java) quorum.QuorumPeerMain.main (QuorumPeerMain.java:81) Reasons: java.lang.IllegalArgumentException: Missing config / zookeeper.properties file in org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse (QuorumPeerConfig.java:140) ... 2 more Wrong config, abnormal output

0


source


You have to start from the Kafka home directory, but you are running out of the recycle bin.

-2


source







All Articles