You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Jiang Jacky <ji...@gmail.com> on 2013/10/11 02:32:50 UTC

Kafka cannot produce message

Hi, I run into kafka issue recently, when I try to produce a message, it
gives me follow error

[2013-10-11 00:30:26,740] INFO Fetching metadata from broker
id:0,host:localhost,port:9092 with correlation id 47 for 1 topic(s)
Set(my-replicated-topic) (kafka.client.ClientUtils$)
[2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for producing
(kafka.producer.SyncProducer)
[2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
(kafka.producer.SyncProducer)
[2013-10-11 00:30:26,753] INFO Closing socket connection to /127.0.0.1.
(kafka.network.Processor)
[2013-10-11 00:30:26,754] WARN Error while fetching metadata
[{TopicMetadata for topic my-replicated-topic ->
No partition metadata for topic my-replicated-topic due to
kafka.common.LeaderNotAvailableException}] for topic [my-replicated-topic]:
class kafka.common.LeaderNotAvailableException
 (kafka.producer.BrokerPartitionInfo)
[2013-10-11 00:30:26,755] ERROR Failed to collate messages by topic,
partition due to: Failed to fetch topic metadata for topic:
my-replicated-topic (kafka.producer.async.DefaultEventHandler)
[2013-10-11 00:30:26,755] INFO Back off for 100 ms before retrying send.
Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
[2013-10-11 00:30:26,856] INFO Fetching metadata from broker
id:0,host:localhost,port:9092 with correlation id 48 for 1 topic(s)
Set(my-replicated-topic) (kafka.client.ClientUtils$)
[2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for producing
(kafka.producer.SyncProducer)
[2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
(kafka.producer.SyncProducer)
[2013-10-11 00:30:26,874] INFO Closing socket connection to /127.0.0.1.
(kafka.network.Processor)
[2013-10-11 00:30:26,875] WARN Error while fetching metadata
[{TopicMetadata for topic my-replicated-topic ->
No partition metadata for topic my-replicated-topic due to
kafka.common.LeaderNotAvailableException}] for topic [my-replicated-topic]:
class kafka.common.LeaderNotAvailableException
 (kafka.producer.BrokerPartitionInfo)
[2013-10-11 00:30:26,876] ERROR Failed to send requests for topics
my-replicated-topic with correlation ids in [41,48]
(kafka.producer.async.DefaultEventHandler)
[2013-10-11 00:30:26,876] ERROR Error in handling batch of 1 events
(kafka.producer.async.ProducerSendThread)
kafka.common.FailedToSendMessageException: Failed to send messages after 3
tries.
        at
kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
        at
kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
        at
kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
        at
kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
        at scala.collection.immutable.Stream.foreach(Stream.scala:254)
        at
kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
        at
kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)


I have no idea why the leader is not available.Can someone give me a hint?
Thanks a lot.

Re: Kafka cannot produce message

Posted by Neha Narkhede <ne...@gmail.com>.
Does the change to /etc/hosts resolve this issue as well?


On Fri, Oct 11, 2013 at 8:16 AM, Jun Rao <ju...@gmail.com> wrote:

> Apache email doesn't allow attachment. Could you try the latest code in the
> 0.8 branch and see if the same issue exists?
>
> Thanks,
>
> Jun
>
>
> On Thu, Oct 10, 2013 at 10:20 PM, Jiang Jacky <ji...@gmail.com> wrote:
>
> >
> > for those 2 logs directly in my ~/kafka_2.8.0-0.8.0-beta1, Maybe I did
> not
> > set the log output to indicated directory.
> > I will attach my 3 logs to you. server.log, controller.log and
> > state-change.log
> >
> > for testing, I changed the port to 9093, and each time, I produce message
> > it gives me error
> >
> > [2013-10-11 05:12:16,948] INFO Fetching metadata from broker
> > id:0,host:localhost,por
> >
> >                                                           t:9093 with
> > correlation id 0 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
> >
> >
> >                                 lientUtils$)
> > [2013-10-11 05:12:16,966] INFO Connected to localhost:9093 for producing
> > (kafka.prod
> >
> >                                               ucer.SyncProducer)
> > [2013-10-11 05:12:16,997] ERROR [KafkaApi-0] Error while fetching
> metadata
> > for parti
> >
> >                                             tion [my-replicated-topic,0]
> > (kafka.server.KafkaApis)
> > kafka.common.LeaderNotAvailableException: Leader not available for
> > partition [my-rep
> >
> >                                                     licated-topic,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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
> >
> >
> >                                 a: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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la: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.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-10-11 05:12:17,066] INFO Disconnecting from localhost:9093
> > (kafka.producer.Syn
> >
> >                                                       cProducer)
> > [2013-10-11 05:12:17,069] INFO Closing socket connection to /127.0.0.1.
> > (kafka.netwo
> >
> >                                                 rk.Processor)
> > [2013-10-11 05:12:17,099] WARN Error while fetching metadata    partition
> > 0     lead
> >
> >                                               er: none        replicas:
> >   isr:    isUnderReplicated: false for topic partition
> >
> >
> >                [my-replicated-topic,0]: [class
> > kafka.common.LeaderNotAvailableException] (kafka.pr
> >
> >
> >             oducer.BrokerPartitionInfo)
> > [2013-10-11 05:12:17,117] WARN Failed to collate messages by
> > topic,partition due to:
> >
> >                                                            No leader for
> > any partition in topic my-replicated-topic (kafka.producer.async.Defa
> >
> >
> >                             ultEventHandler)
> > [2013-10-11 05:12:17,119] INFO Back off for 100 ms before retrying send.
> > Remaining r
> >
> >                                               etries = 3
> > (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 05:12:17,222] INFO Fetching metadata from broker
> > id:0,host:localhost,por
> >
> >                                                           t:9093 with
> > correlation id 2 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
> >
> >
> >                                 lientUtils$)
> > [2013-10-11 05:12:17,223] INFO Connected to localhost:9093 for producing
> > (kafka.prod
> >
> >                                               ucer.SyncProducer)
> > [2013-10-11 05:12:17,225] ERROR [KafkaApi-0] Error while fetching
> metadata
> > for parti
> >
> >                                             tion [my-replicated-topic,0]
> > (kafka.server.KafkaApis)
> > kafka.common.LeaderNotAvailableException: Leader not available for
> > partition [my-rep
> >
> >                                                     licated-topic,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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
> >
> >
> >                                 a: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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la: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.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-10-11 05:12:17,228] INFO Disconnecting from localhost:9093
> > (kafka.producer.Syn
> >
> >                                                       cProducer)
> > [2013-10-11 05:12:17,228] INFO Closing socket connection to /127.0.0.1.
> > (kafka.netwo
> >
> >                                                 rk.Processor)
> > [2013-10-11 05:12:17,229] WARN Error while fetching metadata    partition
> > 0     lead
> >
> >                                               er: none        replicas:
> >   isr:    isUnderReplicated: false for topic partition
> >
> >
> >                [my-replicated-topic,0]: [class
> > kafka.common.LeaderNotAvailableException] (kafka.pr
> >
> >
> >             oducer.BrokerPartitionInfo)
> > [2013-10-11 05:12:17,230] WARN Failed to collate messages by
> > topic,partition due to:
> >
> >                                                            No leader for
> > any partition in topic my-replicated-topic (kafka.producer.async.Defa
> >
> >
> >                             ultEventHandler)
> > [2013-10-11 05:12:17,230] INFO Back off for 100 ms before retrying send.
> > Remaining r
> >
> >                                               etries = 2
> > (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 05:12:17,332] INFO Fetching metadata from broker
> > id:0,host:localhost,por
> >
> >                                                           t:9093 with
> > correlation id 4 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
> >
> >
> >                                 lientUtils$)
> > [2013-10-11 05:12:17,332] INFO Connected to localhost:9093 for producing
> > (kafka.prod
> >
> >                                               ucer.SyncProducer)
> > [2013-10-11 05:12:17,334] ERROR [KafkaApi-0] Error while fetching
> metadata
> > for parti
> >
> >                                             tion [my-replicated-topic,0]
> > (kafka.server.KafkaApis)
> > kafka.common.LeaderNotAvailableException: Leader not available for
> > partition [my-rep
> >
> >                                                     licated-topic,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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
> >
> >
> >                                 a: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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la: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.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-10-11 05:12:17,337] INFO Disconnecting from localhost:9093
> > (kafka.producer.Syn
> >
> >                                                       cProducer)
> > [2013-10-11 05:12:17,337] INFO Closing socket connection to /127.0.0.1.
> > (kafka.netwo
> >
> >                                                 rk.Processor)
> > [2013-10-11 05:12:17,338] WARN Error while fetching metadata    partition
> > 0     lead
> >
> >                                               er: none        replicas:
> >   isr:    isUnderReplicated: false for topic partition
> >
> >
> >                [my-replicated-topic,0]: [class
> > kafka.common.LeaderNotAvailableException] (kafka.pr
> >
> >
> >             oducer.BrokerPartitionInfo)
> > [2013-10-11 05:12:17,339] WARN Failed to collate messages by
> > topic,partition due to:
> >
> >                                                            No leader for
> > any partition in topic my-replicated-topic (kafka.producer.async.Defa
> >
> >
> >                             ultEventHandler)
> > [2013-10-11 05:12:17,339] INFO Back off for 100 ms before retrying send.
> > Remaining r
> >
> >                                               etries = 1
> > (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 05:12:17,440] INFO Fetching metadata from broker
> > id:0,host:localhost,por
> >
> >                                                           t:9093 with
> > correlation id 6 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
> >
> >
> >                                 lientUtils$)
> > [2013-10-11 05:12:17,441] INFO Connected to localhost:9093 for producing
> > (kafka.prod
> >
> >                                               ucer.SyncProducer)
> > [2013-10-11 05:12:17,443] ERROR [KafkaApi-0] Error while fetching
> metadata
> > for parti
> >
> >                                             tion [my-replicated-topic,0]
> > (kafka.server.KafkaApis)
> > kafka.common.LeaderNotAvailableException: Leader not available for
> > partition [my-rep
> >
> >                                                     licated-topic,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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
> >
> >
> >                                 a: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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la: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.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-10-11 05:12:17,446] INFO Disconnecting from localhost:9093
> > (kafka.producer.Syn
> >
> >                                                       cProducer)
> > [2013-10-11 05:12:17,446] INFO Closing socket connection to /127.0.0.1.
> > (kafka.netwo
> >
> >                                                 rk.Processor)
> > [2013-10-11 05:12:17,447] WARN Error while fetching metadata    partition
> > 0     lead
> >
> >                                               er: none        replicas:
> >   isr:    isUnderReplicated: false for topic partition
> >
> >
> >                [my-replicated-topic,0]: [class
> > kafka.common.LeaderNotAvailableException] (kafka.pr
> >
> >
> >             oducer.BrokerPartitionInfo)
> > [2013-10-11 05:12:17,448] WARN Failed to collate messages by
> > topic,partition due to:
> >
> >                                                            No leader for
> > any partition in topic my-replicated-topic (kafka.producer.async.Defa
> >
> >
> >                             ultEventHandler)
> > [2013-10-11 05:12:17,448] INFO Back off for 100 ms before retrying send.
> > Remaining r
> >
> >                                               etries = 0
> > (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 05:12:17,549] INFO Fetching metadata from broker
> > id:0,host:localhost,por
> >
> >                                                           t:9093 with
> > correlation id 8 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
> >
> >
> >                                 lientUtils$)
> > [2013-10-11 05:12:17,550] INFO Connected to localhost:9093 for producing
> > (kafka.prod
> >
> >                                               ucer.SyncProducer)
> > [2013-10-11 05:12:17,552] ERROR [KafkaApi-0] Error while fetching
> metadata
> > for parti
> >
> >                                             tion [my-replicated-topic,0]
> > (kafka.server.KafkaApis)
> > kafka.common.LeaderNotAvailableException: Leader not available for
> > partition [my-rep
> >
> >                                                     licated-topic,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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
> >
> >
> >                                 a: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.sca
> >
> >
> >                                 la:206)
> >         at
> > scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
> >
> >
> >                                 la: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.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-10-11 05:12:17,557] INFO Disconnecting from localhost:9093
> > (kafka.producer.Syn
> >
> >                                                       cProducer)
> > [2013-10-11 05:12:17,557] INFO Closing socket connection to /127.0.0.1.
> > (kafka.netwo
> >
> >                                                 rk.Processor)
> > [2013-10-11 05:12:17,558] WARN Error while fetching metadata    partition
> > 0     lead
> >
> >                                               er: none        replicas:
> >   isr:    isUnderReplicated: false for topic partition
> >
> >
> >                [my-replicated-topic,0]: [class
> > kafka.common.LeaderNotAvailableException] (kafka.pr
> >
> >
> >             oducer.BrokerPartitionInfo)
> > [2013-10-11 05:12:17,561] ERROR Failed to send requests for topics
> > my-replicated-top
> >
> >                                                     ic with correlation
> ids
> > in [0,8] (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 05:12:17,563] ERROR Error in handling batch of 1 events
> > (kafka.producer.
> >
> >
> > async.ProducerSendThread)
> > kafka.common.FailedToSendMessageException: Failed to send messages after
> 3
> > tries.
> >         at
> > kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala
> >
> >
> >                                 :90)
> >         at
> > kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.sc
> >
> >
> >                                 ala:104)
> >         at
> > kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(Pr
> >
> >
> >                                 oducerSendThread.scala:87)
> >         at
> > kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(Pr
> >
> >
> >                                 oducerSendThread.scala:67)
> >         at scala.collection.immutable.Stream.foreach(Stream.scala:254)
> >         at
> > kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.
> >
> >
> >                                 scala:66)
> >         at
> > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> >
> >
> > 2013/10/11 Jun Rao <ju...@gmail.com>
> >
> >> under logs/.
> >>
> >> Thanks,
> >>
> >> Jun
> >>
> >>
> >> On Thu, Oct 10, 2013 at 9:56 PM, Jiang Jacky <ji...@gmail.com>
> wrote:
> >>
> >> > Thanks Jun Rao
> >> > Where can I find those logs?
> >> >
> >> >
> >> > 2013/10/11 Jun Rao <ju...@gmail.com>
> >> >
> >> > > Any error in the controller and state-change log?
> >> > >
> >> > > Thanks,
> >> > >
> >> > > Jun
> >> > >
> >> > >
> >> > > On Thu, Oct 10, 2013 at 9:38 PM, Jiang Jacky <ji...@gmail.com>
> >> > wrote:
> >> > >
> >> > > > Hi, Aniket
> >> > > > Thanks for your reply
> >> > > > I checked the log from /tmp/kafka-logs/
> >> > > > There are some empty files, likes 00000000000000000000.index,
> >> > > > 00000000000000000000.log. I cannot find any useful information
> >> there.
> >> > > > However, i found some other interesting things, I have posted here
> >> > > >
> >> >
> https://mail.google.com/mail/ca/u/0/#label/TechDiscuss/141a5c074641dd70
> >> > > > Please have a look. Thanks a lot.
> >> > > >
> >> > > >
> >> > > > 2013/10/11 Aniket Bhatnagar <an...@gmail.com>
> >> > > >
> >> > > > > Hi Jiang
> >> > > > >
> >> > > > > Just thinking out loud, it could be because Kafka can't connect
> to
> >> > > > > Zookeeper. Can you check Kafka logs to validate the same?
> >> > > > >
> >> > > > >
> >> > > > > On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com>
> >> wrote:
> >> > > > >
> >> > > > > > Hi, Everyone, I use the larger memory instance to replace that
> >> > small
> >> > > > one,
> >> > > > > > for now, I can create the topic, but when I try to produce
> >> message,
> >> > > it
> >> > > > > > still gives the same error.
> >> > > > > > Its so weird. can any one help me? Thanks
> >> > > > > >
> >> > > > > >
> >> > > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> >> > > > > >
> >> > > > > > > Another thing need is my instance comes with very small
> >> memory,
> >> > > just
> >> > > > > > 683M,
> >> > > > > > > I am not sure if it is related. I will try to use 8G memory
> >> > > instance.
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> >> > > > > > >
> >> > > > > > >> yes, even I cannot create new topic, same error,
> >> > > leadernotavailable.
> >> > > > > > >> My zookeeper and storm all are working very well, except of
> >> > Kafka.
> >> > > > > > >>
> >> > > > > > >>
> >> > > > > > >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
> >> > > > > > >>
> >> > > > > > >>> Are you trying to produce these messages to a newly
> created
> >> > > topic?
> >> > > > > > >>>
> >> > > > > > >>>
> >> > > > > > >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <
> >> > > jiang01yi@gmail.com>
> >> > > > > > >>> wrote:
> >> > > > > > >>>
> >> > > > > > >>> > can anyone help me? Thanks a lot
> >> > > > > > >>> >
> >> > > > > > >>> >
> >> > > > > > >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> >> > > > > > >>> >
> >> > > > > > >>> > > Hi, I run into kafka issue recently, when I try to
> >> produce
> >> > a
> >> > > > > > >>> message, it
> >> > > > > > >>> > > gives me follow error
> >> > > > > > >>> > >
> >> > > > > > >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from
> >> > broker
> >> > > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 47
> >> for 1
> >> > > > > topic(s)
> >> > > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> >> > > > > > >>> > > [2013-10-11 00:30:26,741] INFO Connected to
> >> localhost:9092
> >> > > for
> >> > > > > > >>> producing
> >> > > > > > >>> > > (kafka.producer.SyncProducer)
> >> > > > > > >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from
> >> > > > localhost:9092
> >> > > > > > >>> > > (kafka.producer.SyncProducer)
> >> > > > > > >>> > > [2013-10-11 00:30:26,753] INFO Closing socket
> connection
> >> > to /
> >> > > > > > >>> 127.0.0.1.
> >> > > > > > >>> > > (kafka.network.Processor)
> >> > > > > > >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching
> >> > metadata
> >> > > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> >> > > > > > >>> > > No partition metadata for topic my-replicated-topic
> due
> >> to
> >> > > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> >> > > > > > >>> > [my-replicated-topic]:
> >> > > > > > >>> > > class kafka.common.LeaderNotAvailableException
> >> > > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> >> > > > > > >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate
> >> messages
> >> > by
> >> > > > > > topic,
> >> > > > > > >>> > > partition due to: Failed to fetch topic metadata for
> >> topic:
> >> > > > > > >>> > > my-replicated-topic
> >> > > (kafka.producer.async.DefaultEventHandler)
> >> > > > > > >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms
> >> before
> >> > > > > retrying
> >> > > > > > >>> send.
> >> > > > > > >>> > > Remaining retries = 0
> >> > > > (kafka.producer.async.DefaultEventHandler)
> >> > > > > > >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from
> >> > broker
> >> > > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 48
> >> for 1
> >> > > > > topic(s)
> >> > > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> >> > > > > > >>> > > [2013-10-11 00:30:26,857] INFO Connected to
> >> localhost:9092
> >> > > for
> >> > > > > > >>> producing
> >> > > > > > >>> > > (kafka.producer.SyncProducer)
> >> > > > > > >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from
> >> > > > localhost:9092
> >> > > > > > >>> > > (kafka.producer.SyncProducer)
> >> > > > > > >>> > > [2013-10-11 00:30:26,874] INFO Closing socket
> connection
> >> > to /
> >> > > > > > >>> 127.0.0.1.
> >> > > > > > >>> > > (kafka.network.Processor)
> >> > > > > > >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching
> >> > metadata
> >> > > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> >> > > > > > >>> > > No partition metadata for topic my-replicated-topic
> due
> >> to
> >> > > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> >> > > > > > >>> > [my-replicated-topic]:
> >> > > > > > >>> > > class kafka.common.LeaderNotAvailableException
> >> > > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> >> > > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send
> requests
> >> for
> >> > > > > topics
> >> > > > > > >>> > > my-replicated-topic with correlation ids in [41,48]
> >> > > > > > >>> > > (kafka.producer.async.DefaultEventHandler)
> >> > > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling
> batch
> >> of
> >> > 1
> >> > > > > events
> >> > > > > > >>> > > (kafka.producer.async.ProducerSendThread)
> >> > > > > > >>> > > kafka.common.FailedToSendMessageException: Failed to
> >> send
> >> > > > > messages
> >> > > > > > >>> after
> >> > > > > > >>> > 3
> >> > > > > > >>> > > tries.
> >> > > > > > >>> > >         at
> >> > > > > > >>> > >
> >> > > > > > >>> >
> >> > > > > > >>>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> >> > > > > > >>> > >         at
> >> > > > > > >>> > >
> >> > > > > > >>> >
> >> > > > > > >>>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> >> > > > > > >>> > >         at
> >> > > > > > >>> > >
> >> > > > > > >>> >
> >> > > > > > >>>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> >> > > > > > >>> > >         at
> >> > > > > > >>> > >
> >> > > > > > >>> >
> >> > > > > > >>>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> >> > > > > > >>> > >         at
> >> > > > > > >>>
> scala.collection.immutable.Stream.foreach(Stream.scala:254)
> >> > > > > > >>> > >         at
> >> > > > > > >>> > >
> >> > > > > > >>> >
> >> > > > > > >>>
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> >> > > > > > >>> > >         at
> >> > > > > > >>> > >
> >> > > > > > >>>
> >> > > > > >
> >> > > >
> >> >
> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> >> > > > > > >>> > >
> >> > > > > > >>> > >
> >> > > > > > >>> > > I have no idea why the leader is not available.Can
> >> someone
> >> > > give
> >> > > > > me
> >> > > > > > a
> >> > > > > > >>> > hint?
> >> > > > > > >>> > > Thanks a lot.
> >> > > > > > >>> > >
> >> > > > > > >>> >
> >> > > > > > >>>
> >> > > > > > >>
> >> > > > > > >>
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>

