Skip to content

Instantly share code, notes, and snippets.

@jamescway
Created March 18, 2015 17:18
Show Gist options
  • Save jamescway/2ce194437c28e1bcdeab to your computer and use it in GitHub Desktop.
Save jamescway/2ce194437c28e1bcdeab to your computer and use it in GitHub Desktop.
Dark spell
Fix Leader election Problems
[Note] this method may work every time
[Note] this was initially caused by deleting the kafka hosts and reprovisioning
delete the topic using zkCli.sh
rmr /brokers/topics/test2
sudo service kafka restart (on all the broker hosts using rundeck)
change to a different topic in your producer
you might see the number of LeaderNotAvailableException go down, maybe its doing some kind of replication here
at this point the consumer should be able to get messages and if u produce more, it should have fewer exceptions or 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment