Kafka, mail # user - Re: kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries. - 2013-06-25, 10:58
Solr & Elasticsearch trainings in New York & San Francisco [more info][hide]
 Search Hadoop and all its subprojects:

Switch to Threaded View
Copy link to this message
-
Re: kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries.
Hi Florin,

I work with Yogesh so it is interesting you mention the
'metadata.broker.list' property as this was the first error message we saw.
 Consider the following producer code.

Properties props = new Properties();
props.put("broker.list", "x.x.x.x:9092, x.x.x.x :9092, x.x.x.x :9092,
x.x.x.x :9092, x.x.x.x :9092");
props.put("producer.type", "sync");
props.put("compression.codec", "2");  //snappy
ProducerConfig config = new ProducerConfig(props);
producer = new Producer<byte[], byte[]>(config);

This returns the following exception for the required, property
'metadata.broker.list'.

java.lang.IllegalArgumentException: requirement failed: Missing required
property 'metadata.broker.list'
at scala.Predef$.require(Predef.scala:145)
at
kafka.utils.VerifiableProperties.getString(VerifiableProperties.scala:158)
at kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:66)
at kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:56)
at com.pearson.firehose.KafkaProducer.<init>(KafkaProducer.java:21)
at com.pearson.firehose.KafkaProducer.main(KafkaProducer.java:40)

So we just added 'metadata' prefix to the above 'broker.list' property and
this fixed this exception.  However this is where we start to see this
producer retries error in the logs.  Could there be some problem with the
value we are using for 'metadata.broker.list' which is preventing the
producer from connecting?

Thanks,
Jonathan

On Tue, Jun 25, 2013 at 1:12 AM, Florin Trofin <[EMAIL PROTECTED]> wrote:
 
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