replication factor: 1 larger than available brokers: 0

Samebug tips2

Verify on the createTopic command if you've set the right replication factor for the amount of brokers you have. Check as well if all your brokers are correctly setup and that they're alive when you create the topic.


If you're having problems using kafka in cluster, refer to this guide: https://goo.gl/tgWDjS


Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web30

  • via Unknown by Siva Santhalingam,
  • Stack trace

    • kafka.admin.AdminOperationException: replication factor: 1 larger than available brokers: 0 at kafka.admin.AdminUtils$.assignReplicasToBrokers(AdminUtils.scala:117) at kafka.admin.AdminUtils$.createTopic(AdminUtils.scala:403) at kafka.admin.AdminUtils.createTopic(AdminUtils.scala) at io.confluent.examples.producer.ZookeeperUtil.createTopics(ZookeeperUtil.java:98) at io.confluent.examples.producer.ProducerGroup.<init>(ProducerGroup.java:50) at io.confluent.examples.producer.ProducerGroup.main(ProducerGroup.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:745)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,