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

相关文章

Java中Springboot集成Kafka实现消息发送和接收功能

《Java中Springboot集成Kafka实现消息发送和接收功能》Kafka是一个高吞吐量的分布式发布-订阅消息系统,主要用于处理大规模数据流,它由生产者、消费者、主题、分区和代理等组件构成,Ka... 目录一、Kafka 简介二、Kafka 功能三、POM依赖四、配置文件五、生产者六、消费者一、Kaf

SpringBoot使用Apache Tika检测敏感信息

《SpringBoot使用ApacheTika检测敏感信息》ApacheTika是一个功能强大的内容分析工具,它能够从多种文件格式中提取文本、元数据以及其他结构化信息,下面我们来看看如何使用Ap... 目录Tika 主要特性1. 多格式支持2. 自动文件类型检测3. 文本和元数据提取4. 支持 OCR(光学

Kafka拦截器的神奇操作方法

《Kafka拦截器的神奇操作方法》Kafka拦截器是一种强大的机制,用于在消息发送和接收过程中插入自定义逻辑,它们可以用于消息定制、日志记录、监控、业务逻辑集成、性能统计和异常处理等,本文介绍Kafk... 目录前言拦截器的基本概念Kafka 拦截器的定义和基本原理:拦截器是 Kafka 消息传递的不可或缺

Apache Tomcat服务器版本号隐藏的几种方法

《ApacheTomcat服务器版本号隐藏的几种方法》本文主要介绍了ApacheTomcat服务器版本号隐藏的几种方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需... 目录1. 隐藏HTTP响应头中的Server信息编辑 server.XML 文件2. 修China编程改错误

如何在一台服务器上使用docker运行kafka集群

《如何在一台服务器上使用docker运行kafka集群》文章详细介绍了如何在一台服务器上使用Docker运行Kafka集群,包括拉取镜像、创建网络、启动Kafka容器、检查运行状态、编写启动和关闭脚本... 目录1.拉取镜像2.创建集群之间通信的网络3.将zookeeper加入到网络中4.启动kafka集群

SpringBoot使用Apache POI库读取Excel文件的操作详解

《SpringBoot使用ApachePOI库读取Excel文件的操作详解》在日常开发中,我们经常需要处理Excel文件中的数据,无论是从数据库导入数据、处理数据报表,还是批量生成数据,都可能会遇到... 目录项目背景依赖导入读取Excel模板的实现代码实现代码解析ExcelDemoInfoDTO 数据传输

IDEA中的Kafka管理神器详解

《IDEA中的Kafka管理神器详解》这款基于IDEA插件实现的Kafka管理工具,能够在本地IDE环境中直接运行,简化了设置流程,为开发者提供了更加紧密集成、高效且直观的Kafka操作体验... 目录免安装:IDEA中的Kafka管理神器!简介安装必要的插件创建 Kafka 连接第一步:创建连接第二步:选

搭建Kafka+zookeeper集群调度

前言 硬件环境 172.18.0.5        kafkazk1        Kafka+zookeeper                Kafka Broker集群 172.18.0.6        kafkazk2        Kafka+zookeeper                Kafka Broker集群 172.18.0.7        kafkazk3

org.hibernate.hql.ast.QuerySyntaxException:is not mapped 异常总结

org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [select u from User u where u.userName=:userName and u.password=:password] 上面的异常的抛出主要有几个方面:1、最容易想到的,就是你的from是实体类而不是表名,这个应该大家都知道,注意

Caused by: org.hibernate.MappingException: Could not determine type for: org.cgh.ssh.pojo.GoodsType,

MappingException:这个主要是类映射上的异常,Could not determine type for: org.cgh.ssh.pojo.GoodsType,这句话表示GoodsType这个类没有被映射到