zoukankan      html  css  js  c++  java
  • kafka创建会话,报Error while executing topic command : Replication factor: 1 larger than available brokers: 0.

     bin/kafka-topics.sh --create --zookeeper es1:2181 --replication-factor 1 --partitions 1 --topic topic1 

    kafka创建会话,报Error while executing topic command : Replication factor: 1 larger than available brokers: 0.

     首先贴出来 kafka的配置文件

    broker.id=0
    advertised.listeners=PLAINTEXT://es1:9092
    num.network.threads=3
    num.io.threads=8
    socket.send.buffer.bytes=102400
    socket.receive.buffer.bytes=102400
    socket.request.max.bytes=104857600
    log.dirs=/tmp/kafka-logs
    num.partitions=1
    num.recovery.threads.per.data.dir=1
    offsets.topic.replication.factor=1
    transaction.state.log.replication.factor=1
    transaction.state.log.min.isr=1
    log.retention.hours=168
    log.segment.bytes=1073741824
    log.retention.check.interval.ms=300000
    zookeeper.connect=localhost:2181/kafka   #针对局域网向公网IP端口暴露的话,这修改配置文件,加入以下配置: 新版本0.10.x broker配置弃用了advertised.host.name和 advertised.port这两个个配置项,就配置advertised.listeners就可以
    zookeeper.connection.timeout.ms=6000
    group.initial.rebalance.delay.ms=0

     只需要修改 

    bin/kafka-topics.sh --create --zookeeper es1:2181/kafka --replication-factor 1 --partitions 1 --topic topic1 

     pasting

  • 相关阅读:
    WinForm里保存TreeView状态
    动态规划 回溯和较难题
    go 基本链表操作
    leetcode 42接雨水
    leetcode 旋转数组搜索
    leetcode 牛客编程 子序列 树 数组(积累)
    剑指offer(积累)
    go快排计算最小k个数和第k大的数
    leetcode 打家劫舍
    leetcode 字符串相关问题
  • 原文地址:https://www.cnblogs.com/ideajiang/p/10735589.html
Copyright © 2011-2022 走看看