简体   繁体   English

kafka + 此服务器不是该主题分区的领导者 + kafka 生产者

[英]kafka + This server is not the leader for that topic-partition + kafka producer

We are get many errors from server.log from each of 3 kafka machines ( we have 3 kafka in the cluster )我们从3 kafka 机器中的每台(我们在集群中有3 kafka )的server.log中得到很多错误

[2019-12-05 13:25:09,529] ERROR [ReplicaFetcherThread-0-1], Error for partition [jdty.dee.rules.time,91] to broker 1001:org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition. (kafka.server.ReplicaFetcherThread)
[2019-12-05 13:25:09,529] ERROR [ReplicaFetcherThread-0-1], Error for partition [jdty.dee.export.profiles,96] to broker 1001:org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition. (kafka.server.ReplicaFetcherThread)
[2019-12-05 13:25:09,529] ERROR [ReplicaFetcherThread-0-1], Error for partition [jdty.dee.control.tt.state,40] to broker 1001:org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition. (kafka.server.ReplicaFetcherThread)
[2019-12-05 13:25:09,529] ERROR [ReplicaFetcherThread-0-1], Error for partition [jdty.dee.control.tt,67] to broker 1001:org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition. (kafka.server.ReplicaFetcherThread)

from my understanding each topic is served by one or multiple Brokers - one is leader and the remaining brokers are followers.根据我的理解,每个主题都由一个或多个 Broker 提供服务——一个是领导者,其余的经纪人是追随者。

A producer needs to send new messages to the leader Broker which internally replicate the data to all followers.生产者需要向领导者代理发送新消息,后者在内部将数据复制到所有追随者。

I assume, that your producer client does not connect to the correct Broker, its connect to a follower instead of the leader, and this follower rejects your send request.我假设,你的生产者客户端没有连接到正确的 Broker,它连接到一个跟随者而不是领导者,并且这个跟随者拒绝你的发送请求。

so my question is - how to configure the producer configuration in order to avoid such these errors?所以我的问题是 - 如何配置生产者配置以避免此类错误?

Follower brokers fetch from the leader broker (the leader is not pushing to followers).追随者经纪人从领导者经纪人处获取(领导者不推送给追随者)。 Hence, it seems that a follower broker tries to fetch from the wrong (leader) broker.因此,似乎追随者经纪人试图从错误的(领导者)经纪人那里获取信息。 This can happen is the leader of a partition changed.发生这种情况的原因是分区的领导者发生了变化。 The corresponding follower broker should update its cluster metadata automatically to rediscover the new leader.相应的跟随者代理应自动更新其集群元数据以重新发现新的领导者。 If the error persists, it indicates that this follower broker has issues to update its metadata.如果错误仍然存​​在,则表明此跟随者代理在更新其元数据方面存在问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Kafka:此服务器不是该主题分区的领导者 - Kafka: This server is not the leader for that topic-partition Kafka - 此服务器不是该主题分区的领导者 - Kafka - This server is not the leader for that topic-partition kafka + 此服务器不是该主题分区的领导者 - kafka + This server is not the leader for that topic-partition Kafka 这个主题分区没有领导者,因为我们正在进行领导选举 - Kafka There is no leader for this topic-partition as we are in the middle of a leadership election 运行Kafka性能流量时出现错误“此服务器不是该主题分区的领导者” - Error “This server is not the leader for that topic-partition” while running Kafka performance traffic org.apache.kafka.common.errors.NotLeaderForPartitionException:此服务器不是该主题分区的领导者 - 继续出现 - org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition - keep appearing 发送到Kafka REST-Proxy的邮件被“此服务器不是该主题分区的领导者”错误拒绝 - Messages sent to Kafka REST-Proxy being rejected by “This server is not the leader for that topic-partition” error KAFKA 1.0-提取主题分区数据的未知错误 - KAFKA 1.0 - Unknown error fetching data for topic-partition org.apache.kafka.common.errors.UnknownTopicOrPartitionException:此服务器未托管此主题分区 - org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition 自动更改kafka主题分区领导者 - Automatic change kafka topic partition leader
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM