Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

issue in kafka-console-producer.sh command

issue in kafka-console-producer.sh command

New Contributor

Getting the following issue while the executing the Producer script "sh kafka-console-producer.sh --broker-list XXXX.XXX.com:6667 --topic march31"

[2017-03-30 21:08:53,621] ERROR fetching topic metadata for topics [Set(march31)] from broker [ArrayBuffer(BrokerEndPoint(0,XXXXX.XX.com,6667))] failed (kafka.utils.CoreUtils$) kafka.common.KafkaException: fetching topic metadata for topics [Set(march31)] from broker [ArrayBuffer(BrokerEndPoint(0,XXXXXX.XXX.com,6667))] failed at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:73) at kafka.producer.BrokerPartitionInfo.updateInfo(BrokerPartitionInfo.scala:82) at kafka.producer.async.DefaultEventHandler$anonfun$handle$2.apply$mcV$sp(DefaultEventHandler.scala:79) at kafka.utils.CoreUtils$.swallow(CoreUtils.scala:79) at kafka.utils.Logging$class.swallowError(Logging.scala:106) at kafka.utils.CoreUtils$.swallowError(CoreUtils.scala:51) at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:79) at kafka.producer.async.ProducerSendThread.tryToHandle(ProducerSendThread.scala:105) at kafka.producer.async.ProducerSendThread$anonfun$processEvents$3.apply(ProducerSendThread.scala:88) at kafka.producer.async.ProducerSendThread$anonfun$processEvents$3.apply(ProducerSendThread.scala:68) at scala.collection.immutable.Stream.foreach(Stream.scala:547) at kafka.producer.async.ProducerSendThread.processEvents(ProducerSendThread.scala:67) at kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:45) Caused by: java.io.EOFException at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:83) at kafka.network.BlockingChannel.readCompletely(BlockingChannel.scala:140) at kafka.network.BlockingChannel.receive(BlockingChannel.scala:131) at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:79) at kafka.producer.SyncProducer.kafka$producer$SyncProducer$doSend(SyncProducer.scala:76) at kafka.producer.SyncProducer.send(SyncProducer.scala:121) at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:59)

1 REPLY 1
Highlighted

Re: issue in kafka-console-producer.sh command

Contributor
@Sanjib Behera

Is your cluster kerberized ? Is yes could you please try to use below command :

# sh kafka-console-producer.sh --broker-list XXXX.XXX.com:6667 --topic march31 --security-protocol SASL_PLAINTEXT

Please check connectivity between kafka client and kakfka broker:

# telnet XXXX.XXX.com:6667

- As which user you are running producer ?

- Please post the output of klist command as a user which is executing producer code/script.

Don't have an account?
Coming from Hortonworks? Activate your account here