Morningstar / kafka-offset-monitor

A small web app to monitor the progress of kafka consumers and their lag wrt the log.
Apache License 2.0
282 stars 108 forks source link

java.lang.RuntimeException: Request METADATA failed on brokers List #22

Closed rcasey212 closed 6 years ago

rcasey212 commented 6 years ago

Moved @zifangsky's second question into a new issue, since his first question was answered and this is a separate issue.

@rcasey212 Thank you for your reply.My Kafka version is 1.0.0,and here is my start command:

!/bin/bash

java -cp KafkaOffsetMonitor-assembly-0.4.6-SNAPSHOT.jar com.quantifind.kafka.offsetapp.OffsetGetterWeb \ --offsetStorage "kafka" \ --zk 192.168.1.159:2100,192.168.1.159:2101,192.168.1.159:2102 --kafkaBrokers 192.168.1.159:9092,192.168.1.159:9093,192.168.1.159:9094 --kafkaSecurityProtocol "PLAINTEXT" \ --port 10000 \ --refresh 5.minutes \ --retain 1.day 1>/usr/local/KafkaMonitor/logs/stdout.log 2>/usr/local/KafkaMonitor/logs/stderr.log

And now,it appears another error:

2018-03-02 10:39:38 INFO AppInfoParser:82 - Kafka version : 0.9.0.1 2018-03-02 10:39:38 INFO AppInfoParser:83 - Kafka commitId : 23c69d62a0cabf06 2018-03-02 10:40:18 ERROR KafkaOffsetGetter$:103 - The Kafka Client reading topic/partition LogEndOffsets has thrown an unhandled exception. Will attempt to reconnect. org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata 2018-03-02 10:40:18 INFO KafkaOffsetGetter$:68 - Creating new Kafka AdminClient to get consumer and group info. 2018-03-02 10:40:18 INFO KafkaOffsetGetter$:68 - Created admin client: kafka.admin.AdminClient@1e7ccb96 2018-03-02 10:40:18 ERROR KafkaOffsetGetter$:103 - Kafka AdminClient polling aborted due to an unexpected exception. java.lang.RuntimeException: Request METADATA failed on brokers List(Node(-2, localhost.localdomain, 9093), Node(-1, localhost.localdomain, 9092), Node(-3, localhost.localdomain, 9094)) at kafka.admin.AdminClient.sendAnyNode(AdminClient.scala:73) at kafka.admin.AdminClient.findAllBrokers(AdminClient.scala:93) at kafka.admin.AdminClient.listAllGroups(AdminClient.scala:101) at kafka.admin.AdminClient.listAllGroupsFlattened(AdminClient.scala:122) at kafka.admin.AdminClient.listAllConsumerGroupsFlattened(AdminClient.scala:126) at com.quantifind.kafka.core.KafkaOffsetGetter$$anonfun$f$lzycompute$1.apply$mcV$sp(KafkaOffsetGetter.scala:421) at com.quantifind.kafka.core.KafkaOffsetGetter$$anonfun$f$lzycompute$1.apply(KafkaOffsetGetter.scala:415) at com.quantifind.kafka.core.KafkaOffsetGetter$$anonfun$f$lzycompute$1.apply(KafkaOffsetGetter.scala:415) at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Can you help me to see it again,please? Is it because my version of Kafka is too high?

rcasey212 commented 6 years ago

Hi @zifangsky:

It appears the monitor is unable to connect to your Kafka brokers. Perhaps they are not running, or there is a firewall blocking the consumers and AdminClient from connecting.

Bob

rcasey212 commented 5 years ago

Hi @zifangsky and everyone else,

It appears that there may be a compatibility issue with versions of Kafka 0.11 or greater.

I do have a local patch that updates the version of Kafka libraries to 1.0.2. This fixes this issue and has been tested as working for all version of Kafka brokers down to at least 0.10. I will attempt to get this out, plus a host of other improvements, over the next month.