'Zookeeper & Kafka - Error Invalid config, exiting abnormally

I tried to run ZooKeeper in Apache Kafka ubuntu and i got this error:

error i got for zookeeper

also kafka process terminated with this error

022-02-23 01:08:23,690] INFO shutting down (kafka.server.KafkaServer)
[2022-02-23 01:08:23,709] INFO App info kafka.server for 0 unregistered  (org.apache.kafka.common.utils.AppInfoParser)


[2022-02-23 01:08:23,710] INFO shut down completed (kafka.server.KafkaServer)
[2022-02-23 01:08:23,711] ERROR Exiting Kafka. (kafka.Kafka$)
[2022-02-23 01:08:23,725] INFO shutting down (kafka.server.KafkaServer)


Solution 1:[1]

  1. Don't use sudo

  2. -daemon is only needed with the server-start scripts.

  3. You need to change directories to the location where either bin or config folders exist, or use absolute paths for both.

  4. .properties.sh is not a valid file extension for any files unless you've renamed them

  5. You should really add $KAFKA_HOME/bin folder to your PATH... The location of the properties file doesn't matter as long as you give an absolute path.

Overall, I suggest following the APT installation instructions from Confluent Platform or use brew, and use systemctl or brew services to start/stop Kafka and Zookeeper.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 OneCricketeer