danielqsj / kafka_exporter

Kafka exporter for Prometheus
Apache License 2.0
2.1k stars 602 forks source link

number of topics has value -1 which is not in the range #342

Open ziyanTOP opened 1 year ago

ziyanTOP commented 1 year ago

Environment

Linux : 3.10.0-862.el7.x86_64 Kafka : 2.0.1-1.2.0.1.p0.5 kafka_exporter : 1.6.0.linux-amd64

Exporter and kafka are on same server.

Scene

exporter log (ip masked)

I1024 16:26:01.962466  112481 kafka_exporter.go:792] Starting kafka_exporter (version=1.6.0, branch=HEAD, revision=c021e94dfb808e642d41064c6550cbba87fe30c6)
F1024 16:28:02.717909  112481 kafka_exporter.go:893] Error Init Kafka Client: kafka: client has run out of available brokers to talk to: read tcp x.x.x.x:46812->x.x.x.x:9092: i/o timeout

kafka log (repeat 3 more times)

2022-10-24 16:26:01,964 ERROR kafka.network.Processor: Processor got uncaught exception.
kafka.common.KafkaException: number of topics has value -1 which is not in the range (0,2147483647).
        at kafka.api.ApiUtils$.readIntInRange(ApiUtils.scala:87)
        at kafka.api.TopicMetadataRequest$.readFrom(TopicMetadataRequest.scala:43)
        at kafka.network.RequestChannel$Request$$anonfun$3.apply(RequestChannel.scala:66)
        at kafka.network.RequestChannel$Request$$anonfun$3.apply(RequestChannel.scala:66)
        at kafka.network.RequestChannel$Request$$anonfun$7.apply(RequestChannel.scala:74)
        at kafka.network.RequestChannel$Request$$anonfun$7.apply(RequestChannel.scala:74)
        at scala.Option.map(Option.scala:146)
        at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:74)
        at kafka.network.Processor$$anonfun$run$11.apply(SocketServer.scala:426)
        at kafka.network.Processor$$anonfun$run$11.apply(SocketServer.scala:421)
        at scala.collection.Iterator$class.foreach(Iterator.scala:742)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
        at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
        at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
        at kafka.network.Processor.run(SocketServer.scala:421)
        at java.lang.Thread.run(Thread.java:745)


I'm not familiar with kafka, and I've already tried to search for solutions, such as add --kafka.version=0.10.0.1 flag. But it didn't work. So maybe some kafka experts can solve this problem for me, or just explain how it happen.