c++ kafka 客户端rdkafka报Receive failed: Disconnected问题原因以及解决方法
%3|1538976114.812|FAIL|rdkafka#producer-1| [thrd:kafka-server:9092/bootstrap]: kafka-server:9092/0: Receive failed: Disconnected
%3|1538976114.812|ERROR|rdkafka#producer-1| [thrd:kafka-server:9092/bootstrap]: kafka-server:9092/0: Receive failed: Disconnected
%3|1538976114.812|ERROR|rdkafka#producer-1| [thrd:kafka-server:9092/bootstrap]: 1/1 brokers are down
原因:
Why am I seeing Receive failed: Disconnected
?
If the remote peer, typically the broker (but could also be an active TCP gateway of some kind), closes the connection you'll see a log message like this:
%3|1500588440.537|FAIL|rdkafka#producer-1| 10.255.84.150:9092/1: Receive failed: Disconnected
There are a number of possible reasons, in order of how common they are:
- Broker's idle connection reaper closes the connection due to inactivity. This is controlled by the broker configuration property
connections.max.idle.ms
and defaults to 10 minutes. This is by far the most common reason for spontaneous disconnects. - The client sent an unsupported protocol request; see Broker version compatibility. This is considered a configuration error on the client. The broker should log an exception explaining why the connection was closed, see the broker logs.
- The client sent a malformed protocol request; this is an indication of a bug in the client. The broker should log an exception explaining why the connection was closed, see the broker logs.
- The broker is in an invalid state. The broker should log an exception explaining why the connection was closed, see the broker logs.
- TCP gateway/load-balancer/firewall session timeout. Try enabling TCP keep-alives on the client by setting
socket.keepalive.enable=true
.
Since a TCP close can't signal why the remote peer closed the connection there is no way for the client to know what went wrong. If the disconnect logs are getting annoying and the admin deems they are caused by the idle connection reaper, the log.connection.close
client configuration property can be set to false
to silence all spontaneous disconnect logs.
NOTE: Whenever a connection is closed for whatever reason, librdkafka will automatically reconnect after reconnect.backoff.jitter.ms
(default 500ms).
简单的说,其中之一是服务器会kill掉10分钟空闲的连接,librdkafka会在连接断开后500毫秒内重连。所以,根本解决方法就是没事每分钟发个心跳信息。
参考:https://github.com/edenhill/librdkafka/wiki/FAQ#why-am-i-seeing-receive-failed-disconnected
c++ kafka 客户端rdkafka报Receive failed: Disconnected问题原因以及解决方法的更多相关文章
- [Kafka] |FAIL|rdkafka#producer-1 : Receive failed: Disconnected
Why am I seeing Receive failed: Disconnected? 1. broker 的空闲连接回收器关闭不活跃连接. 由 broker 的配置属性 connections. ...
- 转:Validation of viewstate MAC failed异常的原因及解决方法
ViewState是一种机制,ASP.NET 使用这种机制来跟踪服务器控件状态值,否则这些值将不作为 HTTP 窗体的一部分而回传.也就是说在页面刷新或者回传的时候控件的值将被清空,我们在aspx.c ...
- IDEA报compilation failed:internal java compiler error解决方法
java complier 设置的问题 ,项目中有的配jdk1.6,有的配jdk1.7,版本不一样,导致这样的错误,提示这样的报错时,从file-Settings进入
- 启动elasticsearch报错的几种原因及解决方法
ERROR: [1] bootstrap checks failed [1]: max virtual memory areas vm.max_map_count [65530] is too low ...
- linux下svn客户端报错Cannot negotiate authentication mechanism的解决方法
svn客户端报错Cannot negotiate authentication mechanism的解决方法: 问题出现的原因之一: 因为SVN服务器配置了saslauthd服务用来实现与ldap的对 ...
- 使用AFNetworking 2.0 请求数据时出现错误 Request failed: unacceptable content-type: text/html 解决方法
使用AFNetworking 2.0 请求数据时出现错误 Request failed: unacceptable content-type: text/html 解决方法 添加一行 manager. ...
- Failed dependencies: 检查依赖性错误 解决方法
centOs下: error: Failed dependencies: 检查依赖性错误 解决方法 刚才安装avast的linux版,结果出现了: [root@localhost /]# rpm -i ...
- 安装PHP过程中,make步骤报错:(集合网络上各种解决方法)
安装PHP过程中,make步骤报错:(集合网络上各种解决方法) (1)-liconv -o sapi/fpm/php-fpm /usr/bin/ld: cannot find -liconv coll ...
- 转:Loadrunner报错“Too many local variablesAction.c”解决方法
问题描述,在Action.c里定义数组时如果数组长度过长,如char a[1024*1024]运行时即会报错: 问题原因及解决方法如下: 1. VuGen对于局部变量可以分配的最大内存为64K,如果想 ...
随机推荐
- [Java] Header checkBox in Jtable
The reference is from here. 在Jtable里面我们可能会有checkbox, 而有时候我们有很多checkbox需要同时check或者同时uncheck的时候, 如果有一个 ...
- [LeetCode] 596. Classes More Than 5 Students_Easy tag:SQL
There is a table courses with columns: student and class Please list out all classes which have more ...
- Groovy动态解析
A:前面需要说些什么吗? B:不需要吗? A:需要吗? 解析方式一:通过指定的paths来初始化GroovyScriptEngine //通过指定的paths来初始化GroovyScriptEngin ...
- Amber TUTORIAL B1: Simulating a DNA polyA-polyT Decamer
Section 1: Introduction The input files required (using their default file names): prmtop - a file c ...
- cocos2d JS-(JavaScript) 函数类型相互转换(字符串、整形、浮点形、布尔值)
工作忙好些天了,近段时间抽点空分享一下自己学习JS的一点笔记心得做点记录,大神勿喷,谢谢! 1.字符串的转化 var found = false; console.log(found.toString ...
- 函数式编程语言(functional language)
内容根据百度词条整理! 转载请声明来源:https://baike.baidu.com/item/%E5%87%BD%E6%95%B0%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8 ...
- C++实现 safaBase64编码跟nonSafeBase64编码的转换
默认Base64编码的字符串,用于网络传输是不安全的,因为Base64编码使用的标准字典含有“+”,“/”. 规则如下: //nonSafeBase64 到 safeBase64'+' ------ ...
- 参考termux中包管理命令的伪装修改的arch版包管理命令
#!/bin/bash set -e -u show_help() { echo "This help message is useless, please read the content ...
- [13]Windows 内核情景分析 --- 网络通信
典型的基于tcpip协议套接字方式的网络通信模块层次: 应用程序 socket api WS2_32.dll socket irp Afd.sys tdi irp Tcpip.sys 回调函数接口 各 ...
- html5 手机端 通讯录 touch 效果
不说那么多直接上代码. <html> <head> <meta http-equiv="Content-Type" content="tex ...