Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Config, Exiting abnormally when launching zookeper from Kafka tutorial

I'm following this tutorial trying to set up kafka,

https://kafka.apache.org/quickstart

And I get this error when doing the part on zookeeper. It certainly has something to do with the config, but I don't understand to what extend.

bin/zookeeper-server-start.sh config/server.properties
[2018-03-17 03:27:11,623] INFO Reading configuration from: config/server.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2018-03-17 03:27:11,628] ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/server.properties
    at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:154)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:101)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.lang.NumberFormatException: For input string: "initial.rebalance.delay.ms"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Long.parseLong(Long.java:589)
    at java.lang.Long.parseLong(Long.java:631)
at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parseProperties(QuorumPeerConfig.java:242)
    at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:150)
    ... 2 more
Invalid config, exiting abnormally
like image 380
Ilan Avatar asked Mar 17 '18 09:03

Ilan


People also ask

Why ZooKeeper is removed from Kafka?

Replacing ZooKeeper with internally managed metadata will improve scalability and management, according to Kafka's developers. Change is coming for users of Apache Kafka, the leading distributed event-streaming platform.

Is it mandatory to use ZooKeeper in Kafka?

In Kafka architecture, Zookeeper serves as a centralized controller for managing all the metadata information about Kafka producers, brokers, and consumers. However, you can install and run Kafka without Zookeeper.

What does ZooKeeper do for Kafka?

ZooKeeper is used in distributed systems for service synchronization and as a naming registry. When working with Apache Kafka, ZooKeeper is primarily used to track the status of nodes in the Kafka cluster and maintain a list of Kafka topics and messages.


1 Answers

If you look closely, you'll notice that the command to start Zookeeper is:

bin/zookeeper-server-start.sh config/zookeeper.properties

Using the zookeeper.properties file.

It looks like you copied the command to start Kafka which is using server.properties.

like image 73
Mickael Maison Avatar answered Sep 29 '22 14:09

Mickael Maison