On this page
Help Center/ MapReduce Service/ Troubleshooting/ Using Kafka/ An Error Is Reported When the Kafka Client Is Run to Obtain Topics

An Error Is Reported When the Kafka Client Is Run to Obtain Topics

Updated on 2024-12-18 GMT+08:00

Symptom

The following error is reported when the Kafka client is run to obtain topics:

ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 2 larger than available brokers: 0.

Possible Cause

The variable for obtaining the ZooKeeper address is incorrect due to special characters.

Procedure

  1. Log in to any Master node.
  2. Run the cat Client installation directory/Kafka/kafka/config/server.properties |grep '^zookeeper.connect =' command to check the variable of the ZooKeeper address.
  3. Run Kafka again to obtain the topic. Do not add any character to the variables obtained in 2.
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback