Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka >> mail # user >> kafka.common.FailedToSendMessageException - 0.8


+
Ran RanUser 2013-06-20, 07:09
+
Marc Labbe 2013-06-20, 12:49
+
Jun Rao 2013-06-20, 15:02
+
Ran RanUser 2013-06-23, 07:14
+
Yogesh Sangvikar 2013-06-25, 04:21
Copy link to this message
-
Re: kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries.
Could you attach the log before FailedToSendMessageException in the
producer? It should tell you the reason why the message can't be sent.

Thanks,

Jun
On Mon, Jun 24, 2013 at 9:20 PM, Yogesh Sangvikar <
[EMAIL PROTECTED]> wrote:

> Hi Team,
>
> We are using  kafka-0.8.0-beta1-candidate1 release. (
> https://github.com/apache/kafka/tree/0.8.0-beta1-candidate1).
> While running producer with following configuration, we found an issue
> "kafka.common.
> FailedToSendMessageException: Failed to send messages after 3 tries",
>
> We are using default broker configurations.
>
> Code snippet:
>
> private Producer<byte[], byte[]> producer = null;
>
>   public KafkaProducer() {
>     Properties props = new Properties();
>     props.put("metadata.broker.list", "broker1:9092<
> http://10.252.8.168:9092>
> ,broker2:9092 <http://10.252.8.48:9092>,broker3:9092<
> http://10.252.8.234:9092>
> ,broker4:9092 <http://10.252.8.121:9092>,broker5:9092<
> http://10.252.8.236:9092>
> ");
>     *props.put("producer.type", "sync");*
>     ProducerConfig config = new ProducerConfig(props);
>     producer = new Producer<byte[], byte[]>(config);
>   }
>
>   public void publishTinCanMessage(String message, int event) throws
> Exception {
>     KeyedMessage<byte[], byte[]> data = new KeyedMessage<byte[],
> byte[]>("tin_can_topic",
> (String.valueOf(event%3)).getBytes(),message.getBytes());
>     producer.send(data);
>
>   }
> ......
>
> Found issue:
> kafka.common.
> *FailedToSendMessageException: Failed to send messages after 3 tries.*
>         at
>
> kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:90)
>         at kafka.producer.Producer.send(Producer.scala:74)
>         at kafka.javaapi.producer.Producer.send(Producer.scala:32)
>         at
>
> com.pearson.firehose.KafkaProducer.publishTinCanMessage(KafkaProducer.java:27)
>         at com.pearson.firehose.KafkaProducer.main(KafkaProducer.java:44)
>
>
>
> But. with *props.put("producer.type", "async"); *the producer was working
> fine and generating messages.
>
> Could you please help us to understand is there any configuration missing
> or is there any issue with "producer.type=sync"?
>
>
> Thanks in advance.
>
> Thanks,
> Yogesh Sangikar
>

 
+
Yogesh Sangvikar 2013-06-25, 05:19
+
Jun Rao 2013-06-25, 16:39
+
Markus Roder 2013-06-25, 05:56
+
Florin Trofin 2013-06-25, 07:12
+
Jonathan Hodges 2013-06-25, 10:58
+
Jonathan Hodges 2013-06-25, 11:09
+
Yogesh Sangvikar 2013-06-25, 14:38
+
Florin Trofin 2013-06-25, 17:12
+
Yogesh Sangvikar 2013-06-26, 09:13
+
Jun Rao 2013-06-25, 16:42
+
Kalpa 1977 2014-07-07, 16:19
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB