Kafka is failing to change state to Online

I found a fix. I’m not sure what type of data-loss it incurs, but I was willing to take the risk.

It seems that the Kafka cluster depends on Zookeeper to bootstrap. So I assumed that my Zookeeper data was in a bad/unrecoverable state. What I did was shut down the service and deleted both docker volumes related to those services.

docker volume rm sentry-kafka
docker volume rm sentry-zookeeper

You may have to remove the kafka_1 and other containers before it lets you. Then re-create the volumes.

docker volume create sentry-kafka
docker volume create sentry-zookeeper

Then boot everything back up. Once I did I noticed the Kafka server loaded up fine and errors posted to the server started processing again.

1 Like