You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kafka Connect Standalone模式下出现NOT_LEADER_OR_FOLLOWER错误的排查求助

Kafka Connect Standalone模式下出现NOT_LEADER_OR_FOLLOWER错误的排查求助

各位大佬好,最近在使用Kafka Connect Standalone模式运行MongoDB源连接器时碰到了棘手的问题,想请教下大家该怎么排查解决。

我执行的启动命令是:

bin/connect-standalone.sh config/connect-standalone.properties mongodb-source-connector.properties

在修改数据库配置后,启动连接器就开始不断报以下WARN错误:

[2024-06-30 03:18:16,919] WARN [mongo-source|task-0] [Producer clientId=connector-producer-mongo-source-0] Got error produce response with correlation id 2479 on topic-partition sepas_iums.ehr_extract-0, retrying (2147482409 attempts left). Error: NOT_LEADER_OR_FOLLOWER (org.apache.kafka.clients.producer.internals.Sender:660)
[2024-06-30 03:18:16,919] WARN [mongo-source|task-0] [Producer clientId=connector-producer-mongo-source-0] Received invalid metadata error in produce request on partition sepas_iums.ehr_extract-0 due to org.apache.kafka.common.errors.NotLeaderOrFollowerException: For requests intended only for the leader, this error indicates that the broker is not the current leader. For requests intended for any replica, this error indicates that t...

补充下背景:之前连接器运行都是正常的,这次是修改了MongoDB的数据源配置后才出现的问题。目前我已经检查过Kafka集群的Broker状态,看起来都是正常运行的,但还是不断报这个错误。

有没有大佬遇到过类似情况?能不能指点下我该从哪些方向去排查定位问题?

备注:内容来源于stack exchange,提问作者md.119

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 12:39:38