kafka cluster using the problems encountered

1, kafka on the cluster to send a message by kafka-console-producer.sh, using kafka-console-consumer.sh not receive a message, no movement has been stuck

 

send:

./kafka-console-producer.sh --broker-list zk1:9092,zk2:9092,zk3:9092 --topic xyz

 

receive:

./kafka-console-consumer.sh --bootstrap-server zk1:9092,zk2:9092,zk3:9092 --topic xyz

 

Solution:

Open kafka logs, config / log4j.properties file in full changed the log level DEBUG;

Reception is performed when the above command, see the following error log in a log broker,

 

Error while fetching metadata for __consumer_offsets-26: listener ListenerName(PLAINTEXT) not found on leader -1

 

Enter zookeeper / bin directory, execute zkCli.sh,

rmr /brokers
rmr /config/brokers
rmr /config/topics

 Note: I am not here production environment, operating freely, you can only try to execute the first command to try to restart the cluster after.

Then restart kafka cluster can be.

 

The root cause is not clear, the reference here  https://stackoverflow.com/questions/34844209/consumer-not-receiving-messages-kafka-console-new-consumer-api-kafka-0-9   Liz Bennett practice, according to we here the error probably means also brokers related information is incorrect, so clearly related information zookeeper, a cluster restart to try.

Guess you like

Origin www.cnblogs.com/mylittlecabin/p/11541473.html