首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NotEnoughReplicasException:当前ISR集(2)的大小不足以满足3的min.isr要求

NotEnoughReplicasException:当前ISR集(2)的大小不足以满足3的min.isr要求
EN

Stack Overflow用户
提问于 2020-07-07 07:37:42
回答 1查看 7.3K关注 0票数 2

我有以下设置Brokers :3-所有都已启动和运行与min.insync.replicas=3。

我创建了一个具有以下配置的主题

bin\windows\kafka-主题--动物园管理员127.0.0.1:2181 -主题全部创建-分区4-复制因子3

我用"ack = all“触发了生产者,并且生产者能够发送消息。然而,当我启动消费者时,问题就开始了。

bin\windows\kafka-控制台-使用者-引导-服务器本地主机:9094,本地主机:9092-主题-ack-从开始

错误是

NotEnoughReplicasException:当前ISR集(2)的大小不足以满足3 NotEnoughReplicasException的min.isr要求:当前ISR集(3)的大小不足以满足分区__con的3的min.isr要求。

我在这里看到两种错误。我浏览了文档,也了解了"min.isr",但是,这些错误消息并不清楚。

  1. ,它指的是当前ISR集是什么意思?每个主题都有不同的含义吗?

  1. ,我想min.isr和min.insync.replicas是一样的。我希望是至少应该具有与“复制因子”相同的值??

更新#1

代码语言:javascript
复制
Topic: topic-ack-all    PartitionCount: 4       ReplicationFactor: 3    Configs:            
        Topic: topic-ack-all    Partition: 0    Leader: 1       Replicas: 1,2,3 Isr: 1,2,3  
        Topic: topic-ack-all    Partition: 1    Leader: 1       Replicas: 2,3,1 Isr: 1,2,3  
        Topic: topic-ack-all    Partition: 2    Leader: 1       Replicas: 3,1,2 Isr: 1,2,3  
        Topic: topic-ack-all    Partition: 3    Leader: 1       Replicas: 1,3,2 Isr: 1,2,3 

更新2

代码语言:javascript
复制
Topic: __consumer_offsets       PartitionCount: 50      ReplicationFactor: 1    Configs: compression.type=producer,cleanup.policy=compact,segment.bytes=104857600
    Topic: __consumer_offsets       Partition: 0    Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 1    Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 2    Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 3    Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 4    Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 5    Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 6    Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 7    Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 8    Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 9    Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 10   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 11   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 12   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 13   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 14   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 15   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 16   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 17   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 18   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 19   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 20   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 21   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 22   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 23   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 24   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 25   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 26   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 27   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 28   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 29   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 30   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 31   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 32   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 33   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 34   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 35   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 36   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 37   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 38   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 39   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 40   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 41   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 42   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 43   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 44   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 45   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 46   Leader: 3       Replicas: 3     Isr: 3
    Topic: __consumer_offsets       Partition: 47   Leader: 1       Replicas: 1     Isr: 1
    Topic: __consumer_offsets       Partition: 48   Leader: 2       Replicas: 2     Isr: 2
    Topic: __consumer_offsets       Partition: 49   Leader: 3       Replicas: 3     Isr: 3
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-07-08 09:02:41

从您粘贴的输出来看,__consumer_offsets主题似乎是用一个副本创建的。

看起来您的代理也是用min.insync.replicas = 3设置的。

使用此配置,如果使用者提交抵消项,则预期将获得NotEnoughReplicasException

当第一个使用者连接到集群时,将自动创建__consumer_offsets主题。在您的情况下,一个常见的结束方式是运行一个消费者,而您只有一个代理运行。在这种情况下,将使用一个副本创建__consumer_offsets

假设这是一个开发环境,返回到有效状态的最简单方法是删除__consumer_offsets并在所有3个brokers.are启动时重新运行您的消费者。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62770272

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档