为了账号安全,请及时绑定邮箱和手机立即绑定

kakfa Consumer can't rebalance after 5 retries

kakfa Consumer can't rebalance after 5 retries

慕桂英4014372 2019-03-30 19:14:14
JavaAPI中Kafka的消费者不能正确的连接到服务器的Kafka的队列。百度、google了很多都无法解决。这是配置信息:        props.put("zookeeper.connect", "XXXXXX:2181");        //配置Zookeeper连接超时间隔        props.put("zookeeper.connection.timeout.ms", "1000000");        //配置Zookeeper的组id(The ‘group.id’ string defines the Consumer Group this process is consuming on behalf of.)        props.put("group.id", "test-group");        props.put("zookeeper.session.timeout.ms", "4000");        props.put("zookeeper.sync.time.ms", "10000");        props.put("auto.commit.interval.ms", "1000");        props.put("rebalance.max.retries", "5");        props.put("rebalance.backoff.ms", "1200");这是错误日志:Exception in thread "Thread-0" kafka.common.ConsumerRebalanceFailedException: test-group_yanyongdeMacBook-Pro.local-1471403173076-d34ac5a3 can't rebalance after 5 retries    at kafka.consumer.ZookeeperConsumerConnector$ZKRebalancerListener.syncedRebalance(ZookeeperConsumerConnector.scala:660)    at kafka.consumer.ZookeeperConsumerConnector.kafka$consumer$ZookeeperConsumerConnector$$reinitializeConsumer(ZookeeperConsumerConnector.scala:967)    at kafka.consumer.ZookeeperConsumerConnector.consume(ZookeeperConsumerConnector.scala:254)    at kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:84)    at kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:96)    at com.yany.consumer.ConsumerTest$MyConsumer.run(ConsumerTest.java:44)
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 731 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信