美文网首页Kafka
安装Kafka Broker 报错replication fac

安装Kafka Broker 报错replication fac

作者: 初学者_8f7b | 来源:发表于2018-12-05 18:31 被阅读0次

    确保Java和Zookeeper安装配置完成之后,安装Kafka

    官网下载 http://kafka.apache.org/downloads.html 

    #tar -zxf kafka_2.12-0.11.0.3.tar.gz

    #mv kafka_2.12-0.11.0.3 /usr/local/kafka

    #mkdir /tmp/kafka-logs

    #export JAVA_HOME=/usr/java/jdk1.8

    #/usr/local/kafka/bin/kafka-server-start.sh -daemon /usr/local/kafka/config/server.properties

    通过创建测试主题验证一下

    /usr/local/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test 

    执行报错

    ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 1 larger than available brokers: 0

     需要启动broker:

    bin/zookeeper-server-start.sh config/zookeeper.properties

    bin/kafka-server-start.sh config/server.properties

    相关文章

      网友评论

        本文标题:安装Kafka Broker 报错replication fac

        本文链接:https://www.haomeiwen.com/subject/qvmwcqtx.html