[Question] Specified group generation id is not valid
See original GitHub issueDescribe the bug
Consumers (sometimes) encounters the following exception: Specified group generation id is not valid. The consumers that encounters that error become a kind of Zombie. They are still connected as consumers to a partition but not consuming messages.
To Reproduce Can’t reproduce
Expected behavior The consumer should reconnect to the consumer grouop.
Observed behavior Logs:
- [ConsumerGroup] Consumer has joined the group
- The group is rebalancing, so a rejoin is needed
- Specified group generation id is not valid
Environment:
- OS: [alpine]
- KafkaJS version [1.15.0]
- Kafka version [2.4.1]
- NodeJS version [14]
Additional context It’s probably not related to KafkaJs, but there is a mention of that error error.js and maybe you have any idea why it’s happening?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Broker: Specified group generation id is not valid
Problem. First, one of my consumers encounters the following exception. Confluent.Kafka.KafkaException: Broker: Specified group generation id is ...
Read more >Re: automatic offset reset question - The Mail Archive
What I think is happening is the consumer group gets reset to the ... at offset 5499236332: Specified group generation id is >...
Read more >edenhill/librdkafka - Gitter
... Broker: Specified group generation id is not valid error during rebalance (even when using the built-in rebalance callback). Will put in an...
Read more >How to fix the MEMBER_ID Error in Kafka - Dattell
In this post we discuss how to resolve the Kafka error "join group failed with org.apache.kafka.common.errors.memberidrequiredexception".
Read more >Kafka protocol guide - Apache Kafka
Error Code Retriable
UNKNOWN_SERVER_ERROR ‑1 False
NONE 0 False
OFFSET_OUT_OF_RANGE 1 False
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The
groupGenerationIdis something we get from the broker (generation_id) in theJoinGroupresponse, and it’s just a number that increments with each generation in the group.You’ll get this error when you try to commit after having been kicked out of the consumer group. This could for example happen if you spend too long in between heartbeats (because you’re processing a single message for too long, for example). What should happen is that you should re-join the group and get the new generation id to use.
It would be helpful if you could run with DEBUG log level so that we can see what requests are being made when this happens.
This is a shot in the dark, but do you maybe have more consumer instances than you do partitions? If so, some of your consumers will not be assigned any partitions, and thus won’t be doing any work.
Hello guys
I am having this issue when I scale my application horizontally. The pod is processing normally and out of nowhere I get this error:
I suspect a rebalance has occurred and the pod still tries to commit a message. I’ve tried the above solutions but to no avail.