akhq: handle case when Broker: Leader not available

I’m using the latest version of kafkahq. While displaying the topics, we’re getting the following error:

Caused by: java.lang.RuntimeException: Error for Describe Topics Offsets {}
	at org.kafkahq.utils.Lock.call(Lock.java:29)
	at org.kafkahq.modules.KafkaWrapper.describeTopicsOffsets(KafkaWrapper.java:96)
	at org.kafkahq.repositories.TopicRepository.findByName(TopicRepository.java:100)
	at org.kafkahq.repositories.TopicRepository.findByName(TopicRepository.java:91)
	at org.kafkahq.repositories.TopicRepository.lambda$list$0(TopicRepository.java:52)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	... 1 more

Entire stacktrace is here: https://gist.github.com/omnipresent07/db223be60a831b6e359bfbca13fb5688

My application.conf file looks like this:

kafkahq:
  connections:
    somename:
      properties:
        bootstrap.servers: "someip"

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 2
  • Comments: 17 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, @tchiotludo ! I have steps to reproduce an issue with Error for Describe Topics Offsets. I use docker-compose with 1 Zk instance and 3 Kafka instances.

  1. At first only 1 Kafka instance is started (for other instances docker stop is called). Create via AKHQ UI topic test-1 (1 partition, 1 RF), topic test-2 (2 partitions, 1 RF).
  2. Start the 2nd Kafka instance (docker start). Create via AKHQ UI topic test-3 (3 partitions, 2 RF), topic test-4 (4 partitions, 2 RF).

The error Error for Describe Topics Offsets is appeared for both test-3 and test-4, but they are created!

Sure the error Error for Describe Topics Offsets is appeared also in case when you stop some brokers. But it’s strangely appears also for steps above! And everything continue to work after that.