得到"org.apache.kafka.common.network.InvalidReceiveException:无效的接收(大小= 1195725856大于104857600)" [英] getting "org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 1195725856 larger than 104857600)"

查看:662
本文介绍了得到"org.apache.kafka.common.network.InvalidReceiveException:无效的接收(大小= 1195725856大于104857600)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了zookeeper和kafka,第一步 :通过以下命令运行zookeeper:

I have installed zookeeper and kafka, first step : running zookeeper by the following commands :

bin/zkServer.sh start
bin/zkCli.sh

第二步:正在运行kafka服务器

second step : running kafka server

bin/kafka-server-start.sh config/server.properties

kafka应该在本地主机上运行:9092

kafka should run at localhost:9092

但是出现以下错误:

WARN Unexpected error from /0:0:0:0:0:0:0:1; closing connection (org.apache.kafka.common.network.Selector)
org.apache.kafka.common.network.InvalidReceiveException: Invalid receive (size = 1195725856 larger than 104857600)

我正在关注以下链接: Link1 Link2

I am following the following link : Link1 Link2

我是kafka的新手,请帮助我进行设置.

I am new to kafka ,please help me to set it up.

推荐答案

1195725856是 GET [space] 编码为大端的四字节整数(请参见

1195725856 is GET[space] encoded as a big-endian, four-byte integer (see here for more information on how that works). This indicates that HTTP traffic is being sent to Kafka port 9092, but Kafka doesn't accept HTTP traffic, it only accepts its own protocol (which takes the first four bytes as the receive size, hence the error).

由于错误是在启动时收到的,因此它可能是良性的,并且可能表明您的网络扫描端口上的扫描服务或类似服务具有Kafka无法识别的协议.

Since the error is received on startup, it is likely benign and may indicate a scanning service or similar on your network scanning ports with protocols that Kafka doesn't understand.

为了找到原因,您可以使用tcpdump查找HTTP流量来自何处:

In order to find the cause, you can find where the HTTP traffic is coming from using tcpdump:

tcpdump -i any -w trap.pcap dst port 9092
# ...wait for logs to appear again, then ^C...
tcpdump -qX -r trap.pcap | less +/HEAD

总的来说,这可能很烦人但无害.至少Kafka实际上并没有分配/清除内存.:-)

Overall though, this is probably annoying but harmless. At least Kafka isn't actually allocating/dirtying the memory. :-)

这篇关于得到"org.apache.kafka.common.network.InvalidReceiveException:无效的接收(大小= 1195725856大于104857600)"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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