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?
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)
For Windows:
- Go to the folder "kafka_2.11-2.0.0 \ bin \ windows"
- Then run "zookeeper-server-start.bat ../../ config / zookeeper.properties"
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.
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.
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.
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.
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
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.
- Now open a Powershell prompt and navigate to the myKafka folder.
- Run the following command:
.\kafkaDir\bin\windows\zookeeper-server-start.bat
.\kafkaDir\config\zookeeper.properties
Zookeeper will start.
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.
Enter command ---> cd / usr / local / Cellar / kafka / 2.3.0
Enter command -> cd libex
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
You have to start from the Kafka home directory, but you are running out of the recycle bin.