Kafka producer and consumer -- leader not available


#1

HI,

I am able to create a topic with no error. But while produce or consume messages to topic I am seeing LEADER_NOT_AVAILABLE error. Below are the commands,

Error while fetching metadata with correlation id 2 : {kafkademopr1=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)

Looks like have some issues in kafka configuration. Can you please look into this.
Thanks


#2

Can you paste the Kafka command that you are using.


#3

kafka-topics.sh --create --zookeeper nn01.itversity.com:2181,nn02.itversity.com:2181,rm01.itversity.com:2181 --replication-factor 3 --partitions 3 --topic kafkademorp3
kafka-console-producer.sh --broker-list nn01.itversity.com:6667,nn02.itversity.com:6667,rm01.itversity.com:6667 --topic kafkademorp3
kafka-console-consumer.sh --bootstrap-server nn01.itversity.com:6667,nn02.itversity.com:6667,rm01.itversity.com:6667 --topic kakfademorp3 --from-beginning


#4

It is working fine. Please find the screenshot for reference.


#5

Thanks. Initially I tried to use the hdp 2.6, that was causing error. /usr/hdp/2.6.5.0-292/kafka/
with 2.5 . it is working fine. for flume it is configured with 2.6.


#6