当前位置: 首页 > article >正文

连接kafka消息队列报org.apache.kafka.clients.NetworkClient异常

启动kafka后,连接kafka消息队列报org.apache.kafka.clients.NetworkClient异常

could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

检查kafka运行日志,报The broker is trying to join the wrong cluster异常

[2024-11-06 16:31:11,219] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID QAy4XKSVSYWyIWRKCl3BBQ doesn't match stored clusterId Some(AMdXxjsGTe-ebuBwX0E57g) in meta.properties. The broker is trying to join the wrong cluster. Configured zookeeper.connect may be wrong.
	at kafka.server.KafkaServer.startup(KafkaServer.scala:252)
	at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
	at kafka.Kafka$.main(Kafka.scala:82)
	at kafka.Kafka.main(Kafka.scala)
[2024-11-06 16:31:11,221] INFO shutting down (kafka.server.KafkaServer)
[2024-11-06 16:31:11,223] INFO [feature-zk-node-event-process-thread]: Shutting down (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2024-11-06 16:31:11,224] INFO [feature-zk-node-event-process-thread]: Shutdown completed (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2024-11-06 16:31:11,224] INFO [feature-zk-node-event-process-thread]: Stopped (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2024-11-06 16:31:11,225] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2024-11-06 16:31:11,329] INFO Session: 0x110085d708f0001 closed (org.apache.zookeeper.ZooKeeper)
[2024-11-06 16:31:11,329] INFO EventThread shut down for session: 0x110085d708f0001 (org.apache.zookeeper.ClientCnxn)
[2024-11-06 16:31:11,331] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2024-11-06 16:31:11,335] INFO App info kafka.server for 0 unregistered (org.apache.kafka.common.utils.AppInfoParser)
[2024-11-06 16:31:11,336] INFO shut down completed (kafka.server.KafkaServer)
[2024-11-06 16:31:11,337] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2024-11-06 16:31:11,337] INFO shutting down (kafka.server.KafkaServer)

修改kafka日志目录的meta.properties文件的cluster.id值

cluster.id=AMdXxjsGTe-ebuBwX0E57g
version=0
broker.id=0

最后再重启kafka,连接恢复正常


http://www.kler.cn/a/385051.html

相关文章:

  • Python小白学习教程从入门到入坑------第二十八课 文件基础操作文件读写(语法进阶)
  • AOSP沙盒android 11
  • c++程序设计速学4字符串处理
  • A019基于SpringBoot的校园闲置物品交易系统
  • 场景解决方案丨迎战电商大促,企业管理跟踪驾驶舱助力中小企业打赢决胜之战
  • Rust闭包(能够捕获周围作用域变量的匿名函数,广泛应用于迭代、过滤和映射)闭包变量三种捕获方式:通过引用(不可变引用)、通过可变引用和通过值(取得所有权)
  • 数据库管理-第258期 23ai:Oracle Data Redaction(20241104)
  • Android Kotlin Flow 冷流 热流
  • C++中,如何找到一个vector中最大的元素
  • 【HarmonyOS】键盘遮挡输入框UI布局处理
  • Flux comfyui 部署笔记,整合包下载
  • MySQL常用的关键字(详细)
  • MATLAB 在数组的元素后面使用百分号 `%` 添加注释时会将其误认为是行分隔符,导致数组维度不一致
  • LangChain实战分享
  • 【Linux】进程信号全攻略(二)
  • 什么是 AWS PrivateLink
  • 深入理解Python设计模式:工厂模式实践与应用
  • SpringCloud Sentinel 服务治理详解
  • 群控系统服务端开发模式-应用开发-系统配置开发
  • netstat中sendq/recvq用于排查发送端发送数据的问题
  • js中怎么把excel和pdf文件转换成图片打包下载
  • 云上拼团GO指南——腾讯云博客部署案例,双11欢乐GO
  • 推导将点映射到平面坐标系的计算公式
  • 金媒婚恋相亲系统10.4择爱开源旗舰版支持微信小程和抖音小程序上架
  • 鸿蒙系统与python
  • 【WebRTC】视频采集模块流程的简单分析