This topic provides answers to some commonly asked questions about Kafka.

How do I fix the error "ERROR: Wile executing topic command: Replication factor: 1 larger than available brokers: 0"?

Possible causes:
  • An error occurs in the Kafka service. The broker process of the cluster exits.
  • The information about the ZooKeeper hosts of the Kafka cluster is invalid.
  • Fix the issue based on logs.
  • Change the value of the Cluster Zookeeper Hosts parameter to the value of the kafka.manager.zookeeper.hosts parameter for the Kafka cluster in the EMR console.

How do I fix the error " Address already in use (Bind failed)"?

The JMX port has been occupied. Before you run a command, manually specify a JMX port. Example:
JMX_PORT=10101 kafka-topics --zookeeper emr-header-1:2181/kafka-1.0.0 --list