kafka.common.ConsumerRebalanceFailedException: group_dd-1446432618163-2746a209 can't rebalance after 10 retries
  at kafka.consumer.ZookeeperConsumerConnector$ZKRebalancerListener.syncedRebalance(ZookeeperConsumerConnector.scala:432)
  at kafka.consumer.ZookeeperConsumerConnector.kafka$consumer$ZookeeperConsumerConnector$$reinitializeConsumer(ZookeeperConsumerConnector.scala:722)
  at kafka.consumer.ZookeeperConsumerConnector.consume(ZookeeperConsumerConnector.scala:212)
  at kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:80)
  at kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:92)
  at com.symboltech.mine.ConsumerUtil.start(ConsumerUtil.java:40)
  at com.symboltech.mine.KafkaConsumer.sdf(KafkaConsumer.java:58)

解决办法:
1.配置zk问题(kafka的consumer配置)
zookeeper.session.timeout.ms=5000
zookeeper.connection.timeout.ms=10000
rebalance.backoff.ms=2000
rebalance.max.retries=10

官方解释:
consumer rebalancing fails (you will see ConsumerRebalanceFailedException): This is due to conflicts when two consumers are trying to own the same topic partition. The log will show you what caused the conflict (search for "conflict in ").
If your consumer subscribes to many topics and your ZK server is busy, this could be caused by consumers not having enough time to see a consistent view of all consumers in the same group. If this is the case, try Increasing rebalance.max.retries and rebalance.backoff.ms.
Another reason could be that one of the consumers is hard killed. Other consumers during rebalancing won't realize that consumer is gone after zookeeper.session.timeout.ms time. In the case, make sure that rebalance.max.retries * rebalance.backoff.ms > zookeeper.session.timeout.ms.


kafka.common.ConsumerRebalanceFailedException异常解决的更多相关文章

  1. 关于kafka定期清理日志后再消费报错kafka.common.OffsetOutOfRangeException的解决

    环境: kafka  0.10 spark  2.1.0 zookeeper  3.4.5-cdh5.14.0 公司阿里云测试机,十月一放假前,没有在继续消费,假期过后回来再使用spark strea ...

  2. Kafka kafka.common.OffsetOutOfRangeException 问题处理

    最近公司的zk的down掉了,  storm job 重启的时候报出 kafka.common.OffsetOutOfRangeException 异常 网上查询了一些朋友的做法, 自己也看了一下代码 ...

  3. 全网最详细的启动Kafka服务时出现kafka.common.InconsistentBrokerIdException: Configured brokerId 3 doesn't match stored brokerId 1 in meta.properties错误的解决办法(图文详解)

    不多说,直接上干货! 问题详情 执行bin/kafka-server-start.sh config/server.properties 时, [kfk@bigdata-pro03 kafka_2.- ...

  4. SpringBoot 连接kafka ssl 报 CertificateException: No subject alternative names present 异常解决

    当使用较新版本SpringBoot时,对应的 kafka-client 版本也比较新,如果使用了 2.x 以上的 kafka-client ,并且配置了 kafka ssl 连接方式时,可能会报如下异 ...

  5. 线上Kafka突发rebalance异常,如何快速解决?

    文章首发于[陈树义的博客],点击跳转到原文<线上Kafka突发rebalance异常,如何快速解决?> Kafka 是我们最常用的消息队列,它那几万.甚至几十万的处理速度让我们为之欣喜若狂 ...

  6. kafka集群中常见错误的解决方法:kafka.common.KafkaException: Should not set log end offset on partition

    问题描述:kafka单台机器做集群操作是没有问题的,如果分布多台机器并且partitions或者备份的个数大于1都会报kafka.common.KafkaException: Should not s ...

  7. org.apache.kafka.common.network.Selector

    org.apache.kafka.common.client.Selector实现了Selectable接口,用于提供符合Kafka网络通讯特点的异步的.非阻塞的.面向多个连接的网络I/O. 这些网络 ...

  8. kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries. 最无语的配置

    注意: 本文不谈废话,低级问题请自行检查. 我使用Java版本的Kafka Producer生产数据,但是抛出了这个异常.百思不得其解,明明防火墙配置,ZooKeeper,Kafka配置都是没问题的啊 ...

  9. Ant运行build.xml执行服务器scp,异常解决jsch.jar

    公司ant打包上线 一直出现这个问题. Ant运行build.xml执行服务器scp,异常解决jsch.jar BUILD FAILEDD:\eclipse\eclipse-jee-luna-SR2- ...

随机推荐

  1. CentOS(Linux)安装KETTLE教程 并配置执行定时任务

    1,首先是安装jdk,并设置环境变量 采用yum安装可不设置环境变量 2,下载kettle https://sourceforge.net/projects/pentaho/files/Data%20 ...

  2. python2.7入门---正则表达式

        正则表达式是一个特殊的字符序列,它能帮助你方便的检查一个字符串是否与某种模式匹配.Python 自1.5版本起增加了re 模块,它提供 Perl 风格的正则表达式模式.re 模块使 Pytho ...

  3. windows 系统禁止使用 U 盘的方法

    windows 系统禁止使用 U 盘的方法 最简单的办法: 注册表 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentCntrolSet\Services\USBSTOR] 将名为 ...

  4. 13 IO多路复用 (未完成)

    IO多路复用 6.select版-TCP服务器:最多1024 import select import socket import sys server = socket.socket(socket. ...

  5. bzoj 一些题目汇总

    2140: 稳定婚姻 /* 求联通分量. */ #include<bits/stdc++.h> using namespace std; typedef long long LL; inl ...

  6. React实现最完整的百度搜索框

    import React,{Component} from 'react' import ReactDOM,{render} from 'react-dom' import 'bootstrap/di ...

  7. nginx https ssl 配置

    #设置https 访问server { listen ; server_name www.xxx.com; access_log xxx/xxx/xxx.log combined; index ind ...

  8. VectorDrawable在Android中的配置

    一.让Android支持VectorDrawable apply plugin: 'com.android.application' android { defaultConfig { vectorD ...

  9. 29、phonegap入门

    0. PhoneGap介绍 0.1  什么是PhoneGap? PhoneGap是一个基于HTML.CSS.JS创建跨平台移动应程序的快速开发平台.与传统Web应用不同的是,它使开发者能够利用iPho ...

  10. 「个人训练」Copying Books(UVa714)

    好久不更新主要是怠惰了....还要加强训练. 题意分析与思路 注意到这样一句话: our goal is to minimize the maximum number of pages assigne ...