Problem description

Error starting the Kafka cluster. Error: ZooKeeper must be enabled to start the Kafka cluster.

ERROR Unexpecte exception, exiting abnormally(org.apache.zookeeper.erver.ZookeeperServerMain)java,net,BindException: Address is already in use at XXX at XXX

Problem analysis

The port is probably being used

Problem solving

1, first check the port occupancy

sudo netstat -atunlp | grep 2181

2. Kill the occupant process

Sudo kill -9 < PID> for port

3. Just restart ZooKeeper


Related articles

  • ZooKeeper failed to start, log report

Suppose you want to see

  • Introduction to Kafka