Re: Kafka cannot produce message

Posted by Jun Rao <ju...@gmail.com>.
Apache email doesn't allow attachment. Could you try the latest code in the
0.8 branch and see if the same issue exists?

Thanks,

Jun


On Thu, Oct 10, 2013 at 10:20 PM, Jiang Jacky <ji...@gmail.com> wrote:

>
> for those 2 logs directly in my ~/kafka_2.8.0-0.8.0-beta1, Maybe I did not
> set the log output to indicated directory.
> I will attach my 3 logs to you. server.log, controller.log and
> state-change.log
>
> for testing, I changed the port to 9093, and each time, I produce message
> it gives me error
>
> [2013-10-11 05:12:16,948] INFO Fetching metadata from broker
> id:0,host:localhost,por
>
>                                                           t:9093 with
> correlation id 0 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
>
>
>                                 lientUtils$)
> [2013-10-11 05:12:16,966] INFO Connected to localhost:9093 for producing
> (kafka.prod
>
>                                               ucer.SyncProducer)
> [2013-10-11 05:12:16,997] ERROR [KafkaApi-0] Error while fetching metadata
> for parti
>
>                                             tion [my-replicated-topic,0]
> (kafka.server.KafkaApis)
> kafka.common.LeaderNotAvailableException: Leader not available for
> partition [my-rep
>
>                                                     licated-topic,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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la:206)
>         at
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
>
>
>                                 a: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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la: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.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-10-11 05:12:17,066] INFO Disconnecting from localhost:9093
> (kafka.producer.Syn
>
>                                                       cProducer)
> [2013-10-11 05:12:17,069] INFO Closing socket connection to /127.0.0.1.
> (kafka.netwo
>
>                                                 rk.Processor)
> [2013-10-11 05:12:17,099] WARN Error while fetching metadata    partition
> 0     lead
>
>                                               er: none        replicas:
>   isr:    isUnderReplicated: false for topic partition
>
>
>                [my-replicated-topic,0]: [class
> kafka.common.LeaderNotAvailableException] (kafka.pr
>
>
>             oducer.BrokerPartitionInfo)
> [2013-10-11 05:12:17,117] WARN Failed to collate messages by
> topic,partition due to:
>
>                                                            No leader for
> any partition in topic my-replicated-topic (kafka.producer.async.Defa
>
>
>                             ultEventHandler)
> [2013-10-11 05:12:17,119] INFO Back off for 100 ms before retrying send.
> Remaining r
>
>                                               etries = 3
> (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 05:12:17,222] INFO Fetching metadata from broker
> id:0,host:localhost,por
>
>                                                           t:9093 with
> correlation id 2 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
>
>
>                                 lientUtils$)
> [2013-10-11 05:12:17,223] INFO Connected to localhost:9093 for producing
> (kafka.prod
>
>                                               ucer.SyncProducer)
> [2013-10-11 05:12:17,225] ERROR [KafkaApi-0] Error while fetching metadata
> for parti
>
>                                             tion [my-replicated-topic,0]
> (kafka.server.KafkaApis)
> kafka.common.LeaderNotAvailableException: Leader not available for
> partition [my-rep
>
>                                                     licated-topic,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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la:206)
>         at
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
>
>
>                                 a: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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la: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.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-10-11 05:12:17,228] INFO Disconnecting from localhost:9093
> (kafka.producer.Syn
>
>                                                       cProducer)
> [2013-10-11 05:12:17,228] INFO Closing socket connection to /127.0.0.1.
> (kafka.netwo
>
>                                                 rk.Processor)
> [2013-10-11 05:12:17,229] WARN Error while fetching metadata    partition
> 0     lead
>
>                                               er: none        replicas:
>   isr:    isUnderReplicated: false for topic partition
>
>
>                [my-replicated-topic,0]: [class
> kafka.common.LeaderNotAvailableException] (kafka.pr
>
>
>             oducer.BrokerPartitionInfo)
> [2013-10-11 05:12:17,230] WARN Failed to collate messages by
> topic,partition due to:
>
>                                                            No leader for
> any partition in topic my-replicated-topic (kafka.producer.async.Defa
>
>
>                             ultEventHandler)
> [2013-10-11 05:12:17,230] INFO Back off for 100 ms before retrying send.
> Remaining r
>
>                                               etries = 2
> (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 05:12:17,332] INFO Fetching metadata from broker
> id:0,host:localhost,por
>
>                                                           t:9093 with
> correlation id 4 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
>
>
>                                 lientUtils$)
> [2013-10-11 05:12:17,332] INFO Connected to localhost:9093 for producing
> (kafka.prod
>
>                                               ucer.SyncProducer)
> [2013-10-11 05:12:17,334] ERROR [KafkaApi-0] Error while fetching metadata
> for parti
>
>                                             tion [my-replicated-topic,0]
> (kafka.server.KafkaApis)
> kafka.common.LeaderNotAvailableException: Leader not available for
> partition [my-rep
>
>                                                     licated-topic,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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la:206)
>         at
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
>
>
>                                 a: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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la: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.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-10-11 05:12:17,337] INFO Disconnecting from localhost:9093
> (kafka.producer.Syn
>
>                                                       cProducer)
> [2013-10-11 05:12:17,337] INFO Closing socket connection to /127.0.0.1.
> (kafka.netwo
>
>                                                 rk.Processor)
> [2013-10-11 05:12:17,338] WARN Error while fetching metadata    partition
> 0     lead
>
>                                               er: none        replicas:
>   isr:    isUnderReplicated: false for topic partition
>
>
>                [my-replicated-topic,0]: [class
> kafka.common.LeaderNotAvailableException] (kafka.pr
>
>
>             oducer.BrokerPartitionInfo)
> [2013-10-11 05:12:17,339] WARN Failed to collate messages by
> topic,partition due to:
>
>                                                            No leader for
> any partition in topic my-replicated-topic (kafka.producer.async.Defa
>
>
>                             ultEventHandler)
> [2013-10-11 05:12:17,339] INFO Back off for 100 ms before retrying send.
> Remaining r
>
>                                               etries = 1
> (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 05:12:17,440] INFO Fetching metadata from broker
> id:0,host:localhost,por
>
>                                                           t:9093 with
> correlation id 6 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
>
>
>                                 lientUtils$)
> [2013-10-11 05:12:17,441] INFO Connected to localhost:9093 for producing
> (kafka.prod
>
>                                               ucer.SyncProducer)
> [2013-10-11 05:12:17,443] ERROR [KafkaApi-0] Error while fetching metadata
> for parti
>
>                                             tion [my-replicated-topic,0]
> (kafka.server.KafkaApis)
> kafka.common.LeaderNotAvailableException: Leader not available for
> partition [my-rep
>
>                                                     licated-topic,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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la:206)
>         at
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
>
>
>                                 a: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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la: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.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-10-11 05:12:17,446] INFO Disconnecting from localhost:9093
> (kafka.producer.Syn
>
>                                                       cProducer)
> [2013-10-11 05:12:17,446] INFO Closing socket connection to /127.0.0.1.
> (kafka.netwo
>
>                                                 rk.Processor)
> [2013-10-11 05:12:17,447] WARN Error while fetching metadata    partition
> 0     lead
>
>                                               er: none        replicas:
>   isr:    isUnderReplicated: false for topic partition
>
>
>                [my-replicated-topic,0]: [class
> kafka.common.LeaderNotAvailableException] (kafka.pr
>
>
>             oducer.BrokerPartitionInfo)
> [2013-10-11 05:12:17,448] WARN Failed to collate messages by
> topic,partition due to:
>
>                                                            No leader for
> any partition in topic my-replicated-topic (kafka.producer.async.Defa
>
>
>                             ultEventHandler)
> [2013-10-11 05:12:17,448] INFO Back off for 100 ms before retrying send.
> Remaining r
>
>                                               etries = 0
> (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 05:12:17,549] INFO Fetching metadata from broker
> id:0,host:localhost,por
>
>                                                           t:9093 with
> correlation id 8 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C
>
>
>                                 lientUtils$)
> [2013-10-11 05:12:17,550] INFO Connected to localhost:9093 for producing
> (kafka.prod
>
>                                               ucer.SyncProducer)
> [2013-10-11 05:12:17,552] ERROR [KafkaApi-0] Error while fetching metadata
> for parti
>
>                                             tion [my-replicated-topic,0]
> (kafka.server.KafkaApis)
> kafka.common.LeaderNotAvailableException: Leader not available for
> partition [my-rep
>
>                                                     licated-topic,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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la:206)
>         at
> scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal
>
>
>                                 a: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.sca
>
>
>                                 la:206)
>         at
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca
>
>
>                                 la: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.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-10-11 05:12:17,557] INFO Disconnecting from localhost:9093
> (kafka.producer.Syn
>
>                                                       cProducer)
> [2013-10-11 05:12:17,557] INFO Closing socket connection to /127.0.0.1.
> (kafka.netwo
>
>                                                 rk.Processor)
> [2013-10-11 05:12:17,558] WARN Error while fetching metadata    partition
> 0     lead
>
>                                               er: none        replicas:
>   isr:    isUnderReplicated: false for topic partition
>
>
>                [my-replicated-topic,0]: [class
> kafka.common.LeaderNotAvailableException] (kafka.pr
>
>
>             oducer.BrokerPartitionInfo)
> [2013-10-11 05:12:17,561] ERROR Failed to send requests for topics
> my-replicated-top
>
>                                                     ic with correlation ids
> in [0,8] (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 05:12:17,563] ERROR Error in handling batch of 1 events
> (kafka.producer.
>
>
> async.ProducerSendThread)
> kafka.common.FailedToSendMessageException: Failed to send messages after 3
> tries.
>         at
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala
>
>
>                                 :90)
>         at
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.sc
>
>
>                                 ala:104)
>         at
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(Pr
>
>
>                                 oducerSendThread.scala:87)
>         at
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(Pr
>
>
>                                 oducerSendThread.scala:67)
>         at scala.collection.immutable.Stream.foreach(Stream.scala:254)
>         at
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.
>
>
>                                 scala:66)
>         at
> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
>
>
> 2013/10/11 Jun Rao <ju...@gmail.com>
>
>> under logs/.
>>
>> Thanks,
>>
>> Jun
>>
>>
>> On Thu, Oct 10, 2013 at 9:56 PM, Jiang Jacky <ji...@gmail.com> wrote:
>>
>> > Thanks Jun Rao
>> > Where can I find those logs?
>> >
>> >
>> > 2013/10/11 Jun Rao <ju...@gmail.com>
>> >
>> > > Any error in the controller and state-change log?
>> > >
>> > > Thanks,
>> > >
>> > > Jun
>> > >
>> > >
>> > > On Thu, Oct 10, 2013 at 9:38 PM, Jiang Jacky <ji...@gmail.com>
>> > wrote:
>> > >
>> > > > Hi, Aniket
>> > > > Thanks for your reply
>> > > > I checked the log from /tmp/kafka-logs/
>> > > > There are some empty files, likes 00000000000000000000.index,
>> > > > 00000000000000000000.log. I cannot find any useful information
>> there.
>> > > > However, i found some other interesting things, I have posted here
>> > > >
>> > https://mail.google.com/mail/ca/u/0/#label/TechDiscuss/141a5c074641dd70
>> > > > Please have a look. Thanks a lot.
>> > > >
>> > > >
>> > > > 2013/10/11 Aniket Bhatnagar <an...@gmail.com>
>> > > >
>> > > > > Hi Jiang
>> > > > >
>> > > > > Just thinking out loud, it could be because Kafka can't connect to
>> > > > > Zookeeper. Can you check Kafka logs to validate the same?
>> > > > >
>> > > > >
>> > > > > On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com>
>> wrote:
>> > > > >
>> > > > > > Hi, Everyone, I use the larger memory instance to replace that
>> > small
>> > > > one,
>> > > > > > for now, I can create the topic, but when I try to produce
>> message,
>> > > it
>> > > > > > still gives the same error.
>> > > > > > Its so weird. can any one help me? Thanks
>> > > > > >
>> > > > > >
>> > > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
>> > > > > >
>> > > > > > > Another thing need is my instance comes with very small
>> memory,
>> > > just
>> > > > > > 683M,
>> > > > > > > I am not sure if it is related. I will try to use 8G memory
>> > > instance.
>> > > > > > >
>> > > > > > >
>> > > > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
>> > > > > > >
>> > > > > > >> yes, even I cannot create new topic, same error,
>> > > leadernotavailable.
>> > > > > > >> My zookeeper and storm all are working very well, except of
>> > Kafka.
>> > > > > > >>
>> > > > > > >>
>> > > > > > >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
>> > > > > > >>
>> > > > > > >>> Are you trying to produce these messages to a newly created
>> > > topic?
>> > > > > > >>>
>> > > > > > >>>
>> > > > > > >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <
>> > > jiang01yi@gmail.com>
>> > > > > > >>> wrote:
>> > > > > > >>>
>> > > > > > >>> > can anyone help me? Thanks a lot
>> > > > > > >>> >
>> > > > > > >>> >
>> > > > > > >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
>> > > > > > >>> >
>> > > > > > >>> > > Hi, I run into kafka issue recently, when I try to
>> produce
>> > a
>> > > > > > >>> message, it
>> > > > > > >>> > > gives me follow error
>> > > > > > >>> > >
>> > > > > > >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from
>> > broker
>> > > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 47
>> for 1
>> > > > > topic(s)
>> > > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
>> > > > > > >>> > > [2013-10-11 00:30:26,741] INFO Connected to
>> localhost:9092
>> > > for
>> > > > > > >>> producing
>> > > > > > >>> > > (kafka.producer.SyncProducer)
>> > > > > > >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from
>> > > > localhost:9092
>> > > > > > >>> > > (kafka.producer.SyncProducer)
>> > > > > > >>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection
>> > to /
>> > > > > > >>> 127.0.0.1.
>> > > > > > >>> > > (kafka.network.Processor)
>> > > > > > >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching
>> > metadata
>> > > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
>> > > > > > >>> > > No partition metadata for topic my-replicated-topic due
>> to
>> > > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
>> > > > > > >>> > [my-replicated-topic]:
>> > > > > > >>> > > class kafka.common.LeaderNotAvailableException
>> > > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
>> > > > > > >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate
>> messages
>> > by
>> > > > > > topic,
>> > > > > > >>> > > partition due to: Failed to fetch topic metadata for
>> topic:
>> > > > > > >>> > > my-replicated-topic
>> > > (kafka.producer.async.DefaultEventHandler)
>> > > > > > >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms
>> before
>> > > > > retrying
>> > > > > > >>> send.
>> > > > > > >>> > > Remaining retries = 0
>> > > > (kafka.producer.async.DefaultEventHandler)
>> > > > > > >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from
>> > broker
>> > > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 48
>> for 1
>> > > > > topic(s)
>> > > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
>> > > > > > >>> > > [2013-10-11 00:30:26,857] INFO Connected to
>> localhost:9092
>> > > for
>> > > > > > >>> producing
>> > > > > > >>> > > (kafka.producer.SyncProducer)
>> > > > > > >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from
>> > > > localhost:9092
>> > > > > > >>> > > (kafka.producer.SyncProducer)
>> > > > > > >>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection
>> > to /
>> > > > > > >>> 127.0.0.1.
>> > > > > > >>> > > (kafka.network.Processor)
>> > > > > > >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching
>> > metadata
>> > > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
>> > > > > > >>> > > No partition metadata for topic my-replicated-topic due
>> to
>> > > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
>> > > > > > >>> > [my-replicated-topic]:
>> > > > > > >>> > > class kafka.common.LeaderNotAvailableException
>> > > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
>> > > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests
>> for
>> > > > > topics
>> > > > > > >>> > > my-replicated-topic with correlation ids in [41,48]
>> > > > > > >>> > > (kafka.producer.async.DefaultEventHandler)
>> > > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch
>> of
>> > 1
>> > > > > events
>> > > > > > >>> > > (kafka.producer.async.ProducerSendThread)
>> > > > > > >>> > > kafka.common.FailedToSendMessageException: Failed to
>> send
>> > > > > messages
>> > > > > > >>> after
>> > > > > > >>> > 3
>> > > > > > >>> > > tries.
>> > > > > > >>> > >         at
>> > > > > > >>> > >
>> > > > > > >>> >
>> > > > > > >>>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
>> > > > > > >>> > >         at
>> > > > > > >>> > >
>> > > > > > >>> >
>> > > > > > >>>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
>> > > > > > >>> > >         at
>> > > > > > >>> > >
>> > > > > > >>> >
>> > > > > > >>>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
>> > > > > > >>> > >         at
>> > > > > > >>> > >
>> > > > > > >>> >
>> > > > > > >>>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
>> > > > > > >>> > >         at
>> > > > > > >>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
>> > > > > > >>> > >         at
>> > > > > > >>> > >
>> > > > > > >>> >
>> > > > > > >>>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
>> > > > > > >>> > >         at
>> > > > > > >>> > >
>> > > > > > >>>
>> > > > > >
>> > > >
>> > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
>> > > > > > >>> > >
>> > > > > > >>> > >
>> > > > > > >>> > > I have no idea why the leader is not available.Can
>> someone
>> > > give
>> > > > > me
>> > > > > > a
>> > > > > > >>> > hint?
>> > > > > > >>> > > Thanks a lot.
>> > > > > > >>> > >
>> > > > > > >>> >
>> > > > > > >>>
>> > > > > > >>
>> > > > > > >>
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>
>

