Hi, don't know exactly can help but I got the same LeaderNotAvailableException while playing (several restarts) with different versions of Zookeeper pointing to the same dataDir (without cleaning that between restarts)

Regards,
Andrea

On 05/14/2013 06:12 PM, Yu, Libo wrote:
Hi,

I have 3 machines on a cluster. Normally, I start zookeepers on all three
before I launch kafka servers. Today for each machine I start zookeeper
first and then kafka server. I noticed this error from one machine:
The process was  still running but it seems the server stopped responding.
I published some data to the cluster. As soon as the producer connected
to this broker, it disconnected.


[2013-05-14 11:51:02,976] ERROR Error while fetching metadata for partition 
[jm85
305.topic.1,0] (kafka.admin.AdminUtils$)
kafka.common.LeaderNotAvailableException: Leader not available for topic 
jm85305.
topic.1 partition 0
         at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:217)
         at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:201)
         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.s
cala: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.admin.AdminUtils$.kafka$admin$AdminUtils$$fetchTopicMetadataFromZk(AdminUtils.scala:201)
         at 
kafka.admin.AdminUtils$$anonfun$fetchTopicMetadataFromZk$1.apply(AdminUtils.scala:194)
         at 
kafka.admin.AdminUtils$$anonfun$fetchTopicMetadataFromZk$1.apply(AdminUtils.scala:194)
         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$Set1.foreach(Set.scala:81)
         at 
scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
         at scala.collection.immutable.Set$Set1.map(Set.scala:68)
         at 
kafka.admin.AdminUtils$.fetchTopicMetadataFromZk(AdminUtils.scala:194)
         at 
kafka.server.KafkaApis.handleTopicMetadataRequest(KafkaApis.scala:463)
         at kafka.server.KafkaApis.handle(KafkaApis.scala:67)
         at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:41)
         at java.lang.Thread.run(Thread.java:722)
Caused by: java.util.NoSuchElementException: head of empty list
         at scala.collection.immutable.Nil$.head(List.scala:386)
         at scala.collection.immutable.Nil$.head(List.scala:383)
         at kafka.admin.AdminUtils$$anonfun$3.apply(AdminUtils.scala:215)
         ... 20 more
[2013-05-14 11:51:03,034] INFO Closing socket connection to /XX.XX.XX.XX. 
(kafka.network.Processor)
[2013-05-14 11:51:03,416] ERROR Error while fetching metadata for partition 
[jm85305.topic.1,0] (kafka

Regards,

Libo



Reply via email to