Description
The controller enters a loop with the error as
[2017-10-12 21:40:09,532] ERROR Error while electing or becoming leader on broker 13 (kafka.server.ZookeeperLeaderElector) kafka.common.KafkaException: Can't parse json string: null at kafka.utils.Json$.liftedTree1$1(Json.scala:40) at kafka.utils.Json$.parseFull(Json.scala:36) at kafka.utils.ZkUtils$$anonfun$getReplicaAssignmentForTopics$1.apply(ZkUtils.scala:684) at kafka.utils.ZkUtils$$anonfun$getReplicaAssignmentForTopics$1.apply(ZkUtils.scala:680) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at kafka.utils.ZkUtils.getReplicaAssignmentForTopics(ZkUtils.scala:680) at kafka.controller.KafkaController.initializeControllerContext(KafkaController.scala:736) at kafka.controller.KafkaController.onControllerFailover(KafkaController.scala:334) at kafka.controller.KafkaController$$anonfun$1.apply$mcV$sp(KafkaController.scala:167) at kafka.server.ZookeeperLeaderElector.elect(ZookeeperLeaderElector.scala:84)
A kafka-topics --describe can be issued to figure out which topic partition has the problem. However, this would be easier for the user if the actual zk path with the null or malformed entry would be printed out.