Re: Kafka cannot produce message

Posted by Jiang Jacky <ji...@gmail.com>.
for those 2 logs directly in my ~/kafka_2.8.0-0.8.0-beta1, Maybe I did not
set the log output to indicated directory.
I will attach my 3 logs to you. server.log, controller.log and
state-change.log

for testing, I changed the port to 9093, and each time, I produce message
it gives me error

[2013-10-11 05:12:16,948] INFO Fetching metadata from broker
id:0,host:localhost,por

                                                          t:9093 with
correlation id 0 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C


                                lientUtils$)
[2013-10-11 05:12:16,966] INFO Connected to localhost:9093 for producing
(kafka.prod

                                              ucer.SyncProducer)
[2013-10-11 05:12:16,997] ERROR [KafkaApi-0] Error while fetching metadata
for parti

                                            tion [my-replicated-topic,0]
(kafka.server.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [my-rep

                                                    licated-topic,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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la:206)
        at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal


                                a: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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la: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.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-10-11 05:12:17,066] INFO Disconnecting from localhost:9093
(kafka.producer.Syn

                                                      cProducer)
[2013-10-11 05:12:17,069] INFO Closing socket connection to /127.0.0.1.
(kafka.netwo

                                                rk.Processor)
[2013-10-11 05:12:17,099] WARN Error while fetching metadata    partition 0
    lead

                                            er: none        replicas:
