Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache kafka 注意:当前ISR集(2)的大小不足以满足3的最小ISR要求_Apache Kafka_Confluent Platform - Fatal编程技术网

Apache kafka 注意:当前ISR集(2)的大小不足以满足3的最小ISR要求

Apache kafka 注意:当前ISR集(2)的大小不足以满足3的最小ISR要求,apache-kafka,confluent-platform,Apache Kafka,Confluent Platform,我有以下设置 代理:3-所有代理都已启动并使用min.insync.replicas=3运行 我用以下配置创建了一个主题 bin\windows\kafka主题-zookeeper 127.0.0.1:2181-主题 主题ack all-创建-分区4-复制因子3 我用ack=all触发了生产者,生产者能够发送消息。 但是,当我启动消费者时,问题就开始了 bin\windows\kafka控制台使用者-引导服务器localhost:9094,localhost:9092-主题ack all-从头开

我有以下设置 代理:3-所有代理都已启动并使用min.insync.replicas=3运行

我用以下配置创建了一个主题

bin\windows\kafka主题-zookeeper 127.0.0.1:2181-主题 主题ack all-创建-分区4-复制因子3

我用ack=all触发了生产者,生产者能够发送消息。 但是,当我启动消费者时,问题就开始了

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

错误是

NotEnoughReplicasException:当前ISR集合2的大小为 不足以满足3的最低isr要求 NoteNoughReplicateScexception: 当前ISR Set3不足以满足最低ISR要求 对于分区u u con,为3

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

当前ISR集是什么意思?每个主题和它所代表的意义是否不同? 我猜min.isr和min.insync.replications是一样的。我希望它的值至少与复制因子相同? 更新1

更新2


从粘贴的输出来看,“消费者偏移量”主题似乎是使用单个副本创建的

您的代理似乎也是使用min.insync.replicas=3设置的

使用此配置,如果使用者提交偏移量,则预期将获得NotEnoughReplicasException

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


假设这是一个开发环境,返回到有效状态的最简单方法是删除u消费者_偏移量,并在所有3个Broker.s都启动时重新运行消费者。

从粘贴的输出来看,似乎创建了一个副本来创建u消费者_偏移量主题

您的代理似乎也是使用min.insync.replicas=3设置的

使用此配置,如果使用者提交偏移量,则预期将获得NotEnoughReplicasException

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


假设这是一个开发环境,返回到有效状态的最简单方法是删除uu消费者u偏移量,并在所有3个代理都启动时重新运行你的消费者。

你能添加bin\windows\kafka topics-zookeer 127.0.0.1:2181-description的输出吗?@MickaelMaison,刚刚添加。谢谢,还有,为什么Configs标志有时显示某些状态,而其他时候不显示状态?运行consumer时,错误出现在_consumer_Offset主题中。你也可以添加该主题的描述吗?@MickaelMaison,我刚刚添加,谢谢你添加bin\windows\kafka topics-zookeer 127.0.0.1:2181-descripe的输出?@MickaelMaison,刚刚添加。谢谢,还有,为什么Configs标志有时显示某些状态,而其他时候不显示状态?运行consumer时,错误出现在_consumer_Offset主题中。你能把这个话题的描述也加上吗?@MickaelMaison我刚刚加了一句,谢谢。请允许我承认这些假设是完全正确的。很少有后续问题。对于值为3的min.insync.replicas,我假设至少需要3或4个代理?当前ISR集是什么意思?每个主题和它所代表的意义是否不同?您认为它为什么会提出这样的投诉?noteNoughReplicaseException:当前ISR集合3的大小不足以满足分区的最小ISR要求3。由于ISR集合应该大于min.ISR,因此出现了错误,因此在这种情况下-需要4个代理?没有其他问题-因此,在创建群集之前,应该就min.insync.replicas达成一致,以避免出现这些混乱?如果不是,这可能需要在生产中根据主题进行更改?而且,min.insync.replicas是否可以与复制因子相同?这是很多问题!您通常希望复制副本的数量复制因子大于min.insync.replicas。这允许执行代理的滚动重启,并保持一切正常。3个副本和2分钟。insync是一种非常常见的配置BB,但如果需要3分钟。insync,则至少需要4个副本。即使在运行时,也可以更改所有这些设置,并且始终可以向主题添加覆盖。对于prod环境,您显然希望提前做出决策,但对于dev,您可以根据需要更改配置
将消费者补偿的配置设置为1,因为这是原始值,它现在可以正常工作PS C:\confluent-5.5.0>bin\windows\kafka配置-Zookeer 127.0.0.1:2181-实体类型主题-实体名称(消费者补偿-添加配置min.insync.replicas=1-请允许我确认假设完全正确。很少有后续问题。对于值为3的min.insync.replicas,我假设至少需要3或4个代理?当前ISR集是什么意思?每个主题和它所代表的意义是否不同?您认为它为什么会提出这样的投诉?noteNoughReplicaseException:当前ISR集合3的大小不足以满足分区的最小ISR要求3。由于ISR集合应该大于min.ISR,因此出现了错误,因此在这种情况下-需要4个代理?没有其他问题-因此,在创建群集之前,应该就min.insync.replicas达成一致,以避免出现这些混乱?如果不是,这可能需要在生产中根据主题进行更改?而且,min.insync.replicas是否可以与复制因子相同?这是很多问题!您通常希望复制副本的数量复制因子大于min.insync.replicas。这允许执行代理的滚动重启,并保持一切正常。3个副本和2分钟。insync是一种非常常见的配置BB,但如果需要3分钟。insync,则至少需要4个副本。即使在运行时,也可以更改所有这些设置,并且始终可以向主题添加覆盖。对于prod环境,您显然希望提前做出决策,但对于dev,您可以根据需要更改配置。我将consumer_Offset的配置更新为1,因为这是原始值,PS C:\confluent-5.5.0>bin\windows\kafka配置-zookeeper 127.0.0.1:2181-实体类型主题-实体名称\uu消费者\u偏移量-添加配置min.insync.replicas=1-更改
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 
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