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

embedded/2024/11/13 15:27:53/

启动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.ppmy.cn/embedded/136664.html

相关文章

2024 第五次周赛

A: 直接遍历即可 #include<bits/stdc.h> using namespace std;typedef long long ll; typedef pair<ll, ll>PII; const int N 2e6 10; const int MOD 998244353; const int INF 0X3F3F3F3F;int n, m; int main() {cin >> n;int cnt 0;for(int i 0; i …

24-11-9-读书笔记(三十二)-《契诃夫文集》(六)上([俄] 契诃夫 [译] 汝龙)药品是甜的,真理是美的,咖啡是苦的,生活是什么啊?

文章目录 《契诃夫文集》&#xff08;六&#xff09;上&#xff08;[俄] 契诃夫 [译] 汝龙&#xff09;药品是甜的&#xff0c;真理是美的&#xff0c;咖啡是苦的&#xff0c;生活是什么啊&#xff1f;目录阅读笔记1. 新年的苦难2. 香槟3. 乞丐4. 仇敌5.薇罗琪卡6.在家里7. 太早…

K8s使用nfs

改动点 ip和路径改为自己的 --- apiVersion: v1 kind: ServiceAccount metadata:name: nfs-client-provisioner# replace with namespace where provisioner is deployednamespace: nfs-client --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata:nam…

PHP字符串变量

php字符串变量&#xff0c;也可以理解为一个存放文本的一样东西。 <?php$text"Hello world!"; //输出Hello world&#xff01; echo $text;?> 当赋一个文本值给变量时&#xff0c;请记得给文本值加上单引号或者双引号。 1、下面再来看看字符串的应用场景 …

批量清除Word Excel PPT文件打开密码

工作中经常要处理很多带密码的Excel文件&#xff0c;如果一个一个手动删除密码&#xff0c;那工作量就很大了。 网上找了很多方法&#xff0c;都没有找到一个好用的能批量删除密码的软件。 下载地址&#xff1a;https://pan.quark.cn/s/e3bffeec5458 于是就写了一个批量删除E…

python画图|text()和dict()初探

【1】引言 在进行hist()函数的学习进程中&#xff0c;了解到了subplot_mosaic()函数&#xff0c;在学习subplot_mosaic()函数的时候&#xff0c;又发现了text()和dict()函数。 经探究&#xff0c;text()和dict()函数有很多一起使用的场景&#xff0c;为此&#xff0c;我们就一…

Qt——常用控件

前言&#xff1a;本篇文章&#xff0c;将分享Qt中常用的&#xff0c;具有代表性的一些控件。 一.按钮类控件 在前边的文章中我们也多次分享过PushButton按钮&#xff0c;但Qt中并非只提供这一种按钮。 在Qt中&#xff0c;QPushButton并非直接继承自QWidget&#xff0c;QAbstr…

高性能分布式缓存Redis-分布式锁与布隆过滤器

一、分布式锁 我们先来看一下本地锁 在并发编程中&#xff0c;我们通过锁&#xff0c;来避免由于竞争而造成的数据不一致问题。通常&#xff0c;我们以 synchronized 、Lock 来使用它&#xff08;单机情况&#xff09; 来看这段代码 Autowired RedisTemplate<String,Str…