isr:    isUnderReplicated: false for topic partition


             [my-replicated-topic,0]: [class
kafka.common.LeaderNotAvailableException] (kafka.pr


          oducer.BrokerPartitionInfo)
[2013-10-11 05:12:17,117] WARN Failed to collate messages by
topic,partition due to:

                                                           No leader for
any partition in topic my-replicated-topic (kafka.producer.async.Defa


                            ultEventHandler)
[2013-10-11 05:12:17,119] INFO Back off for 100 ms before retrying send.
Remaining r

                                              etries = 3
(kafka.producer.async.DefaultEventHandler)
[2013-10-11 05:12:17,222] INFO Fetching metadata from broker
id:0,host:localhost,por

                                                          t:9093 with
correlation id 2 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C


                                lientUtils$)
[2013-10-11 05:12:17,223] INFO Connected to localhost:9093 for producing
(kafka.prod

                                              ucer.SyncProducer)
[2013-10-11 05:12:17,225] ERROR [KafkaApi-0] Error while fetching metadata
for parti

                                            tion [my-replicated-topic,0]
(kafka.server.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [my-rep

                                                    licated-topic,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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la:206)
        at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal


                                a: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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la: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.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-10-11 05:12:17,228] INFO Disconnecting from localhost:9093
(kafka.producer.Syn

                                                      cProducer)
[2013-10-11 05:12:17,228] INFO Closing socket connection to /127.0.0.1.
(kafka.netwo

                                                rk.Processor)
[2013-10-11 05:12:17,229] WARN Error while fetching metadata    partition 0
    lead

                                            er: none        replicas:
isr:    isUnderReplicated: false for topic partition


             [my-replicated-topic,0]: [class
kafka.common.LeaderNotAvailableException] (kafka.pr


          oducer.BrokerPartitionInfo)
[2013-10-11 05:12:17,230] WARN Failed to collate messages by
topic,partition due to:

                                                           No leader for
any partition in topic my-replicated-topic (kafka.producer.async.Defa


                            ultEventHandler)
[2013-10-11 05:12:17,230] INFO Back off for 100 ms before retrying send.
Remaining r

                                              etries = 2
(kafka.producer.async.DefaultEventHandler)
[2013-10-11 05:12:17,332] INFO Fetching metadata from broker
id:0,host:localhost,por

                                                          t:9093 with
correlation id 4 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C


                                lientUtils$)
[2013-10-11 05:12:17,332] INFO Connected to localhost:9093 for producing
(kafka.prod

                                              ucer.SyncProducer)
[2013-10-11 05:12:17,334] ERROR [KafkaApi-0] Error while fetching metadata
for parti

                                            tion [my-replicated-topic,0]
(kafka.server.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [my-rep

                                                    licated-topic,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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la:206)
        at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal


                                a: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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la: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.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-10-11 05:12:17,337] INFO Disconnecting from localhost:9093
(kafka.producer.Syn

                                                      cProducer)
[2013-10-11 05:12:17,337] INFO Closing socket connection to /127.0.0.1.
(kafka.netwo

                                                rk.Processor)
[2013-10-11 05:12:17,338] WARN Error while fetching metadata    partition 0
    lead

                                            er: none        replicas:
isr:    isUnderReplicated: false for topic partition


             [my-replicated-topic,0]: [class
kafka.common.LeaderNotAvailableException] (kafka.pr


          oducer.BrokerPartitionInfo)
[2013-10-11 05:12:17,339] WARN Failed to collate messages by
topic,partition due to:

                                                           No leader for
any partition in topic my-replicated-topic (kafka.producer.async.Defa


                            ultEventHandler)
[2013-10-11 05:12:17,339] INFO Back off for 100 ms before retrying send.
Remaining r

                                              etries = 1
(kafka.producer.async.DefaultEventHandler)
[2013-10-11 05:12:17,440] INFO Fetching metadata from broker
id:0,host:localhost,por

                                                          t:9093 with
correlation id 6 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C


                                lientUtils$)
[2013-10-11 05:12:17,441] INFO Connected to localhost:9093 for producing
(kafka.prod

                                              ucer.SyncProducer)
[2013-10-11 05:12:17,443] ERROR [KafkaApi-0] Error while fetching metadata
for parti

                                            tion [my-replicated-topic,0]
(kafka.server.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [my-rep

                                                    licated-topic,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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la:206)
        at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal


                                a: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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la: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.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-10-11 05:12:17,446] INFO Disconnecting from localhost:9093
(kafka.producer.Syn

                                                      cProducer)
[2013-10-11 05:12:17,446] INFO Closing socket connection to /127.0.0.1.
(kafka.netwo

                                                rk.Processor)
[2013-10-11 05:12:17,447] WARN Error while fetching metadata    partition 0
    lead

                                            er: none        replicas:
isr:    isUnderReplicated: false for topic partition


             [my-replicated-topic,0]: [class
kafka.common.LeaderNotAvailableException] (kafka.pr


          oducer.BrokerPartitionInfo)
[2013-10-11 05:12:17,448] WARN Failed to collate messages by
topic,partition due to:

                                                           No leader for
any partition in topic my-replicated-topic (kafka.producer.async.Defa


                            ultEventHandler)
[2013-10-11 05:12:17,448] INFO Back off for 100 ms before retrying send.
Remaining r

                                              etries = 0
(kafka.producer.async.DefaultEventHandler)
[2013-10-11 05:12:17,549] INFO Fetching metadata from broker
id:0,host:localhost,por

                                                          t:9093 with
correlation id 8 for 1 topic(s) Set(my-replicated-topic) (kafka.client.C


                                lientUtils$)
[2013-10-11 05:12:17,550] INFO Connected to localhost:9093 for producing
(kafka.prod

                                              ucer.SyncProducer)
[2013-10-11 05:12:17,552] ERROR [KafkaApi-0] Error while fetching metadata
for parti

                                            tion [my-replicated-topic,0]
(kafka.server.KafkaApis)
kafka.common.LeaderNotAvailableException: Leader not available for
partition [my-rep

                                                    licated-topic,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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la:206)
        at
scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scal


                                a: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.sca


                                la:206)
        at
scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.sca


                                la: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.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-10-11 05:12:17,557] INFO Disconnecting from localhost:9093
(kafka.producer.Syn

                                                      cProducer)
[2013-10-11 05:12:17,557] INFO Closing socket connection to /127.0.0.1.
(kafka.netwo

                                                rk.Processor)
[2013-10-11 05:12:17,558] WARN Error while fetching metadata    partition 0
    lead

                                            er: none        replicas:
isr:    isUnderReplicated: false for topic partition


             [my-replicated-topic,0]: [class
kafka.common.LeaderNotAvailableException] (kafka.pr


          oducer.BrokerPartitionInfo)
