apache-kafkaapache-zookeeper

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

Solution

  • 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.