通过命令:./bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic test001获取主题当前偏移量信息时报错:java.io.EOFException

落羽 发表于: 2020-06-17   最后更新时间: 2020-06-17  

错误信息如下:

WARN Fetching topic metadata with correlation id 0 for topics [Set(test001)] from broker [BrokerEndPoint(0,localhost,9095)] failed (kafka.client.ClientUtils$)
java.io.EOFException
at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:87)
at kafka.network.BlockingChannel.readCompletely(BlockingChannel.scala:131)
at kafka.network.BlockingChannel.receive(BlockingChannel.scala:122)
at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:82)
at kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:79)
at kafka.producer.SyncProducer.send(SyncProducer.scala:124)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:61)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:96)
at kafka.tools.GetOffsetShell$.main(GetOffsetShell.scala:79)
at kafka.tools.GetOffsetShell.main(GetOffsetShell.scala)
Exception in thread "main" kafka.common.KafkaException: fetching topic metadata for topics [Set(test001)] from broker [ArrayBuffer(BrokerEndPoint(0,localhost,9095))] failed
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:75)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:96)
at kafka.tools.GetOffsetShell$.main(GetOffsetShell.scala:79)
at kafka.tools.GetOffsetShell.main(GetOffsetShell.scala)
Caused by: java.io.EOFException
at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:87)
at kafka.network.BlockingChannel.readCompletely(BlockingChannel.scala:131)
at kafka.network.BlockingChannel.receive(BlockingChannel.scala:122)
at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:82)
at kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:79)
at kafka.producer.SyncProducer.send(SyncProducer.scala:124)
at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:61)
... 3 more

求大佬帮助解决!!!



您需要解锁本帖隐藏内容请: 点击这里
本帖隐藏的内容




上一条: Kafka connect 如何确保消息发送成功和顺序的?
下一条: kafka消费不到数据,报如下信息,是什么问题呢Node 1044 was unable to process the fetch request with (sessionId=1031872821, epoch=120677): FETCH_SESSION_ID_NOT_FOUND.

  • 你kafka上面版本,这种只有offset存储在zk上才有效果。
    默认是kafka版本是0.9之前。