[2013-10-11 05:12:17,561] ERROR Failed to send requests for topics
my-replicated-top

                                                    ic with correlation ids
in [0,8] (kafka.producer.async.DefaultEventHandler)
[2013-10-11 05:12:17,563] ERROR Error in handling batch of 1 events
(kafka.producer.


async.ProducerSendThread)
kafka.common.FailedToSendMessageException: Failed to send messages after 3
tries.
        at
kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala


                                :90)
        at
kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.sc


                                ala:104)
        at
kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(Pr


                                oducerSendThread.scala:87)
        at
kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(Pr


                                oducerSendThread.scala:67)
        at scala.collection.immutable.Stream.foreach(Stream.scala:254)
        at
kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.


                                scala:66)
        at
kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)


2013/10/11 Jun Rao <ju...@gmail.com>

> under logs/.
>
> Thanks,
>
> Jun
>
>
> On Thu, Oct 10, 2013 at 9:56 PM, Jiang Jacky <ji...@gmail.com> wrote:
>
> > Thanks Jun Rao
> > Where can I find those logs?
> >
> >
> > 2013/10/11 Jun Rao <ju...@gmail.com>
> >
> > > Any error in the controller and state-change log?
> > >
> > > Thanks,
> > >
> > > Jun
> > >
> > >
> > > On Thu, Oct 10, 2013 at 9:38 PM, Jiang Jacky <ji...@gmail.com>
> > wrote:
> > >
> > > > Hi, Aniket
> > > > Thanks for your reply
> > > > I checked the log from /tmp/kafka-logs/
> > > > There are some empty files, likes 00000000000000000000.index,
> > > > 00000000000000000000.log. I cannot find any useful information there.
> > > > However, i found some other interesting things, I have posted here
> > > >
> > https://mail.google.com/mail/ca/u/0/#label/TechDiscuss/141a5c074641dd70
> > > > Please have a look. Thanks a lot.
> > > >
> > > >
> > > > 2013/10/11 Aniket Bhatnagar <an...@gmail.com>
> > > >
> > > > > Hi Jiang
> > > > >
> > > > > Just thinking out loud, it could be because Kafka can't connect to
> > > > > Zookeeper. Can you check Kafka logs to validate the same?
> > > > >
> > > > >
> > > > > On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com> wrote:
> > > > >
> > > > > > Hi, Everyone, I use the larger memory instance to replace that
> > small
> > > > one,
> > > > > > for now, I can create the topic, but when I try to produce
> message,
> > > it
> > > > > > still gives the same error.
> > > > > > Its so weird. can any one help me? Thanks
> > > > > >
> > > > > >
> > > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > > >
> > > > > > > Another thing need is my instance comes with very small memory,
> > > just
> > > > > > 683M,
> > > > > > > I am not sure if it is related. I will try to use 8G memory
> > > instance.
> > > > > > >
> > > > > > >
> > > > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > > > >
> > > > > > >> yes, even I cannot create new topic, same error,
> > > leadernotavailable.
> > > > > > >> My zookeeper and storm all are working very well, except of
> > Kafka.
> > > > > > >>
> > > > > > >>
> > > > > > >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
> > > > > > >>
> > > > > > >>> Are you trying to produce these messages to a newly created
> > > topic?
> > > > > > >>>
> > > > > > >>>
> > > > > > >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <
> > > jiang01yi@gmail.com>
> > > > > > >>> wrote:
> > > > > > >>>
> > > > > > >>> > can anyone help me? Thanks a lot
> > > > > > >>> >
> > > > > > >>> >
> > > > > > >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > > > >>> >
> > > > > > >>> > > Hi, I run into kafka issue recently, when I try to
> produce
> > a
> > > > > > >>> message, it
> > > > > > >>> > > gives me follow error
> > > > > > >>> > >
> > > > > > >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from
> > broker
> > > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 47 for
> 1
> > > > > topic(s)
> > > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > > > > >>> > > [2013-10-11 00:30:26,741] INFO Connected to
> localhost:9092
> > > for
> > > > > > >>> producing
> > > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > > >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from
> > > > localhost:9092
> > > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > > >>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection
> > to /
> > > > > > >>> 127.0.0.1.
> > > > > > >>> > > (kafka.network.Processor)
> > > > > > >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching
> > metadata
> > > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > > > > >>> > > No partition metadata for topic my-replicated-topic due
> to
> > > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > > > > >>> > [my-replicated-topic]:
> > > > > > >>> > > class kafka.common.LeaderNotAvailableException
> > > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > > > > >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate
> messages
> > by
> > > > > > topic,
> > > > > > >>> > > partition due to: Failed to fetch topic metadata for
> topic:
> > > > > > >>> > > my-replicated-topic
> > > (kafka.producer.async.DefaultEventHandler)
> > > > > > >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before
> > > > > retrying
> > > > > > >>> send.
> > > > > > >>> > > Remaining retries = 0
> > > > (kafka.producer.async.DefaultEventHandler)
> > > > > > >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from
> > broker
> > > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 48 for
> 1
> > > > > topic(s)
> > > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > > > > >>> > > [2013-10-11 00:30:26,857] INFO Connected to
> localhost:9092
> > > for
> > > > > > >>> producing
> > > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > > >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from
> > > > localhost:9092
> > > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > > >>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection
> > to /
> > > > > > >>> 127.0.0.1.
> > > > > > >>> > > (kafka.network.Processor)
> > > > > > >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching
> > metadata
> > > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > > > > >>> > > No partition metadata for topic my-replicated-topic due
> to
> > > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > > > > >>> > [my-replicated-topic]:
> > > > > > >>> > > class kafka.common.LeaderNotAvailableException
> > > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests
> for
> > > > > topics
> > > > > > >>> > > my-replicated-topic with correlation ids in [41,48]
> > > > > > >>> > > (kafka.producer.async.DefaultEventHandler)
> > > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch
> of
> > 1
> > > > > events
> > > > > > >>> > > (kafka.producer.async.ProducerSendThread)
> > > > > > >>> > > kafka.common.FailedToSendMessageException: Failed to send
> > > > > messages
> > > > > > >>> after
> > > > > > >>> > 3
> > > > > > >>> > > tries.
> > > > > > >>> > >         at
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> > > > > > >>> > >         at
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> > > > > > >>> > >         at
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> > > > > > >>> > >         at
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> > > > > > >>> > >         at
> > > > > > >>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
> > > > > > >>> > >         at
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> > > > > > >>> > >         at
> > > > > > >>> > >
> > > > > > >>>
> > > > > >
> > > >
> > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> > > I have no idea why the leader is not available.Can
> someone
> > > give
> > > > > me
> > > > > > a
> > > > > > >>> > hint?
> > > > > > >>> > > Thanks a lot.
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > > >>
> > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Kafka cannot produce message

Posted by Jun Rao <ju...@gmail.com>.
under logs/.

Thanks,

Jun


On Thu, Oct 10, 2013 at 9:56 PM, Jiang Jacky <ji...@gmail.com> wrote:

> Thanks Jun Rao
> Where can I find those logs?
>
>
> 2013/10/11 Jun Rao <ju...@gmail.com>
>
> > Any error in the controller and state-change log?
> >
> > Thanks,
> >
> > Jun
> >
> >
> > On Thu, Oct 10, 2013 at 9:38 PM, Jiang Jacky <ji...@gmail.com>
> wrote:
> >
> > > Hi, Aniket
> > > Thanks for your reply
> > > I checked the log from /tmp/kafka-logs/
> > > There are some empty files, likes 00000000000000000000.index,
> > > 00000000000000000000.log. I cannot find any useful information there.
> > > However, i found some other interesting things, I have posted here
> > >
> https://mail.google.com/mail/ca/u/0/#label/TechDiscuss/141a5c074641dd70
> > > Please have a look. Thanks a lot.
> > >
> > >
> > > 2013/10/11 Aniket Bhatnagar <an...@gmail.com>
> > >
> > > > Hi Jiang
> > > >
> > > > Just thinking out loud, it could be because Kafka can't connect to
> > > > Zookeeper. Can you check Kafka logs to validate the same?
> > > >
> > > >
> > > > On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com> wrote:
> > > >
> > > > > Hi, Everyone, I use the larger memory instance to replace that
> small
> > > one,
> > > > > for now, I can create the topic, but when I try to produce message,
> > it
> > > > > still gives the same error.
> > > > > Its so weird. can any one help me? Thanks
> > > > >
> > > > >
> > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > >
> > > > > > Another thing need is my instance comes with very small memory,
> > just
> > > > > 683M,
> > > > > > I am not sure if it is related. I will try to use 8G memory
> > instance.
> > > > > >
> > > > > >
> > > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > > >
> > > > > >> yes, even I cannot create new topic, same error,
> > leadernotavailable.
> > > > > >> My zookeeper and storm all are working very well, except of
> Kafka.
> > > > > >>
> > > > > >>
> > > > > >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
> > > > > >>
> > > > > >>> Are you trying to produce these messages to a newly created
> > topic?
> > > > > >>>
> > > > > >>>
> > > > > >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <
> > jiang01yi@gmail.com>
> > > > > >>> wrote:
> > > > > >>>
> > > > > >>> > can anyone help me? Thanks a lot
> > > > > >>> >
> > > > > >>> >
> > > > > >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > > >>> >
> > > > > >>> > > Hi, I run into kafka issue recently, when I try to produce
> a
> > > > > >>> message, it
> > > > > >>> > > gives me follow error
> > > > > >>> > >
> > > > > >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from
> broker
> > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 47 for 1
> > > > topic(s)
> > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > > > >>> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092
> > for
> > > > > >>> producing
> > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from
> > > localhost:9092
> > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > >>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection
> to /
> > > > > >>> 127.0.0.1.
> > > > > >>> > > (kafka.network.Processor)
> > > > > >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching
> metadata
> > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > > > >>> > > No partition metadata for topic my-replicated-topic due to
> > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > > > >>> > [my-replicated-topic]:
> > > > > >>> > > class kafka.common.LeaderNotAvailableException
> > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > > > >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages
> by
> > > > > topic,
> > > > > >>> > > partition due to: Failed to fetch topic metadata for topic:
> > > > > >>> > > my-replicated-topic
> > (kafka.producer.async.DefaultEventHandler)
> > > > > >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before
> > > > retrying
> > > > > >>> send.
> > > > > >>> > > Remaining retries = 0
> > > (kafka.producer.async.DefaultEventHandler)
> > > > > >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from
> broker
> > > > > >>> > > id:0,host:localhost,port:9092 with correlation id 48 for 1
> > > > topic(s)
> > > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > > > >>> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092
> > for
> > > > > >>> producing
> > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from
> > > localhost:9092
> > > > > >>> > > (kafka.producer.SyncProducer)
> > > > > >>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection
> to /
> > > > > >>> 127.0.0.1.
> > > > > >>> > > (kafka.network.Processor)
> > > > > >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching
> metadata
> > > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > > > >>> > > No partition metadata for topic my-replicated-topic due to
> > > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > > > >>> > [my-replicated-topic]:
> > > > > >>> > > class kafka.common.LeaderNotAvailableException
> > > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for
> > > > topics
> > > > > >>> > > my-replicated-topic with correlation ids in [41,48]
> > > > > >>> > > (kafka.producer.async.DefaultEventHandler)
> > > > > >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of
> 1
> > > > events
> > > > > >>> > > (kafka.producer.async.ProducerSendThread)
> > > > > >>> > > kafka.common.FailedToSendMessageException: Failed to send
> > > > messages
> > > > > >>> after
> > > > > >>> > 3
> > > > > >>> > > tries.
> > > > > >>> > >         at
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> > > > > >>> > >         at
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> > > > > >>> > >         at
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> > > > > >>> > >         at
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> > > > > >>> > >         at
> > > > > >>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
> > > > > >>> > >         at
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> > > > > >>> > >         at
> > > > > >>> > >
> > > > > >>>
> > > > >
> > >
> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> > > I have no idea why the leader is not available.Can someone
> > give
> > > > me
> > > > > a
> > > > > >>> > hint?
> > > > > >>> > > Thanks a lot.
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > > >>
> > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Kafka cannot produce message

