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

本文主要是介绍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即可。

这篇关于kafka出现WARN - org.apache.kafka.clients.NetworkClient$DefaultMetadataUpdater.handleCompletedMetadataR的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/381689

相关文章

SpringBoot整合Apache Flink的详细指南

《SpringBoot整合ApacheFlink的详细指南》这篇文章主要为大家详细介绍了SpringBoot整合ApacheFlink的详细过程,涵盖环境准备,依赖配置,代码实现及运行步骤,感兴趣的... 目录1. 背景与目标2. 环境准备2.1 开发工具2.2 技术版本3. 创建 Spring Boot

Linux中修改Apache HTTP Server(httpd)默认端口的完整指南

《Linux中修改ApacheHTTPServer(httpd)默认端口的完整指南》ApacheHTTPServer(简称httpd)是Linux系统中最常用的Web服务器之一,本文将详细介绍如何... 目录一、修改 httpd 默认端口的步骤1. 查找 httpd 配置文件路径2. 编辑配置文件3. 保存

Spring Boot 整合 Apache Flink 的详细过程

《SpringBoot整合ApacheFlink的详细过程》ApacheFlink是一个高性能的分布式流处理框架,而SpringBoot提供了快速构建企业级应用的能力,下面给大家介绍Spri... 目录Spring Boot 整合 Apache Flink 教程一、背景与目标二、环境准备三、创建项目 & 添

Apache 高级配置实战之从连接保持到日志分析的完整指南

《Apache高级配置实战之从连接保持到日志分析的完整指南》本文带你从连接保持优化开始,一路走到访问控制和日志管理,最后用AWStats来分析网站数据,对Apache配置日志分析相关知识感兴趣的朋友... 目录Apache 高级配置实战:从连接保持到日志分析的完整指南前言 一、Apache 连接保持 - 性

apache的commons-pool2原理与使用实践记录

《apache的commons-pool2原理与使用实践记录》ApacheCommonsPool2是一个高效的对象池化框架,通过复用昂贵资源(如数据库连接、线程、网络连接)优化系统性能,这篇文章主... 目录一、核心原理与组件二、使用步骤详解(以数据库连接池为例)三、高级配置与优化四、典型应用场景五、注意事

SpringBoot实现Kafka动态反序列化的完整代码

《SpringBoot实现Kafka动态反序列化的完整代码》在分布式系统中,Kafka作为高吞吐量的消息队列,常常需要处理来自不同主题(Topic)的异构数据,不同的业务场景可能要求对同一消费者组内的... 目录引言一、问题背景1.1 动态反序列化的需求1.2 常见问题二、动态反序列化的核心方案2.1 ht

解决tomcat启动时报Junit相关错误java.lang.ClassNotFoundException: org.junit.Test问题

《解决tomcat启动时报Junit相关错误java.lang.ClassNotFoundException:org.junit.Test问题》:本文主要介绍解决tomcat启动时报Junit相... 目录tomcat启动时报Junit相关错误Java.lang.ClassNotFoundException

解决Maven项目报错:failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0的问题

《解决Maven项目报错:failedtoexecutegoalorg.apache.maven.plugins:maven-compiler-plugin:3.13.0的问题》这篇文章主要介... 目录Maven项目报错:failed to execute goal org.apache.maven.pl

深入理解Apache Kafka(分布式流处理平台)

《深入理解ApacheKafka(分布式流处理平台)》ApacheKafka作为现代分布式系统中的核心中间件,为构建高吞吐量、低延迟的数据管道提供了强大支持,本文将深入探讨Kafka的核心概念、架构... 目录引言一、Apache Kafka概述1.1 什么是Kafka?1.2 Kafka的核心概念二、Ka

一文详解kafka开启kerberos认证的完整步骤

《一文详解kafka开启kerberos认证的完整步骤》这篇文章主要为大家详细介绍了kafka开启kerberos认证的完整步骤,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录一、kerberos安装部署二、准备机器三、Kerberos Server 安装1、配置krb5.con