kafka_exporter icon indicating copy to clipboard operation
kafka_exporter copied to clipboard

An error has occurred during metrics gathering

Open kirashet opened this issue 6 years ago • 6 comments

I'm using the official docker image of danielqsj/kafka-exporter.

Set it up, works like a charm.

Then we tested some resilience stuff (setup is 1xZookeeper, 2xKafka Brokers). We switched off the brokers by one another and started back on.

The kafka world was fine, just the kafka-exporter has some sniff.

If I call the metrics endpoint, I get

`An error has occurred during metrics gathering:

7 error(s) occurred:

  • collected metric kafka_consumergroup_members label:<name:"consumergroup" value:"testconsumer" > gauge:<value:0 > was collected before with the same name and label values`

docker logs shows:

time="2019-07-11T08:51:49Z" level=error msg="Cannot get offset of group axTest: kafka: broker not connected" source="kafka_exporter.go:396" time="2019-07-11T08:51:49Z" level=error msg="Cannot get consumer group: kafka: broker not connected" source="kafka_exporter.go:370" time="2019-07-11T08:51:51Z" level=info msg="Refreshing client metadata" source="kafka_exporter.go:233"

Restarting the exporter didn't do the trick either.

Any ideas?

kirashet avatar Jul 11 '19 09:07 kirashet

Nobody?

kirashet avatar Jul 12 '19 05:07 kirashet

Ok guys, I deleted the consumer group via

kafka-consumer-groups --bootstrap-server localhost:9092 --delete --group testconsumer

and the kafka_exporter doesn't bitch anymore.

Unfortunately I don't know the root cause.

Does someone?

kirashet avatar Jul 12 '19 07:07 kirashet

Having the same issue 😢

simonasr avatar Mar 04 '20 13:03 simonasr

Having the same issue , But I cannot delete the group

Allen-yan avatar Sep 16 '20 10:09 Allen-yan

Having the same issue , But I cannot delete the group

Why not?

kirashet avatar Sep 16 '20 13:09 kirashet

We've started to observe this on our redpanda cluster.

What we've found is that when broker leadership changes or when pods/nodes restart the exporter can fall into this state. A reboot while interruptive....often resolves it which is less than ideal.

Did anyone make progress on this?

moogzy avatar Sep 21 '21 15:09 moogzy