1

I am trying to determine the current offset on a topic, I run the

bin/kafka-run-class.sh kafka.tools.GetOffsetShell

Command and I get the following error, What may be going on, and how do I fix this?

Picked up _JAVA_OPTIONS: -Xmx4g
Error: partition 2 does not have a leader. Skip getting offsets
Error: partition 4 does not have a leader. Skip getting offsets
Error: partition 1 does not have a leader. Skip getting offsets
Error: partition 3 does not have a leader. Skip getting offsets
Error: partition 0 does not have a leader. Skip getting offsets
Vijay Kumar
  • 2,439
  • 2
  • 32
  • 51

1 Answers1

1

Most probably your Kafka brokers are down.

You can run

kafka-topics --zookeeper host:2181 --describe --topic topic_name

and see whether the Leader is equal to -1. If this is the case then you need to start Kafka brokers.

bin/kafka-server-start.sh config/server.properties
Giorgos Myrianthous
  • 36,235
  • 20
  • 134
  • 156