当三分之一的经纪人下跌时,卡夫卡将无法获得补偿。

时间:2019-06-18 09:29:37

标签: apache-kafka

我有3个Kafka经纪人在运行。我所有的主题的复制因子都设置为2。当我关闭其中一个代理时,据我所知,Kafka集群应该可以正常工作,但是由于某种原因却不能。

例如,我无法运行以下脚本,当所有代理都还活着时,该脚本将正常运行。

./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group myGroup --describe 
Note: This will not show information about old Zookeeper-based consumers. 
Error: Executing consumer group command failed due to Failed to get offsets by times in 305000ms

包含偏移量(__consumer_offsets)的系统主题也已正确复制。代理1已关闭,但仍然至少有一个正常副本。

./kafka-topics.sh --zookeeper localhost --topic __consumer_offsets --describe
Topic:__consumer_offsets    PartitionCount:50   ReplicationFactor:2 Configs:segment.bytes=104857600,cleanup.policy=compact,compression.type=producer
    Topic: __consumer_offsets   Partition: 0    Leader: 3   Replicas: 3,1   Isr: 3
    Topic: __consumer_offsets   Partition: 1    Leader: 2   Replicas: 1,2   Isr: 2
    Topic: __consumer_offsets   Partition: 2    Leader: 2   Replicas: 2,3   Isr: 3,2
    Topic: __consumer_offsets   Partition: 3    Leader: 3   Replicas: 3,2   Isr: 2,3
    Topic: __consumer_offsets   Partition: 4    Leader: 3   Replicas: 1,3   Isr: 3
    Topic: __consumer_offsets   Partition: 5    Leader: 2   Replicas: 2,1   Isr: 2
    Topic: __consumer_offsets   Partition: 6    Leader: 3   Replicas: 3,1   Isr: 3
    Topic: __consumer_offsets   Partition: 7    Leader: 2   Replicas: 1,2   Isr: 2
    Topic: __consumer_offsets   Partition: 8    Leader: 2   Replicas: 2,3   Isr: 3,2
    (...)

知道为什么我会收到“无法获取偏移”错误吗?

0 个答案:

没有答案