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

Unable to get Kafka data #4

Closed bluebob closed 6 years ago

bluebob commented 7 years ago

Kafka version: 0.10.2.0 Storage: Kafka K-o-m version: latest

Consumer Group and Topic List show empty values. The offsets database is being created, but when I check in sqlite, although I can see the tables and indexes, there doesn't appear to be any data in them. Running kom doesn't produce any error messages

rcasey212 commented 7 years ago

@bluebob Ahh, sorry I have not yet tried this against versions of Kafka > 0.10.0.X. There could very well be a bug using the v0.9.0.1 kafka client against a v0.10.2 broker. If the software cannot see consumer groups, there won't be any data to store in the SQLITE database file.

rcasey212 commented 7 years ago

@bluebob To humor me, can you tell me the options you are using to start k-o-m?

bluebob commented 7 years ago

/usr/bin/java -Djava.security.auth.login.config=conf/server-client-jaas.conf \ -cp /opt/kafoffmgr/KafkaOffsetMonitor-assembly-0.4.1-SNAPSHOT.jar \ com.quantifind.kafka.offsetapp.OffsetGetterWeb \ --offsetStorage kafka \ --kafkaBrokers vmkf:9200 \ --zk vmzk \ --port 8001 \ --refresh 10.seconds \ --retain 2.days \ --dbName offsetapp_kafka (just dumped the content of the small bash script I'm using)

hanrw commented 7 years ago

+1 with 0.10.0.X

ghost commented 7 years ago

Similar problem whit kafka 0.10.2.1:

2017-05-24 13:07:39 ERROR KafkaOffsetGetter$:103 - Kafka AdminClient polling aborted due to an unexpected exception.
java.lang.RuntimeException: Request METADATA failed on brokers List(Node(-2, xxx, 9092), Node(-3, xxy, 9092), Node(-1, xyz, 9092))
    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:338)
    at com.quantifind.kafka.core.KafkaOffsetGetter$$anonfun$f$lzycompute$1.apply(KafkaOffsetGetter.scala:332)
    at com.quantifind.kafka.core.KafkaOffsetGetter$$anonfun$f$lzycompute$1.apply(KafkaOffsetGetter.scala:332)
    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)

I was execute whitout errors in my local machine (same zk and brokers), but in prod server that exception was throw.

nohup java -cp KafkaOffsetMonitor:KafkaOffsetMonitor/KafkaOffsetMonitor-assembly-0.4.1-SNAPSHOT.jar com.quantifind.kafka.offsetapp.OffsetGetterWeb --offsetStorage kafka --kafkaBrokers xxx:9092,xxy:9092,xyz:9092 --zk zk:2181/kafka-prod --port 10002 --refresh 10.seconds --retain 2.days --dbName offsetapp_kafka Is strange becouse in my machine works fine. (prod server run in AWS machine) SOLVE: We fix it whit correct configuration on VPC servers and DNS search. Now maybe get a memory leak, in 7 days running the mem go out.

rcasey212 commented 7 years ago

@rodrigongarcia Thanks. I'm glad you found the issue you were having on your servers. I found an issue where the database may not get cleaned up correctly based on the --retain command-line flag. I'll post this fix in the coming weeks. Hopefully this will help with your memory issue.

@bluebob I tracked an issue where data may not get saved to the database which then is used to display the historical graph. I'll post a fix for this in the coming weeks. Hopefully this will solve your issue.

fmarchand commented 7 years ago

I have a similar problem : no consumer group or data in the UI java -Djava.security.auth.login.config=conf/server-client-jaas.conf -cp KafkaOffsetMonitor-assembly-0.4.1-SNAPSHOT.jar com.quantifind.kafka.offsetapp.OffsetGetterWeb --offsetStorage kafka --kafkaBrokers "broker1:1025,broker2:1025,broker3:1025" --port 9090 --refresh 20.seconds --retain 2.days --zk leader.mesos:2181/dcos-service-confluent-kafka

I guess it's because the zookeeper group/node is not called kafka (this is dcos-service-confluent-kafka) ? No ?

rcasey212 commented 7 years ago

@fmarchand You are correct. This monitor, at this point, expects the standard Kafka Zookeeper paths as defined by the Kafka class kafka.utils.ZkUtils.

aabed commented 7 years ago

I am facing the same issue

zkCli.sh ls / [cluster, controller_epoch, controller, brokers, zookeeper, kafka-manager, admin, isr_change_notification, consumers, latest_producer_id_block, config]

s-aravind-flipkart commented 6 years ago

Facing the same issue not working for brokers 0.10.0.1 with kafka offset storage.

rcasey212 commented 6 years ago

@s-aravind-flipkart @aabed @fmarchand @bluebob :

Sorry for the delay everyone. I am planning on dropping a new version here around the end of the year which fixes quite a few existing bugs and brings some new features.

rcasey212 commented 6 years ago

Hi @fmarchand & @aabed ,

At this time I don't have any plans to add code to allow non-default zookeeper paths for Kafka. If either of you wish to work on adding this functionality, I would gladly look at PRs that you submit. If you still wish to discuss this, please open a new issue and talk about it there. Zookeeper paths is a different issue than the issue @bluebob and others initially reported. Thanks!

rcasey212 commented 6 years ago

Hi @bluebob, @MadeInChina, @s-aravind-flipkart, @rodrigongarcia :

The new version (0.4.6) I released and compiled should fix all of your SQLite issues. Please give it a try and open a new issue for any new problems you are having.

https://github.com/Morningstar/kafka-offset-monitor/releases/tag/0.4.6

zzdwcm commented 6 years ago

I still got this bug in 0.4.6:

2018-01-21 10:30:28 INFO AppInfoParser:83 - Kafka commitId : 23c69d62a0cabf06 2018-01-21 10:30:28 ERROR KafkaOffsetGetter$:103 - Kafka AdminClient polling aborted due to an unexpected exception. java.lang.RuntimeException: Request METADATA failed on brokers List(Node(-3, KCS-3, 6667), Node(-1, KCS-1, 6667), Node(-2, KCS-2, 6667)) 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) ^C2018-01-21 10:30:32 INFO ContextHandler:843 - stopped o.e.j.s.ServletContextHandler{/,jar:file:/opt/kafka-offset-monitor/KafkaOffsetMonitor-assembly-0.4.6.jar!/offsetapp}