首页 > 其他分享 >【问题解决】Kafka报错 Bootstrap broker x.x.x.x:9092 (id: -1 rack: null) disconnected

【问题解决】Kafka报错 Bootstrap broker x.x.x.x:9092 (id: -1 rack: null) disconnected

时间:2023-05-09 18:35:42浏览次数:44  
标签:disconnected Bootstrap kafka ssl 报错 ms org sasl null

问题复现

近日针对某一客户需求开发了一个需要使用Kafka的功能,功能是什么暂且不论,在本地虚机的Kafka连接一切正常遂放到测试服务器上验证功能,以下是监听topic成功和警告报错:

2023-05-09 10:22:23 [localhost-startStop-1] INFO  org.apache.kafka.clients.consumer.ConsumerConfig - ConsumerConfig values: 
	allow.auto.create.topics = true
	auto.commit.interval.ms = 5000
	auto.offset.reset = earliest
	bootstrap.servers = [10.39.48.113:9092]
	check.crcs = true
	client.dns.lookup = use_all_dns_ips
	client.id = consumer-enn-jiuqi-1
	client.rack = 
	connections.max.idle.ms = 540000
	default.api.timeout.ms = 60000
	enable.auto.commit = false
	exclude.internal.topics = true
	fetch.max.bytes = 52428800
	fetch.max.wait.ms = 500
	fetch.min.bytes = 1
	group.id = enn-jiuqi
	group.instance.id = null
	heartbeat.interval.ms = 3000
	interceptor.classes = []
	internal.leave.group.on.close = true
	internal.throw.on.fetch.stable.offset.unsupported = false
	isolation.level = read_uncommitted
	key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer
	max.partition.fetch.bytes = 1048576
	max.poll.interval.ms = 300000
	max.poll.records = 500
	metadata.max.age.ms = 300000
	metric.reporters = []
	metrics.num.samples = 2
	metrics.recording.level = INFO
	metrics.sample.window.ms = 30000
	partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor]
	receive.buffer.bytes = 65536
	reconnect.backoff.max.ms = 1000
	reconnect.backoff.ms = 50
	request.timeout.ms = 30000
	retry.backoff.ms = 100
	sasl.client.callback.handler.class = null
	sasl.jaas.config = null
	sasl.kerberos.kinit.cmd = /usr/bin/kinit
	sasl.kerberos.min.time.before.relogin = 60000
	sasl.kerberos.service.name = null
	sasl.kerberos.ticket.renew.jitter = 0.05
	sasl.kerberos.ticket.renew.window.factor = 0.8
	sasl.login.callback.handler.class = null
	sasl.login.class = null
	sasl.login.refresh.buffer.seconds = 300
	sasl.login.refresh.min.period.seconds = 60
	sasl.login.refresh.window.factor = 0.8
	sasl.login.refresh.window.jitter = 0.05
	sasl.mechanism = GSSAPI
	security.protocol = PLAINTEXT
	security.providers = null
	send.buffer.bytes = 131072
	session.timeout.ms = 45000
	socket.connection.setup.timeout.max.ms = 30000
	socket.connection.setup.timeout.ms = 10000
	ssl.cipher.suites = null
	ssl.enabled.protocols = [TLSv1.2]
	ssl.endpoint.identification.algorithm = https
	ssl.engine.factory.class = null
	ssl.key.password = null
	ssl.keymanager.algorithm = SunX509
	ssl.keystore.certificate.chain = null
	ssl.keystore.key = null
	ssl.keystore.location = null
	ssl.keystore.password = null
	ssl.keystore.type = JKS
	ssl.protocol = TLSv1.2
	ssl.provider = null
	ssl.secure.random.implementation = null
	ssl.trustmanager.algorithm = PKIX
	ssl.truststore.certificates = null
	ssl.truststore.location = null
	ssl.truststore.password = null
	ssl.truststore.type = JKS
	value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer

2023-05-09 10:22:23 [localhost-startStop-1] INFO  org.apache.kafka.common.utils.AppInfoParser - Kafka version: 3.0.1
2023-05-09 10:22:23 [localhost-startStop-1] INFO  org.apache.kafka.common.utils.AppInfoParser - Kafka commitId: 8e30984f43e64d8b
2023-05-09 10:22:23 [localhost-startStop-1] INFO  org.apache.kafka.common.utils.AppInfoParser - Kafka startTimeMs: 1683598943212
2023-05-09 10:22:23 [localhost-startStop-1] INFO  org.apache.kafka.clients.consumer.KafkaConsumer - [Consumer clientId=consumer-test-1, groupId=test-group] Subscribed to topic(s): sync_user