Posted by Jiang Jacky <ji...@gmail.com>.
Thanks Jun Rao
Where can I find those logs?


2013/10/11 Jun Rao <ju...@gmail.com>

> Any error in the controller and state-change log?
>
> Thanks,
>
> Jun
>
>
> On Thu, Oct 10, 2013 at 9:38 PM, Jiang Jacky <ji...@gmail.com> wrote:
>
> > Hi, Aniket
> > Thanks for your reply
> > I checked the log from /tmp/kafka-logs/
> > There are some empty files, likes 00000000000000000000.index,
> > 00000000000000000000.log. I cannot find any useful information there.
> > However, i found some other interesting things, I have posted here
> > https://mail.google.com/mail/ca/u/0/#label/TechDiscuss/141a5c074641dd70
> > Please have a look. Thanks a lot.
> >
> >
> > 2013/10/11 Aniket Bhatnagar <an...@gmail.com>
> >
> > > Hi Jiang
> > >
> > > Just thinking out loud, it could be because Kafka can't connect to
> > > Zookeeper. Can you check Kafka logs to validate the same?
> > >
> > >
> > > On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com> wrote:
> > >
> > > > Hi, Everyone, I use the larger memory instance to replace that small
> > one,
> > > > for now, I can create the topic, but when I try to produce message,
> it
> > > > still gives the same error.
> > > > Its so weird. can any one help me? Thanks
> > > >
> > > >
> > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > >
> > > > > Another thing need is my instance comes with very small memory,
> just
> > > > 683M,
> > > > > I am not sure if it is related. I will try to use 8G memory
> instance.
> > > > >
> > > > >
> > > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > >
> > > > >> yes, even I cannot create new topic, same error,
> leadernotavailable.
> > > > >> My zookeeper and storm all are working very well, except of Kafka.
> > > > >>
> > > > >>
> > > > >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
> > > > >>
> > > > >>> Are you trying to produce these messages to a newly created
> topic?
> > > > >>>
> > > > >>>
> > > > >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <
> jiang01yi@gmail.com>
> > > > >>> wrote:
> > > > >>>
> > > > >>> > can anyone help me? Thanks a lot
> > > > >>> >
> > > > >>> >
> > > > >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > > >>> >
> > > > >>> > > Hi, I run into kafka issue recently, when I try to produce a
> > > > >>> message, it
> > > > >>> > > gives me follow error
> > > > >>> > >
> > > > >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
> > > > >>> > > id:0,host:localhost,port:9092 with correlation id 47 for 1
> > > topic(s)
> > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > > >>> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092
> for
> > > > >>> producing
> > > > >>> > > (kafka.producer.SyncProducer)
> > > > >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from
> > localhost:9092
> > > > >>> > > (kafka.producer.SyncProducer)
> > > > >>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection to /
> > > > >>> 127.0.0.1.
> > > > >>> > > (kafka.network.Processor)
> > > > >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
> > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > > >>> > > No partition metadata for topic my-replicated-topic due to
> > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > > >>> > [my-replicated-topic]:
> > > > >>> > > class kafka.common.LeaderNotAvailableException
> > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > > >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by
> > > > topic,
> > > > >>> > > partition due to: Failed to fetch topic metadata for topic:
> > > > >>> > > my-replicated-topic
> (kafka.producer.async.DefaultEventHandler)
> > > > >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before
> > > retrying
> > > > >>> send.
> > > > >>> > > Remaining retries = 0
> > (kafka.producer.async.DefaultEventHandler)
> > > > >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
> > > > >>> > > id:0,host:localhost,port:9092 with correlation id 48 for 1
> > > topic(s)
> > > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > > >>> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092
> for
> > > > >>> producing
> > > > >>> > > (kafka.producer.SyncProducer)
> > > > >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from
> > localhost:9092
> > > > >>> > > (kafka.producer.SyncProducer)
> > > > >>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection to /
> > > > >>> 127.0.0.1.
> > > > >>> > > (kafka.network.Processor)
> > > > >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
> > > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > > >>> > > No partition metadata for topic my-replicated-topic due to
> > > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > > >>> > [my-replicated-topic]:
> > > > >>> > > class kafka.common.LeaderNotAvailableException
> > > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > > >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for
> > > topics
> > > > >>> > > my-replicated-topic with correlation ids in [41,48]
> > > > >>> > > (kafka.producer.async.DefaultEventHandler)
> > > > >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1
> > > events
> > > > >>> > > (kafka.producer.async.ProducerSendThread)
> > > > >>> > > kafka.common.FailedToSendMessageException: Failed to send
> > > messages
> > > > >>> after
> > > > >>> > 3
> > > > >>> > > tries.
> > > > >>> > >         at
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> > > > >>> > >         at
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> > > > >>> > >         at
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> > > > >>> > >         at
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> > > > >>> > >         at
> > > > >>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
> > > > >>> > >         at
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> > > > >>> > >         at
> > > > >>> > >
> > > > >>>
> > > >
> > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> > > > >>> > >
> > > > >>> > >
> > > > >>> > > I have no idea why the leader is not available.Can someone
> give
> > > me
> > > > a
> > > > >>> > hint?
> > > > >>> > > Thanks a lot.
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > > >>
> > > > >>
> > > > >
> > > >
> > >
> >
>

Re: Kafka cannot produce message

Posted by Jun Rao <ju...@gmail.com>.
Any error in the controller and state-change log?

Thanks,

Jun


On Thu, Oct 10, 2013 at 9:38 PM, Jiang Jacky <ji...@gmail.com> wrote:

> Hi, Aniket
> Thanks for your reply
> I checked the log from /tmp/kafka-logs/
> There are some empty files, likes 00000000000000000000.index,
> 00000000000000000000.log. I cannot find any useful information there.
> However, i found some other interesting things, I have posted here
> https://mail.google.com/mail/ca/u/0/#label/TechDiscuss/141a5c074641dd70
> Please have a look. Thanks a lot.
>
>
> 2013/10/11 Aniket Bhatnagar <an...@gmail.com>
>
> > Hi Jiang
> >
> > Just thinking out loud, it could be because Kafka can't connect to
> > Zookeeper. Can you check Kafka logs to validate the same?
> >
> >
> > On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com> wrote:
> >
> > > Hi, Everyone, I use the larger memory instance to replace that small
> one,
> > > for now, I can create the topic, but when I try to produce message, it
> > > still gives the same error.
> > > Its so weird. can any one help me? Thanks
> > >
> > >
> > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > >
> > > > Another thing need is my instance comes with very small memory, just
> > > 683M,
> > > > I am not sure if it is related. I will try to use 8G memory instance.
> > > >
> > > >
> > > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > >
> > > >> yes, even I cannot create new topic, same error, leadernotavailable.
> > > >> My zookeeper and storm all are working very well, except of Kafka.
> > > >>
> > > >>
> > > >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
> > > >>
> > > >>> Are you trying to produce these messages to a newly created topic?
> > > >>>
> > > >>>
> > > >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <ji...@gmail.com>
> > > >>> wrote:
> > > >>>
> > > >>> > can anyone help me? Thanks a lot
> > > >>> >
> > > >>> >
> > > >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > > >>> >
> > > >>> > > Hi, I run into kafka issue recently, when I try to produce a
> > > >>> message, it
> > > >>> > > gives me follow error
> > > >>> > >
> > > >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
> > > >>> > > id:0,host:localhost,port:9092 with correlation id 47 for 1
> > topic(s)
> > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > >>> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for
> > > >>> producing
> > > >>> > > (kafka.producer.SyncProducer)
> > > >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from
> localhost:9092
> > > >>> > > (kafka.producer.SyncProducer)
> > > >>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection to /
> > > >>> 127.0.0.1.
> > > >>> > > (kafka.network.Processor)
> > > >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
> > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > >>> > > No partition metadata for topic my-replicated-topic due to
> > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > >>> > [my-replicated-topic]:
> > > >>> > > class kafka.common.LeaderNotAvailableException
> > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by
> > > topic,
> > > >>> > > partition due to: Failed to fetch topic metadata for topic:
> > > >>> > > my-replicated-topic (kafka.producer.async.DefaultEventHandler)
> > > >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before
> > retrying
> > > >>> send.
> > > >>> > > Remaining retries = 0
> (kafka.producer.async.DefaultEventHandler)
> > > >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
> > > >>> > > id:0,host:localhost,port:9092 with correlation id 48 for 1
> > topic(s)
> > > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > >>> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for
> > > >>> producing
> > > >>> > > (kafka.producer.SyncProducer)
> > > >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from
> localhost:9092
> > > >>> > > (kafka.producer.SyncProducer)
> > > >>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection to /
> > > >>> 127.0.0.1.
> > > >>> > > (kafka.network.Processor)
> > > >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
> > > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > > >>> > > No partition metadata for topic my-replicated-topic due to
> > > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > > >>> > [my-replicated-topic]:
> > > >>> > > class kafka.common.LeaderNotAvailableException
> > > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > > >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for
> > topics
> > > >>> > > my-replicated-topic with correlation ids in [41,48]
> > > >>> > > (kafka.producer.async.DefaultEventHandler)
> > > >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1
> > events
> > > >>> > > (kafka.producer.async.ProducerSendThread)
> > > >>> > > kafka.common.FailedToSendMessageException: Failed to send
> > messages
> > > >>> after
> > > >>> > 3
> > > >>> > > tries.
> > > >>> > >         at
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> > > >>> > >         at
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> > > >>> > >         at
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> > > >>> > >         at
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> > > >>> > >         at
> > > >>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
> > > >>> > >         at
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> > > >>> > >         at
> > > >>> > >
> > > >>>
> > >
> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> > > >>> > >
> > > >>> > >
> > > >>> > > I have no idea why the leader is not available.Can someone give
> > me
> > > a
> > > >>> > hint?
> > > >>> > > Thanks a lot.
> > > >>> > >
> > > >>> >
> > > >>>
> > > >>
> > > >>
> > > >
> > >
> >
>

Re: Kafka cannot produce message

Posted by Jiang Jacky <ji...@gmail.com>.
Hi, Aniket
Thanks for your reply
I checked the log from /tmp/kafka-logs/
There are some empty files, likes 00000000000000000000.index,
00000000000000000000.log. I cannot find any useful information there.
However, i found some other interesting things, I have posted here
https://mail.google.com/mail/ca/u/0/#label/TechDiscuss/141a5c074641dd70
Please have a look. Thanks a lot.


2013/10/11 Aniket Bhatnagar <an...@gmail.com>

