java 为 xxx 组提交偏移量时发生错误 UNKNOWN_MEMBER_ID
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38394662/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error UNKNOWN_MEMBER_ID occurred while committing offsets for group xxx
提问by Johnny Lim
With Kafka client Java library, consuming logs has worked for some time but with the following errors it doesn't work any more:
使用 Kafka 客户端 Java 库,使用日志已经工作了一段时间,但出现以下错误,它不再起作用:
2016-07-15 19:37:54.609 INFO 4342 --- [main] o.a.k.c.c.internals.AbstractCoordinator : Marking the coordinator 2147483647 dead.
2016-07-15 19:37:54.933 ERROR 4342 --- [main] o.a.k.c.c.internals.ConsumerCoordinator : Error UNKNOWN_MEMBER_ID occurred while committing offsets for group logstash
2016-07-15 19:37:54.933 WARN 4342 --- [main] o.a.k.c.c.internals.ConsumerCoordinator : Auto offset commit failed: Commit cannot be completed due to group rebalance
2016-07-15 19:37:54.941 ERROR 4342 --- [main] o.a.k.c.c.internals.ConsumerCoordinator : Error UNKNOWN_MEMBER_ID occurred while committing offsets for group logstash
2016-07-15 19:37:54.941 WARN 4342 --- [main] o.a.k.c.c.internals.ConsumerCoordinator : Auto offset commit failed:
2016-07-15 19:37:54.948 INFO 4342 --- [main] o.a.k.c.c.internals.AbstractCoordinator : Attempt to join group logstash failed due to unknown member id, resetting and retrying.
It keeps resetting.
它一直在重置。
Running another instance of the same application gets errors immediately.
运行同一应用程序的另一个实例会立即出错。
I suspect Kafka or its ZooKeeper has a problem but there's no error log.
我怀疑 Kafka 或其 ZooKeeper 有问题,但没有错误日志。
Any one who has idea on what's going on here?
任何人都知道这里发生了什么?
This is the application I'm using: https://github.com/izeye/log-redirector
这是我正在使用的应用程序:https: //github.com/izeye/log-redirector
回答by Tavo
I just faced the same issue. I have been investigating, and in thisthread and in thiswiki you can find the solution.
我刚刚面临同样的问题。我一直在调查,在此线程和此wiki 中,您可以找到解决方案。
The issue seems to be that the processing of a batch takes longer than the session timeout. Either increase the session timeout or the polling frequency or limit the number of bytes received.
问题似乎是批处理的处理时间比会话超时时间长。增加会话超时或轮询频率或限制接收的字节数。
What worked for me was changing max.partition.fetch.bytes
. But you can also modify session.timeout.ms
or the value you pass to your consumer.poll(TIMEOUT)
对我有用的是改变max.partition.fetch.bytes
。但是您也可以修改session.timeout.ms
或传递给您的值consumer.poll(TIMEOUT)