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

查看:73
本文介绍了获取“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 应该运行在 localhost: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)

我正在关注以下链接:Link1Link2

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

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

推荐答案

1195725856 被 GET[space] 编码为大端、四字节整数(请参阅 此处 了解有关其工作原理的更多信息).这表明HTTP流量正在发送到Kafka端口9092,但Kafka不接受HTTP流量,它只接受自己的协议(将前四个字节作为接收大小,因此错误).

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天全站免登陆