> Hi Jiang
>
> Just thinking out loud, it could be because Kafka can't connect to
> Zookeeper. Can you check Kafka logs to validate the same?
>
>
> On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com> wrote:
>
> > Hi, Everyone, I use the larger memory instance to replace that small one,
> > for now, I can create the topic, but when I try to produce message, it
> > still gives the same error.
> > Its so weird. can any one help me? Thanks
> >
> >
> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> >
> > > Another thing need is my instance comes with very small memory, just
> > 683M,
> > > I am not sure if it is related. I will try to use 8G memory instance.
> > >
> > >
> > > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > >
> > >> yes, even I cannot create new topic, same error, leadernotavailable.
> > >> My zookeeper and storm all are working very well, except of Kafka.
> > >>
> > >>
> > >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
> > >>
> > >>> Are you trying to produce these messages to a newly created topic?
> > >>>
> > >>>
> > >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <ji...@gmail.com>
> > >>> wrote:
> > >>>
> > >>> > can anyone help me? Thanks a lot
> > >>> >
> > >>> >
> > >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> > >>> >
> > >>> > > Hi, I run into kafka issue recently, when I try to produce a
> > >>> message, it
> > >>> > > gives me follow error
> > >>> > >
> > >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
> > >>> > > id:0,host:localhost,port:9092 with correlation id 47 for 1
> topic(s)
> > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > >>> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for
> > >>> producing
> > >>> > > (kafka.producer.SyncProducer)
> > >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
> > >>> > > (kafka.producer.SyncProducer)
> > >>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection to /
> > >>> 127.0.0.1.
> > >>> > > (kafka.network.Processor)
> > >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
> > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > >>> > > No partition metadata for topic my-replicated-topic due to
> > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > >>> > [my-replicated-topic]:
> > >>> > > class kafka.common.LeaderNotAvailableException
> > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by
> > topic,
> > >>> > > partition due to: Failed to fetch topic metadata for topic:
> > >>> > > my-replicated-topic (kafka.producer.async.DefaultEventHandler)
> > >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before
> retrying
> > >>> send.
> > >>> > > Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
> > >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
> > >>> > > id:0,host:localhost,port:9092 with correlation id 48 for 1
> topic(s)
> > >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > >>> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for
> > >>> producing
> > >>> > > (kafka.producer.SyncProducer)
> > >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
> > >>> > > (kafka.producer.SyncProducer)
> > >>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection to /
> > >>> 127.0.0.1.
> > >>> > > (kafka.network.Processor)
> > >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
> > >>> > > [{TopicMetadata for topic my-replicated-topic ->
> > >>> > > No partition metadata for topic my-replicated-topic due to
> > >>> > > kafka.common.LeaderNotAvailableException}] for topic
> > >>> > [my-replicated-topic]:
> > >>> > > class kafka.common.LeaderNotAvailableException
> > >>> > >  (kafka.producer.BrokerPartitionInfo)
> > >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for
> topics
> > >>> > > my-replicated-topic with correlation ids in [41,48]
> > >>> > > (kafka.producer.async.DefaultEventHandler)
> > >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1
> events
> > >>> > > (kafka.producer.async.ProducerSendThread)
> > >>> > > kafka.common.FailedToSendMessageException: Failed to send
> messages
> > >>> after
> > >>> > 3
> > >>> > > tries.
> > >>> > >         at
> > >>> > >
> > >>> >
> > >>>
> >
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> > >>> > >         at
> > >>> > >
> > >>> >
> > >>>
> >
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> > >>> > >         at
> > >>> > >
> > >>> >
> > >>>
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> > >>> > >         at
> > >>> > >
> > >>> >
> > >>>
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> > >>> > >         at
> > >>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
> > >>> > >         at
> > >>> > >
> > >>> >
> > >>>
> >
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> > >>> > >         at
> > >>> > >
> > >>>
> > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> > >>> > >
> > >>> > >
> > >>> > > I have no idea why the leader is not available.Can someone give
> me
> > a
> > >>> > hint?
> > >>> > > Thanks a lot.
> > >>> > >
> > >>> >
> > >>>
> > >>
> > >>
> > >
> >
>

Re: Kafka cannot produce message

Posted by Aniket Bhatnagar <an...@gmail.com>.
Hi Jiang

Just thinking out loud, it could be because Kafka can't connect to
Zookeeper. Can you check Kafka logs to validate the same?


On 11 October 2013 08:22, Jiang Jacky <ji...@gmail.com> wrote:

> Hi, Everyone, I use the larger memory instance to replace that small one,
> for now, I can create the topic, but when I try to produce message, it
> still gives the same error.
> Its so weird. can any one help me? Thanks
>
>
> 2013/10/10 Jiang Jacky <ji...@gmail.com>
>
> > Another thing need is my instance comes with very small memory, just
> 683M,
> > I am not sure if it is related. I will try to use 8G memory instance.
> >
> >
> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> >
> >> yes, even I cannot create new topic, same error, leadernotavailable.
> >> My zookeeper and storm all are working very well, except of Kafka.
> >>
> >>
> >> 2013/10/10 Neha Narkhede <ne...@gmail.com>
> >>
> >>> Are you trying to produce these messages to a newly created topic?
> >>>
> >>>
> >>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <ji...@gmail.com>
> >>> wrote:
> >>>
> >>> > can anyone help me? Thanks a lot
> >>> >
> >>> >
> >>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> >>> >
> >>> > > Hi, I run into kafka issue recently, when I try to produce a
> >>> message, it
> >>> > > gives me follow error
> >>> > >
> >>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
> >>> > > id:0,host:localhost,port:9092 with correlation id 47 for 1 topic(s)
> >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> >>> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for
> >>> producing
> >>> > > (kafka.producer.SyncProducer)
> >>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
> >>> > > (kafka.producer.SyncProducer)
> >>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection to /
> >>> 127.0.0.1.
> >>> > > (kafka.network.Processor)
> >>> > > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
> >>> > > [{TopicMetadata for topic my-replicated-topic ->
> >>> > > No partition metadata for topic my-replicated-topic due to
> >>> > > kafka.common.LeaderNotAvailableException}] for topic
> >>> > [my-replicated-topic]:
> >>> > > class kafka.common.LeaderNotAvailableException
> >>> > >  (kafka.producer.BrokerPartitionInfo)
> >>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by
> topic,
> >>> > > partition due to: Failed to fetch topic metadata for topic:
> >>> > > my-replicated-topic (kafka.producer.async.DefaultEventHandler)
> >>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before retrying
> >>> send.
> >>> > > Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
> >>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
> >>> > > id:0,host:localhost,port:9092 with correlation id 48 for 1 topic(s)
> >>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> >>> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for
> >>> producing
> >>> > > (kafka.producer.SyncProducer)
> >>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
> >>> > > (kafka.producer.SyncProducer)
> >>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection to /
> >>> 127.0.0.1.
> >>> > > (kafka.network.Processor)
> >>> > > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
> >>> > > [{TopicMetadata for topic my-replicated-topic ->
> >>> > > No partition metadata for topic my-replicated-topic due to
> >>> > > kafka.common.LeaderNotAvailableException}] for topic
> >>> > [my-replicated-topic]:
> >>> > > class kafka.common.LeaderNotAvailableException
> >>> > >  (kafka.producer.BrokerPartitionInfo)
> >>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for topics
> >>> > > my-replicated-topic with correlation ids in [41,48]
> >>> > > (kafka.producer.async.DefaultEventHandler)
> >>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1 events
> >>> > > (kafka.producer.async.ProducerSendThread)
> >>> > > kafka.common.FailedToSendMessageException: Failed to send messages
> >>> after
> >>> > 3
> >>> > > tries.
> >>> > >         at
> >>> > >
> >>> >
> >>>
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> >>> > >         at
> >>> > >
> >>> >
> >>>
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> >>> > >         at
> >>> > >
> >>> >
> >>>
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> >>> > >         at
> >>> > >
> >>> >
> >>>
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> >>> > >         at
> >>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
> >>> > >         at
> >>> > >
> >>> >
> >>>
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> >>> > >         at
> >>> > >
> >>>
> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> >>> > >
> >>> > >
> >>> > > I have no idea why the leader is not available.Can someone give me
> a
> >>> > hint?
> >>> > > Thanks a lot.
> >>> > >
> >>> >
> >>>
> >>
> >>
> >
>

Re: Kafka cannot produce message

Posted by Jiang Jacky <ji...@gmail.com>.
Hi, Everyone, I use the larger memory instance to replace that small one,
for now, I can create the topic, but when I try to produce message, it
still gives the same error.
Its so weird. can any one help me? Thanks


2013/10/10 Jiang Jacky <ji...@gmail.com>

> Another thing need is my instance comes with very small memory, just 683M,
> I am not sure if it is related. I will try to use 8G memory instance.
>
>
> 2013/10/10 Jiang Jacky <ji...@gmail.com>
>
>> yes, even I cannot create new topic, same error, leadernotavailable.
>> My zookeeper and storm all are working very well, except of Kafka.
>>
>>
>> 2013/10/10 Neha Narkhede <ne...@gmail.com>
>>
>>> Are you trying to produce these messages to a newly created topic?
>>>
>>>
>>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <ji...@gmail.com>
>>> wrote:
>>>
>>> > can anyone help me? Thanks a lot
>>> >
>>> >
>>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
>>> >
>>> > > Hi, I run into kafka issue recently, when I try to produce a
>>> message, it
>>> > > gives me follow error
>>> > >
>>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
>>> > > id:0,host:localhost,port:9092 with correlation id 47 for 1 topic(s)
>>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
>>> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for
>>> producing
>>> > > (kafka.producer.SyncProducer)
>>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
>>> > > (kafka.producer.SyncProducer)
>>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection to /
>>> 127.0.0.1.
>>> > > (kafka.network.Processor)
>>> > > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
>>> > > [{TopicMetadata for topic my-replicated-topic ->
>>> > > No partition metadata for topic my-replicated-topic due to
>>> > > kafka.common.LeaderNotAvailableException}] for topic
>>> > [my-replicated-topic]:
>>> > > class kafka.common.LeaderNotAvailableException
>>> > >  (kafka.producer.BrokerPartitionInfo)
>>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by topic,
>>> > > partition due to: Failed to fetch topic metadata for topic:
>>> > > my-replicated-topic (kafka.producer.async.DefaultEventHandler)
>>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before retrying
>>> send.
>>> > > Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
>>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
>>> > > id:0,host:localhost,port:9092 with correlation id 48 for 1 topic(s)
>>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
>>> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for
>>> producing
>>> > > (kafka.producer.SyncProducer)
>>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
>>> > > (kafka.producer.SyncProducer)
>>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection to /
>>> 127.0.0.1.
>>> > > (kafka.network.Processor)
>>> > > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
>>> > > [{TopicMetadata for topic my-replicated-topic ->
>>> > > No partition metadata for topic my-replicated-topic due to
>>> > > kafka.common.LeaderNotAvailableException}] for topic
>>> > [my-replicated-topic]:
>>> > > class kafka.common.LeaderNotAvailableException
>>> > >  (kafka.producer.BrokerPartitionInfo)
>>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for topics
>>> > > my-replicated-topic with correlation ids in [41,48]
>>> > > (kafka.producer.async.DefaultEventHandler)
>>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1 events
>>> > > (kafka.producer.async.ProducerSendThread)
>>> > > kafka.common.FailedToSendMessageException: Failed to send messages
>>> after
>>> > 3
>>> > > tries.
>>> > >         at
>>> > >
>>> >
>>> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
>>> > >         at
>>> > >
>>> >
>>> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
>>> > >         at
>>> > >
>>> >
>>> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
>>> > >         at
>>> > >
>>> >
>>> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
>>> > >         at
>>> scala.collection.immutable.Stream.foreach(Stream.scala:254)
>>> > >         at
>>> > >
>>> >
>>> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
>>> > >         at
>>> > >
>>> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
>>> > >
>>> > >
>>> > > I have no idea why the leader is not available.Can someone give me a
>>> > hint?
>>> > > Thanks a lot.
>>> > >
>>> >
>>>
>>
>>
>

Re: Kafka cannot produce message

Posted by Jiang Jacky <ji...@gmail.com>.
Another thing need is my instance comes with very small memory, just 683M,
I am not sure if it is related. I will try to use 8G memory instance.


2013/10/10 Jiang Jacky <ji...@gmail.com>

