I/O中的Kafka错误java.io.EOFException:null [英] Kafka Error in I/O java.io.EOFException: null

查看:577
本文介绍了I/O中的Kafka错误java.io.EOFException:null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Kafka 0.8.2.0(Scala 2.10).在我的日志文件中,我间歇性地看到以下消息.这似乎是一个连接问题,但是我两个都在本地主机上运行.

I am using Kafka 0.8.2.0 (Scala 2.10). In my log files, I see the following message intermittently. This seems like a connectivity issue, but I'm running both in my localhost.

这是否是无害的警告消息,还是我应该做些避免的事情?

Is this a harmless warning message or should I do something to avoid it?

2015-10-30 14:12:38.015  WARN 4251 --- [ad | producer-1] [                                    ] o.apache.kafka.common.network.Selector   : Error in I/O with localhost/127.0.0.1

java.io.EOFException: null
    at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:62)
    at org.apache.kafka.common.network.Selector.poll(Selector.java:248)
    at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:192)
    at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:191)
    at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:122)
    at java.lang.Thread.run(Thread.java:745)

推荐答案

晚些时候参加聚会,但可能会对某人有所帮助-它将对我有所帮助.

This is a bit later to the party, but may help someone - it would have helped me.

您看到的是,由于超过一定的闲置时间后,Kafka代理正在被动关闭连接.它是由以下代理属性定义的:connections.max.idle.ms-默认值为10分钟.

What you're seeing occurs because the Kafka broker is passively closing the connection after a certain period of idleness is exceeded. It's defined by this broker property: connections.max.idle.ms - the default is 10 minutes.

显然,0.8.x中的kafka客户端不支持该设置,只是将空闲连接保持打开状态.您会在日志中看到该警告,但它不会对您的应用造成不良影响.

Apparently the kafka client in 0.8.x doesn't honour that setting and just leaves idle connections open. You'll see the warning in your logs but it should have no bad effect on your application.

此处有更多详细信息: https://issues.apache.org/jira/browse/KAFKA-3205

More details here: https://issues.apache.org/jira/browse/KAFKA-3205

此处记录了代理配置: https://kafka.apache.org/090/文档/#configuration

The broker config is documented here: https://kafka.apache.org/090/documentation/#configuration

在该表中,您将找到:

Name: connections.max.idle.ms
Description: Idle connections timeout: the server socket processor threads close the connections that idle more than this
Type:long
Default: 600000

希望有帮助.

这篇关于I/O中的Kafka错误java.io.EOFException:null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