Zookeeper中的错误:Kafka创作主题时长度不合理= 308375649

gcmastyq  于 2022-12-09  发布在  Apache
关注(0)|答案(2)|浏览(1071)

I am setting up Kafka on my local Windows 10 machine. So downloaded all the required binaries and updated the two settings server and zookeeper properties as per the documentation.
But when running the Kafka create topic command

kafka-topics.bat --create --bootstrap-server 127.0.0.1:2181 --replication-factor 1 --partitions 1 --topic testtopic

I am getting below error in the Zookeeper window

WARN Close of session 0x0 (org.apache.zookeeper.server.NIOServerCnxn)
java.io.IOException: Unreasonable length = 308375649
        at org.apache.jute.BinaryInputArchive.checkLength(BinaryInputArchive.java:166)
        at org.apache.jute.BinaryInputArchive.readBuffer(BinaryInputArchive.java:127)
        at org.apache.zookeeper.proto.ConnectRequest.deserialize(ConnectRequest.java:91)
        at org.apache.zookeeper.server.ZooKeeperServer.processConnectRequest(ZooKeeperServer.java:1350)
        at org.apache.zookeeper.server.NIOServerCnxn.readConnectRequest(NIOServerCnxn.java:419)
        at org.apache.zookeeper.server.NIOServerCnxn.readPayload(NIOServerCnxn.java:180)
        at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:339)
        at org.apache.zookeeper.server.NIOServerCnxnFactory$IOWorkRequest.doWork(NIOServerCnxnFactory.java:522)
        at org.apache.zookeeper.server.WorkerService$ScheduledWorkRequest.run(WorkerService.java:154)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Can somebody help me here?

ni65a41a

ni65a41a1#

我遇到了类似的问题,因为我试图连接到zookeeper示例(端口2181),同时提供了**--bootstrap-server选项。后来,我提供了Kafka代理的详细信息(localhost:9092),它工作得很好。
在Kafka的旧版本中,我们曾经提供
--zookeeper**选项&因此它的示例。
请尝试以下命令-

bin/kafka-topics.sh --create --topic testtopic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1
z9zf31ra

z9zf31ra2#

使用以下命令kafka-topics.bat --描述--主题测试主题--引导服务器本地主机:9092

相关问题