Kafka 高级消费者 error_code=15 [英] Kafka High-level Consumer error_code=15

查看:25
本文介绍了Kafka 高级消费者 error_code=15的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试使用高级消费者(使用全新的消费者组)从 Kafka 消费时,消费者永远不会开始运行.当我将日志记录级别切换到调试时,我可以看到以下两行一遍又一遍地重复:

When trying to consume from Kafka using the high-level consumer (using a completely new consumer group), the consumer never starts running. When I switch the logging level to debug, I can see the following two lines repeating themselves over and over:

DEBUG [AbstractCoordinator] 09:43:51.192: Sending coordinator request for group CompletelyNewConsumerGroupThatIneverUsedBefore to broker 172.30.3.61:30000 (id: 1043 rack: null)
DEBUG [AbstractCoordinator] 09:43:51.306: Received group coordinator response ClientResponse(receivedTimeMs=1487666631306, disconnected=false, request=ClientRequest(expectResponse=true, callback=org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient$RequestFutureCompletionHandler@58f68932, request=RequestSend(header={api_key=10,api_version=0,correlation_id=197,client_id=consumer-1}, body={group_id=CompletelyNewConsumerGroupThatIneverUsedBefore}), createdTimeMs=1487666631192, sendTimeMs=1487666631192), responseBody={error_code=15,coordinator={node_id=-1,host=,port=-1}})

集群的所有6个节点都正常消费数据.即使是旧的低级消费者也能工作.同样在 Zookeeper 中,应该只有 6 个节点,它们的日志文件看起来还不错.

All 6 nodes of the cluster consume data properly. Even the old low-level consumer works. Also in Zookeeper there are only the 6 nodes that should be there and their log files look ok.

通过谷歌搜索我发现 error_code=15 意味着组协调器不可用.我认为这意味着消费者组协调员.这是回调问题吗?为什么高级消费者不起作用?

From googling I found that the error_code=15 means that the Group coordinator is not available. I assume that means Consumer Group coordinator. Is this a callback problem? Why does the high-level consumer not work?

推荐答案

事实证明,__consumer_offsets 主题的所有分区都位于死节点上(我关闭的节点将别再回来).我通过关闭集群解决了这个问题,从 Zookeeper 中删除了 __consumer_offsets 主题,然后再次启动集群.

As it turned out, the all partitions of the __consumer_offsets topic were located on dead nodes (nodes that I turned off and that will never come back). I solved the issue by shutting the cluster down, deleting the __consumer_offsets topic from Zookeeper and then starting the cluster again.

这篇关于Kafka 高级消费者 error_code=15的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