Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replication factor: 3 larger than available brokers: 1 when starting the kafka

Tags:

apache-kafka

I have a kafka installed in my mac last year, which has many topics within the system. Now I upgrade the zookeeper and kafka to the latest version.

by running zookeeper, it is successful

zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties

Then a broker:

kafka-server-start /usr/local/etc/kafka/server.properties

however it comes up with the error

INFO [Admin Manager on Broker 0]: Error processing create topic request CreatableTopic(name='_confluent-license', numPartitions=1, replicationFactor=3, assignments=[], configs=[CreateableTopicConfig(name='cleanup.policy', value='compact'), CreateableTopicConfig(name='min.insync.replicas', value='2')]) (kafka.server.AdminManager)
org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 3 larger than available brokers: 1.

How would I solve it?

like image 852
user824624 Avatar asked Oct 22 '25 23:10

user824624


1 Answers

A Confluent enterprise license is stored in the _confluent-command topic. This topic is created by default and contains the license that corresponds to the license key supplied through the confluent.license property. So when you're starting the Kafka server it tries to create it with replication-factor of 3 but there is only 1 broker available so it failed.

Set confluent.topic.replication.factor property to 1 in /usr/local/etc/kafka/server.properties file.

like image 77
Pardeep Avatar answered Oct 26 '25 11:10

Pardeep



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!