为什么3个Kafka经纪人在同时重新启动所有经纪人后都没有启动?

问题描述 投票:0回答:1

请,帮助我了解kafka的工作方式。我有3个具有此配置的kafka经纪人:

broker.id=1
listeners=PLAINTEXT://1.2.3.4:9092
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=105906176
message.max.bytes=105906176
replica.fetch.max.bytes=105906176
log.dirs=/opt/kafka_2.12-2.1.0/logs
num.partitions=10
num.recovery.threads.per.data.dir=10
offsets.topic.replication.factor=2
transaction.state.log.replication.factor=2
transaction.state.log.min.isr=2
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=600000
zookeeper.connect=1.2.3.4:2181,5.6.7.8:2181,3.1.2.1:2181
zookeeper.connection.timeout.ms=6000
group.initial.rebalance.delay.ms=3
auto.create.topics.enable=false
delete.topic.enable=true
replica.fetch.wait.max.ms=500
replica.lag.time.max.ms=10000
request.timeout.ms=305000

同时重启所有代理后,在3个代理中的2个中,我连续看到此错误:

kafka-server-start.sh[2448]: [2020-02-10 06:01:33,969] ERROR [KafkaApi-2] Number of alive brokers '0' does not meet the required replication factor '2' for the transactions state topic (configured via 'transaction.state.log.replication.factor'). This error can be ignored if the cluster is starting up and not all brokers are up yet. (kafka.server.KafkaApis)

但是所有服务器都运行,所有kafka服务启动,所有zookeeper启动(echo stat | nc zookeeper_ip 2181-显示一切正常)。为什么卡夫卡说-活跃经纪人的数量为“ 0”?

在一个经纪人处,我没有看到任何错误。当我重新启动kafka代理(只是重新启动服务kafka,不是所有服务器)时,没有此错误-kafka群集启动工作。所有kafka经纪人都可以相互连接,启动复制分区,一切都很好。为什么会发生?为什么卡夫卡经纪人重启后没有看到对方?可能是当我们使用3个kafka代理时,我们无法同时重新启动所有它们吗?

apache-kafka
1个回答
0
投票

否,您不应同时重新启动它们。

您应该确定哪个是控制器代理,然后最后一次重新启动,然后其余部分滚动重新启动

© www.soinside.com 2019 - 2024. All rights reserved.