Using 0.8 head

I have a 2-node broker cluster, One of which I had to restart as it was
down while the producers are pushing data into kafka broker for 2 topics.

When the 2nd broker came up, I get exception in the broker below.

The 2nd topic consumer is not getting any data.

Why does not the leader recover when I restart the 2nd broker ?



Stack Trace:
.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [xxzztopic2,0]
    at
kafka.server.KafkaApis$$anonfun$17$$anonfun$20.apply(KafkaApis.scala:468)
    at
kafka.server.KafkaApis$$anonfun$17$$anonfun$20.apply(KafkaApis.scala:456)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
    at scala.collection.immutable.List.map(List.scala:45)
    at kafka.server.KafkaApis$$anonfun$17.apply(KafkaApis.scala:456)
    at kafka.server.KafkaApis$$anonfun$17.apply(KafkaApis.scala:452)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at scala.collection.immutable.Set$Set2.foreach(Set.scala:101)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
    at scala.collection.immutable.Set$Set2.map(Set.scala:87)
    at
kafka.server.KafkaApis.handleTopicMetadataRequest(KafkaApis.scala:452)
    at kafka.server.KafkaApis.handle(KafkaApis.scala:69)
    at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:42)
    at java.lang.Thread.run(Thread.java:724)
[2013-11-07 07:34:21,868] INFO Closing socket connection to /10.4.241.254.
(kafka.network.Processor)
[2013-11-07 07:34:22,073] ERROR [KafkaApi-2] Error while fetching metadata
for partition [xxzztopic1,0] (kafka.server.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [xxzztopic1,0]
    at
kafka.server.KafkaApis$$anonfun$17$$anonfun$20.apply(KafkaApis.scala:468)
    at
kafka.server.KafkaApis$$anonfun$17$$anonfun$20.apply(KafkaApis.scala:456)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
    at scala.collection.immutable.List.map(List.scala:45)
    at kafka.server.KafkaApis$$anonfun$17.apply(KafkaApis.scala:456)
    at kafka.server.KafkaApis$$anonfun$17.apply(KafkaApis.scala:452)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at scala.collection.immutable.Set$Set2.foreach(Set.scala:101)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
    at scala.collection.immutable.Set$Set2.map(Set.scala:87)
    at
kafka.server.KafkaApis.handleTopicMetadataRequest(KafkaApis.scala:452)
    at kafka.server.KafkaApis.handle(KafkaApis.scala:69)
    at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:42)
    at java.lang.Thread.run(Thread.java:724)
[2013-11-07 07:34:22,073] ERROR [KafkaApi-2] Error while fetching metadata
for partition [xxzztopic2,0] (kafka.server.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [xxzztopic2,0]
    at
kafka.server.KafkaApis$$anonfun$17$$anonfun$20.apply(KafkaApis.scala:468)
    at
kafka.server.KafkaApis$$anonfun$17$$anonfun$20.apply(KafkaApis.scala:456)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
    at scala.collection.immutable.List.map(List.scala:45)
    at kafka.server.KafkaApis$$anonfun$17.apply(KafkaApis.scala:456)
    at kafka.server.KafkaApis$$anonfun$17.apply(KafkaApis.scala:452)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
    at scala.collection.immutable.Set$Set2.foreach(Set.scala:101)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
    at scala.collection.immutable.Set$Set2.map(Set.scala:87)
    at
kafka.server.KafkaApis.handleTopicMetadataRequest(KafkaApis.scala:452)
    at kafka.server.KafkaApis.handle(KafkaApis.scala:69)
    at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:42)
    at java.lang.Thread.run(Thread.java:724)

-- 
Kind Regards,
Shafaq

Reply via email to