kafka出现WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataR

1、当kafka接收数据时会出现如下警告:

2020-04-27 12:27:39,258 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:39,420 (PollableSourceRunner-KafkaSource-s1) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:39,922 (PollableSourceRunner-KafkaSource-s1) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:40,623 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:40,825 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:41,026 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:41,228 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:41,429 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:41,631 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:41,833 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:42,034 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:42,235 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]
2020-04-27 12:27:42,437 (kafka-coordinator-heartbeat-thread | flume) [WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataResponse(NetworkClient.java:961)] [Consumer clientId=consumer-1, groupId=flume] 7 partitions have leader brokers without a matching listener, including [history_topic_20200420-0, history_topic_20200420-5, history_topic_20200420-8, history_topic_20200420-2, history_topic_20200420-9, history_topic_20200420-6, history_topic_20200420-3]

如下图所示:

2、出现此问题是kafka的server.properties没有配置listeners = PLAINTEXT://your.host.name:9092。在配置集群的时候,必须设置,不然以后的操作会报找不到leader的错误 ,集群中的每个节点都必须配置,如下图所示:

3、然后重启kafka即可。

  • 4
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值