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

  • 相关阅读:
    Python 多核 多线程 调度
    mysql-select for update
    Python logging模块
    TCP/IP和HTTP协议与Socket的区别联系
    DNS+CDN
    wget命令
    Cannot find module 'webpack-cli/bin/config-yargs
    TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'
    js 创建私有变量
    报错集锦及解决方案
  • 原文地址:https://www.cnblogs.com/ideajiang/p/10735589.html
Copyright © 2011-2022 走看看