2023-05-09 10:23:50 [org.springframework.kafka.KafkaListenerEndpointContainer#0-0-C-1] WARN  org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-test-1, groupId=test-group] Bootstrap broker 10.39.48.113:9092 (id: -1 rack: null) disconnected

可以注意到日志最后有1条警告,其实我只放了一条,这个信息在日志里多滴很。

分析问题

客户对接方发送了一条消息问我们消费到没,我一查日志,满屏是WARN提示 Bootstrap broker 10.39.48.113:9092 (id: -1 rack: null) disconnected,真是小刀拉屁股——开了眼。

打开Google Bard机器人问问这是啥原因导致的:

可能是网络原因导致的,查了下其他博客说也有可能是开启了某种认证机制导致的。

通过ping发现能ping通broker,但是通过telnet却无法连接了,也就是说:这台测试服务器与kafka broker间的网络被限制为可以ping但不能访问broker的端口号!

解决办法

查看了下测试服务器的iptables链没发现问题,自己通过tcpdump抓包用wireshark分析发现只有SYN包没响应,找到客户网络工程师定位到是公司的网络策略限制了。至此问题解决,希望能给读者一个思路。

标签:disconnected,Bootstrap,kafka,ssl,报错,ms,org,sasl,null
From: https://www.cnblogs.com/hellxz/p/17385914.html

相关文章

  • 使用富文本编辑,内容有<img src=xxx//xx//xx>报错:JSON parse error: Unexpected charac
     前端使用富文本标签,填写内容里面有图片地址或一些特殊字符,保存时导致报错后台json不能解析内容到实体类相应的字段中去报错代码:JSONparseerror:Unexpectedcharacter('\'(code92)):...解决办法:1、有的说在配置xss过滤时开放,保存的请求接口地址。————————......
  • 运行pip报错:Fatal error in launcher: Unable to create process using '"'
    在新环境上安装python的时候又再次遇到了这个情况,这次留意了一下,发现原来的文章有错误的地方,所以来更新一下,应该能解决大部分的问题。环境是win8,原来只安装了python2.7。后来因为要用到python3,为了让两者共存,降python3的运行文件改成了python3.exe.问题就此而来,这时候运行python......
  • IIS启动应用程序池报错"服务无法在此时接受控制信息"
    https://www.cnblogs.com/yaotome/p/9540300.html网站突然打不开,重新生成程序不行,重新打开vs也不行,重启了网站还是不行,重启应用池就发现问题了。可以关,启不来了,也删不掉,提示“服务无法在此时接受控制信息”。用下面方法解决了。用管理员方式打开命令行输入命令netsh winsock ......
  • 导入PIL时报错
    在导入PIL时,报以下错误: 查找原因参考博客 https://blog.csdn.net/yushuangping/article/details/82963839,按照wheel后,安装PIL时,报如下的错误。 查找说是python版本与wheel文件版本不同,确认本机python版本 ......
  • centos(linux):yum报错:removing mirrorlist with no valid mirrors的处理(centos 6.1
    一,报错[root@osc~]#yuminstall-ypython3-pipLoadedplugins:fastestmirror,securitySettingupInstallProcessDeterminingfastestmirrorsYumRepoError:AllmirrorURLsarenotusingftp,http[s]orfile.Eg.Invalidrelease/repo/archcombination/rem......
  • 解决银河麒麟V10系统Failed to download metadata for repo ‘ks10-adv-os‘报错问题
    原文链接:https://blog.csdn.net/m0_53967669/article/details/127283289在使用银河麒麟系统时会时不时的安装程序,yum命令是最方便快捷的命令,但是在使用的过程中出现了Failedtodownloadmetadataforrepo'ks10-adv-os’这样的报错如何解决呢?经过了多次的尝试,小编终于成功解决,......
  • Spring注解开发报错
    今天学习Spring注解开发时,又报错了报错代码Exceptioninthread“main”org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:Line6inXMLdocumentfromclasspathresource[1.xml]isinvalid;nestedexceptionisorg.xml.sax.SAXParseExceptio......
  • delphi cannot make a visible window modal报错的解决过程
    抛出问题: 排除过程:1.在TFrmChangePW窗口的create事件里打断点,结果发现,根本没停顿,所以判断问题不在TFrmChangePW窗体里,而是showmodal这语句里出了问题,点中断,跳到抛出错误的地方:2.if里的四个条件,检查了第一个,第二个和第四个都是没问题的,第三个(fsModalinFFormS......
  • ZLMediaKit报错,程序启动失败,请修改配置文件中端口号后重试!
    报错信息如下:2023-05-0910:33:22.819W[MediaServer][13423-MediaServer]sockutil.cpp:421bind_sock6|Bindsocketfailed:addressalreadyinuse2023-05-0910:33:22.819W[MediaServer][13423-MediaServer]main.cpp:366start_main|端口占用或无权限:Listenon:......
  • HBuilderX启动微信开发者工具报错[error] Error: Fail to open IDE
    报错提示如下: 解决方法:1.使用自己的账号登录。2.在微信开发者平台上申请appid并更改项目中的appid。3.删除项目中微信小程序的appid,这样就能在HBuilderX中启动游客身份的微信开发者工具。  检查其他步骤是否正确:1.打开微信开发者工具,在安全选项里开启服务端口......