11:57:24 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=jiatian_api] 3 partitions have leader……
错误如下:
11:57:24 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] 3 partitions have leader brokers without a matching listener, including [test_topic_order-0, test_topic_goods-0, test_topic_refund-0]
11:57:24 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] 3 partitions have leader brokers without a matching listener, including [test_topic_order-0, test_topic_goods-0, test_topic_refund-0]
11:57:25 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] 3 partitions have leader brokers without a matching listener, including [test_topic_order-0, test_topic_goods-0, test_topic_refund-0]
用tail命令查看会发现日志在不停的刷上面内容,开始排查问题,最后定位在配置文件server.properties里面,通过网上一些文章,尝试了一下
第一个:

把192.168.2.9改成localhost
试了之后,依然报错:
11:57:00 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] Connection to node 0 could not be established. Broker may not be available.
11:57:01 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] Connection to node 0 could not be established. Broker may not be available.
11:57:02 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] Connection to node 0 could not be established. Broker may not be available.
11:57:04 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] Connection to node 0 could not be established. Broker may not be available.
11:57:05 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=test_api] Connection to node 0 could not be established. Broker may not be available.
会发现报错改变了,看来这么改不对,回头想了下,首先排除ip和端口问题,然后想到会不会是参数哪里有问题,于是
|
参数 |
默认值 |
描述 |
|
broker.id |
-1 |
每一个boker都有一个唯一的id作为它们的名字。当该服务器的IP地址发生改变时,broker.id没有变化,则不会影响consumers的消息情况 |
|
num.network.threads |
3 |
broker处理消息的最大线程数,一般情况下数量为cpu核数 |
|
num.io.threads |
8 |
处理IO的线程数 |
|
num.partitions |
1 |
默认分区数 |
发现参数也没什么问题,接着往下看配置文件,看了下zookeeper连接,通过ps和netstat命令查到本机上有一个单台和一个由三台组成的zookeeper集群

更改了一下zookeeper,发现日志刷新错误变了,发现需要重启服务,然后重新启动后日志恢复正常
11:57:24 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN o.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-2, groupId=jiatian_api] 3 partitions have leader……的更多相关文章
- Unsupported major.minor version 52.0 (unable to load class org.apache.kafka.clients.producer.Produce异常解决方法
在控制台输入java -version,查看自己的版本是多少,我的查出来是1.8的.随后将服务器上的改为1.8的就可以了.
- _00017 Kafka的体系结构介绍以及Kafka入门案例(0基础案例+Java API的使用)
博文作者:妳那伊抹微笑 itdog8 地址链接 : http://www.itdog8.com(个人链接) 博客地址:http://blog.csdn.net/u012185296 博文标题:_000 ...
- 实践部署与使用apache kafka框架技术博文资料汇总
前一篇Kafka框架设计来自英文原文(Kafka Architecture Design)的翻译及整理文章,非常有借鉴性,本文是从一个企业使用Kafka框架的角度来记录及整理的Kafka框架的技术资料 ...
- Spring for Apache Kafka
官方文档详见:http://docs.spring.io/spring-kafka/docs/1.0.2.RELEASE/reference/htmlsingle/ Authors Gary Russ ...
- 【Apache Kafka】二、Kafka安装及简单示例
(一)Apache Kafka安装 1.安装环境与前提条件 安装环境:Ubuntu16.04 前提条件: ubuntu系统下安装好jdk 1.8以上版本,正确配置环境变量 ubuntu系统下安 ...
- Apache Kafka Connect - 2019完整指南
今天,我们将讨论Apache Kafka Connect.此Kafka Connect文章包含有关Kafka Connector类型的信息,Kafka Connect的功能和限制.此外,我们将了解Ka ...
- Apache Kafka Consumer 消费者集
1.目标 在我们的上一篇文章中,我们讨论了Kafka Producer.今天,我们将讨论Kafka Consumer.首先,我们将看到什么是Kafka Consumer和Kafka Consumer的 ...
- Apache Kafka教程
1.卡夫卡教程 今天,我们正在使用Apache Kafka Tutorial开始我们的新旅程.在这个Kafka教程中,我们将看到什么是Kafka,Apache Kafka历史以及Kafka的原因.此外 ...
- 【转】apache kafka技术分享系列(目录索引)
转自: http://blog.csdn.net/lizhitao/article/details/39499283 估计大神会不定期更新,所以还是访问这个链接看最新的目录list比较好 apa ...
随机推荐
- 石家庄地铁系统开发(java web版)(二)
两种方法: 一,自己写数据库,自己写算法实现 二,调用已有软件的API(百度,高德)
- ueditor 回显html样式会直接出来,无效
百度了好久,后面发现可以直接这样
- sqlplus命令行登录oracle数据库的N种方法盘点
欢迎访问我的个人博客IT废柴,本文永久链接移至:sqlplus命令行登录oracle数据库的N种方法盘点 sqlplus有几种登陆方式Oracle数据库, 比如: 1.以操作系统权限认证的oracle ...
- springdata 动态查询之分页
- HDU1754-ZKW线段树
单点更新,区间最值 HDU 1754 // // Created by helica on 2018/3/18. // //zkw线段树 单点修改 区间求最值 //HDU 1754 #include ...
- Linux系统网络编程中TCP通讯socket--send导致进程被关闭
https://blog.csdn.net/dsanmux/article/details/52083403 https://blog.csdn.net/u011425939/article/deta ...
- xgboost-Python&R
sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...
- Neo4j使用
一.删除图 在开发过程中,很多时候需要快(简)速(单)清(粗)除(暴)Neo4j中存在的海量数据节点和关系数据 在这种情况下,delete和detach从性能上都已力不从心.Neo4j官方推荐清库方法 ...
- js 时间格式化 兼容safari 苹果手机
export function formatTime (fmt, date) { date = new Date(date + '+08:00') // 兼容safari var o = { 'M+' ...
- VMware 安装虚拟机系统
Ø 简介 本文主要介绍使用 VMware 安装虚拟机系统. 1. 创建虚拟机 1) 打开VMware,创建新虚拟机 2) 选择需要安装系统的iso镜像文件 3) 选择需要安装的Win ...