> yes, even I cannot create new topic, same error, leadernotavailable.
> My zookeeper and storm all are working very well, except of Kafka.
>
>
> 2013/10/10 Neha Narkhede <ne...@gmail.com>
>
>> Are you trying to produce these messages to a newly created topic?
>>
>>
>> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <ji...@gmail.com> wrote:
>>
>> > can anyone help me? Thanks a lot
>> >
>> >
>> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
>> >
>> > > Hi, I run into kafka issue recently, when I try to produce a message,
>> it
>> > > gives me follow error
>> > >
>> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
>> > > id:0,host:localhost,port:9092 with correlation id 47 for 1 topic(s)
>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
>> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for
>> producing
>> > > (kafka.producer.SyncProducer)
>> > > [2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
>> > > (kafka.producer.SyncProducer)
>> > > [2013-10-11 00:30:26,753] INFO Closing socket connection to /
>> 127.0.0.1.
>> > > (kafka.network.Processor)
>> > > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
>> > > [{TopicMetadata for topic my-replicated-topic ->
>> > > No partition metadata for topic my-replicated-topic due to
>> > > kafka.common.LeaderNotAvailableException}] for topic
>> > [my-replicated-topic]:
>> > > class kafka.common.LeaderNotAvailableException
>> > >  (kafka.producer.BrokerPartitionInfo)
>> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by topic,
>> > > partition due to: Failed to fetch topic metadata for topic:
>> > > my-replicated-topic (kafka.producer.async.DefaultEventHandler)
>> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before retrying
>> send.
>> > > Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
>> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
>> > > id:0,host:localhost,port:9092 with correlation id 48 for 1 topic(s)
>> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
>> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for
>> producing
>> > > (kafka.producer.SyncProducer)
>> > > [2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
>> > > (kafka.producer.SyncProducer)
>> > > [2013-10-11 00:30:26,874] INFO Closing socket connection to /
>> 127.0.0.1.
>> > > (kafka.network.Processor)
>> > > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
>> > > [{TopicMetadata for topic my-replicated-topic ->
>> > > No partition metadata for topic my-replicated-topic due to
>> > > kafka.common.LeaderNotAvailableException}] for topic
>> > [my-replicated-topic]:
>> > > class kafka.common.LeaderNotAvailableException
>> > >  (kafka.producer.BrokerPartitionInfo)
>> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for topics
>> > > my-replicated-topic with correlation ids in [41,48]
>> > > (kafka.producer.async.DefaultEventHandler)
>> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1 events
>> > > (kafka.producer.async.ProducerSendThread)
>> > > kafka.common.FailedToSendMessageException: Failed to send messages
>> after
>> > 3
>> > > tries.
>> > >         at
>> > >
>> >
>> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
>> > >         at
>> > >
>> >
>> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
>> > >         at
>> > >
>> >
>> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
>> > >         at
>> > >
>> >
>> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
>> > >         at scala.collection.immutable.Stream.foreach(Stream.scala:254)
>> > >         at
>> > >
>> >
>> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
>> > >         at
>> > >
>> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
>> > >
>> > >
>> > > I have no idea why the leader is not available.Can someone give me a
>> > hint?
>> > > Thanks a lot.
>> > >
>> >
>>
>
>

Re: Kafka cannot produce message

Posted by Jiang Jacky <ji...@gmail.com>.
yes, even I cannot create new topic, same error, leadernotavailable.
My zookeeper and storm all are working very well, except of Kafka.


2013/10/10 Neha Narkhede <ne...@gmail.com>

> Are you trying to produce these messages to a newly created topic?
>
>
> On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <ji...@gmail.com> wrote:
>
> > can anyone help me? Thanks a lot
> >
> >
> > 2013/10/10 Jiang Jacky <ji...@gmail.com>
> >
> > > Hi, I run into kafka issue recently, when I try to produce a message,
> it
> > > gives me follow error
> > >
> > > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
> > > id:0,host:localhost,port:9092 with correlation id 47 for 1 topic(s)
> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for
> producing
> > > (kafka.producer.SyncProducer)
> > > [2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
> > > (kafka.producer.SyncProducer)
> > > [2013-10-11 00:30:26,753] INFO Closing socket connection to /127.0.0.1
> .
> > > (kafka.network.Processor)
> > > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
> > > [{TopicMetadata for topic my-replicated-topic ->
> > > No partition metadata for topic my-replicated-topic due to
> > > kafka.common.LeaderNotAvailableException}] for topic
> > [my-replicated-topic]:
> > > class kafka.common.LeaderNotAvailableException
> > >  (kafka.producer.BrokerPartitionInfo)
> > > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by topic,
> > > partition due to: Failed to fetch topic metadata for topic:
> > > my-replicated-topic (kafka.producer.async.DefaultEventHandler)
> > > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before retrying
> send.
> > > Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
> > > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
> > > id:0,host:localhost,port:9092 with correlation id 48 for 1 topic(s)
> > > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for
> producing
> > > (kafka.producer.SyncProducer)
> > > [2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
> > > (kafka.producer.SyncProducer)
> > > [2013-10-11 00:30:26,874] INFO Closing socket connection to /127.0.0.1
> .
> > > (kafka.network.Processor)
> > > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
> > > [{TopicMetadata for topic my-replicated-topic ->
> > > No partition metadata for topic my-replicated-topic due to
> > > kafka.common.LeaderNotAvailableException}] for topic
> > [my-replicated-topic]:
> > > class kafka.common.LeaderNotAvailableException
> > >  (kafka.producer.BrokerPartitionInfo)
> > > [2013-10-11 00:30:26,876] ERROR Failed to send requests for topics
> > > my-replicated-topic with correlation ids in [41,48]
> > > (kafka.producer.async.DefaultEventHandler)
> > > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1 events
> > > (kafka.producer.async.ProducerSendThread)
> > > kafka.common.FailedToSendMessageException: Failed to send messages
> after
> > 3
> > > tries.
> > >         at
> > >
> >
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> > >         at
> > >
> >
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> > >         at
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> > >         at
> > >
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> > >         at scala.collection.immutable.Stream.foreach(Stream.scala:254)
> > >         at
> > >
> >
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> > >         at
> > >
> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> > >
> > >
> > > I have no idea why the leader is not available.Can someone give me a
> > hint?
> > > Thanks a lot.
> > >
> >
>

Re: Kafka cannot produce message

Posted by Neha Narkhede <ne...@gmail.com>.
Are you trying to produce these messages to a newly created topic?


On Thu, Oct 10, 2013 at 6:15 PM, Jiang Jacky <ji...@gmail.com> wrote:

> can anyone help me? Thanks a lot
>
>
> 2013/10/10 Jiang Jacky <ji...@gmail.com>
>
> > Hi, I run into kafka issue recently, when I try to produce a message, it
> > gives me follow error
> >
> > [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
> > id:0,host:localhost,port:9092 with correlation id 47 for 1 topic(s)
> > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for producing
> > (kafka.producer.SyncProducer)
> > [2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
> > (kafka.producer.SyncProducer)
> > [2013-10-11 00:30:26,753] INFO Closing socket connection to /127.0.0.1.
> > (kafka.network.Processor)
> > [2013-10-11 00:30:26,754] WARN Error while fetching metadata
> > [{TopicMetadata for topic my-replicated-topic ->
> > No partition metadata for topic my-replicated-topic due to
> > kafka.common.LeaderNotAvailableException}] for topic
> [my-replicated-topic]:
> > class kafka.common.LeaderNotAvailableException
> >  (kafka.producer.BrokerPartitionInfo)
> > [2013-10-11 00:30:26,755] ERROR Failed to collate messages by topic,
> > partition due to: Failed to fetch topic metadata for topic:
> > my-replicated-topic (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 00:30:26,755] INFO Back off for 100 ms before retrying send.
> > Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
> > id:0,host:localhost,port:9092 with correlation id 48 for 1 topic(s)
> > Set(my-replicated-topic) (kafka.client.ClientUtils$)
> > [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for producing
> > (kafka.producer.SyncProducer)
> > [2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
> > (kafka.producer.SyncProducer)
> > [2013-10-11 00:30:26,874] INFO Closing socket connection to /127.0.0.1.
> > (kafka.network.Processor)
> > [2013-10-11 00:30:26,875] WARN Error while fetching metadata
> > [{TopicMetadata for topic my-replicated-topic ->
> > No partition metadata for topic my-replicated-topic due to
> > kafka.common.LeaderNotAvailableException}] for topic
> [my-replicated-topic]:
> > class kafka.common.LeaderNotAvailableException
> >  (kafka.producer.BrokerPartitionInfo)
> > [2013-10-11 00:30:26,876] ERROR Failed to send requests for topics
> > my-replicated-topic with correlation ids in [41,48]
> > (kafka.producer.async.DefaultEventHandler)
> > [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1 events
> > (kafka.producer.async.ProducerSendThread)
> > kafka.common.FailedToSendMessageException: Failed to send messages after
> 3
> > tries.
> >         at
> >
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
> >         at
> >
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
> >         at
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
> >         at
> >
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
> >         at scala.collection.immutable.Stream.foreach(Stream.scala:254)
> >         at
> >
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
> >         at
> > kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
> >
> >
> > I have no idea why the leader is not available.Can someone give me a
> hint?
> > Thanks a lot.
> >
>

Re: Kafka cannot produce message

Posted by Jiang Jacky <ji...@gmail.com>.
can anyone help me? Thanks a lot


2013/10/10 Jiang Jacky <ji...@gmail.com>

> Hi, I run into kafka issue recently, when I try to produce a message, it
> gives me follow error
>
> [2013-10-11 00:30:26,740] INFO Fetching metadata from broker
> id:0,host:localhost,port:9092 with correlation id 47 for 1 topic(s)
> Set(my-replicated-topic) (kafka.client.ClientUtils$)
> [2013-10-11 00:30:26,741] INFO Connected to localhost:9092 for producing
> (kafka.producer.SyncProducer)
> [2013-10-11 00:30:26,753] INFO Disconnecting from localhost:9092
> (kafka.producer.SyncProducer)
> [2013-10-11 00:30:26,753] INFO Closing socket connection to /127.0.0.1.
> (kafka.network.Processor)
> [2013-10-11 00:30:26,754] WARN Error while fetching metadata
> [{TopicMetadata for topic my-replicated-topic ->
> No partition metadata for topic my-replicated-topic due to
> kafka.common.LeaderNotAvailableException}] for topic [my-replicated-topic]:
> class kafka.common.LeaderNotAvailableException
>  (kafka.producer.BrokerPartitionInfo)
> [2013-10-11 00:30:26,755] ERROR Failed to collate messages by topic,
> partition due to: Failed to fetch topic metadata for topic:
> my-replicated-topic (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 00:30:26,755] INFO Back off for 100 ms before retrying send.
> Remaining retries = 0 (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 00:30:26,856] INFO Fetching metadata from broker
> id:0,host:localhost,port:9092 with correlation id 48 for 1 topic(s)
> Set(my-replicated-topic) (kafka.client.ClientUtils$)
> [2013-10-11 00:30:26,857] INFO Connected to localhost:9092 for producing
> (kafka.producer.SyncProducer)
> [2013-10-11 00:30:26,874] INFO Disconnecting from localhost:9092
> (kafka.producer.SyncProducer)
> [2013-10-11 00:30:26,874] INFO Closing socket connection to /127.0.0.1.
> (kafka.network.Processor)
> [2013-10-11 00:30:26,875] WARN Error while fetching metadata
> [{TopicMetadata for topic my-replicated-topic ->
> No partition metadata for topic my-replicated-topic due to
> kafka.common.LeaderNotAvailableException}] for topic [my-replicated-topic]:
> class kafka.common.LeaderNotAvailableException
>  (kafka.producer.BrokerPartitionInfo)
> [2013-10-11 00:30:26,876] ERROR Failed to send requests for topics
> my-replicated-topic with correlation ids in [41,48]
> (kafka.producer.async.DefaultEventHandler)
> [2013-10-11 00:30:26,876] ERROR Error in handling batch of 1 events
> (kafka.producer.async.ProducerSendThread)
> kafka.common.FailedToSendMessageException: Failed to send messages after 3
> tries.
>         at
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
>         at
> kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:104)
>         at
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:87)
>         at
> kafka.producer.async.ProducerSendThread$$anonfun$processEvents$3.apply(ProducerSendThread.scala:67)
>         at scala.collection.immutable.Stream.foreach(Stream.scala:254)
>         at
> kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:66)
>         at
> kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
>
>
> I have no idea why the leader is not available.Can someone give me a hint?
> Thanks a lot.
>