kafka_2.12-0.10.2.0-java(jdk8)客户端生产消息时,控制台一直刷屏exception causing close of session 0x0 due to java.io.EOFException.

斗云 发表于: 2017-07-27   最后更新时间: 2017-07-27 18:48:06   13,544 游览

采用的配置如下:

producer.topic=drps_push
bootstrap.servers=192.168.100.118:9092
request.required.acks=1
serializer.class=kafka.serializer.DefaultEncoder
key.serializer=org.apache.kafka.common.serialization.ByteArraySerializer
value.serializer=org.apache.kafka.common.serialization.ByteArraySerializer
linger.ms=10
batch.size=32768

服务控制台一直刷屏:
exception causing close of session 0x0 due to java.io.EOFException (org.apache.zookeeper.server.NIOServerConn)

发表于 2017-07-27
添加评论

这个是通讯未正确读取完成的异常,看看防火墙

斗云 -> 半兽人 7年前

多谢解答,现在调用是在一台机器,kafka安装在另一台机器,都是linux64,两台机器的防火墙都关了,还是存在问题,请问还有其他原因吗?

半兽人 -> 斗云 7年前

key.serializer和value.serializer先使用默认的吧。

斗云 -> 半兽人 7年前

因为以前一直装在windows下,测试都是正常,现在在linux下就发送不成功了,报错信息如下,请问这是什么原因:

[2017-07-28 10:47:14,182] INFO Got user-level KeeperException when processing sessionid:0x15d87138f850001 type:create cxid:0x86 zxid:0x58 txntype:-1 reqpath:n/a Error Path:/brokers/topics/consumer_offsets/partitions/19 Error:KeeperErrorCode = NoNode for /brokers/topics/consumer_offsets/partitions/19 (org.apache.zookeeper.server.PrepRequestProcessor)

[2017-07-28 10:47:14,185] INFO Got user-level KeeperException when processing sessionid:0x15d87138f850001 type:create cxid:0x87 zxid:0x59 txntype:-1 reqpath:n/a Error Path:/brokers/topics/consumer_offsets/partitions Error:KeeperErrorCode = NoNode for /brokers/topics/consumer_offsets/partitions (org.apache.zookeeper.server.PrepRequestProcessor)

[2017-07-28 10:47:14,192] INFO Got user-level KeeperException when processing sessionid:0x15d87138f850001 type:create cxid:0x8b zxid:0x5d txntype:-1 reqpath:n/a Error Path:/brokers/topics/consumer_offsets/partitions/30 Error:KeeperErrorCode = NoNode for /brokers/topics/consumer_offsets/partitions/30 (org.apache.zookeeper.server.PrepRequestProcessor)

[2017-07-28 10:47:14,200] INFO Got user-level KeeperException when processing sessionid:0x15d87138f850001 type:create cxid:0x8f zxid:0x60 txntype:-1 reqpath:n/a Error Path:/brokers/topics/consumer_offsets/partitions/47 Error:KeeperErrorCode = NoNode for /brokers/topics/consumer_offsets/partitions/47 (org.apache.zookeeper.server.PrepRequestProcessor)

[2017-07-28 10:47:14,218] INFO Got user-level KeeperException when processing sessionid:0x15d87138f850001 type:create cxid:0x94 zxid:0x63 txntype:-1 reqpath:n/a Error Path:/brokers/topics/consumer_offsets/partitions/29 Error:KeeperErrorCode = NoNode for /brokers/topics/consumer_offsets/partitions/29 (org.apache.zookeeper.server.PrepRequestProcessor)

[2017-07-28 10:47:14,238] INFO Got user-level KeeperException when processing sessionid:0x15d87138f850001 type:create cxid:0x97 zxid:0x66 txntype:-1 reqpath:n/a Error Path:/brokers/topics/consumer_offsets/partitions/41 Error:KeeperErrorCode = NoNode for /brokers/topics/consumer_offsets/partitions/41 (org.apache.zookeeper.server.PrepRequestProcessor)

半兽人 -> 斗云 7年前

你用命令正常吗?我怎么感觉你集群现在有问题。

斗云 -> 半兽人 7年前

其实没有用集群,是单机的

半兽人 -> 斗云 7年前

用命令正常吗?

斗云 -> 半兽人 7年前

正常的,原因可能是server.properties的配置listeners ,正在测

半兽人 -> 斗云 7年前

确定了吗?listeners或advertised.host.name不配置的话,会报timeout。

斗云 -> 半兽人 7年前

多谢提醒,配置了listeners后本地测试环境可以了,但是生产环境还没测试通,正在和现场的同事测试。

斗云 -> 斗云 7年前

可以收到了,多谢,
我学习kafka的时候也从这参考了很多

你的答案

查看kafka相关的其他问题或提一个您自己的问题