Tag Archives: Error when creating topic

kakfa Create topic Error: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 2.

Error message:

java. util. concurrent. ExecutionException: org. apache. kafka. common. errors. InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 2.

According to the error message, the number of copies of topic to be created is 3 and the number of brokers is 2. Indicates that Kafka did not get the stored brokers information in zookeeper.

Check:

Whether the Kafka cluster is enabled normally. At the same time, it should be noted that the number of topic replicas created cannot be greater than the number of surviving brokers in the cluster

Lsof – I check whether each Kafka node is normal