kafka有台broker挂机之后长时间没重启,导致重启报错

2019-04-23 17:22:42,423 WARN kafka.controller.KafkaController: [Controller 782]: Partition [hjw_test8,6] failed to complete preferred replica leader election. Leader is 201
2019-04-23 17:22:42,423 ERROR kafka.server.ReplicaFetcherThread: [ReplicaFetcherThread-5-203], Error for partition [alarm_callback_topic,2] to broker 203:org.apache.kafka.common.errors.Not
LeaderForPartitionException: This server is not the leader for that topic-partition.
2019-04-23 17:22:42,426 ERROR state.change.logger: Controller 782 epoch 227 encountered error while electing leader for partition [004_8,3] due to: Preferred replica 203 for partition [004
_8,3] is either not alive or not in the isr. Current leader and ISR: [{"leader":759,"leader_epoch":3,"isr":[759]}].
2019-04-23 17:22:42,426 ERROR state.change.logger: Controller 782 epoch 227 initiated state change for partition [004_8,3] from OfflinePartition to OnlinePartition failed
kafka.common.StateChangeFailedException: encountered error while electing leader for partition [004_8,3] due to: Preferred replica 203 for partition [004_8,3] is either not alive or not in
 the isr. Current leader and ISR: [{"leader":759,"leader_epoch":3,"isr":[759]}].

2019-04-23 17:22:42,430 ERROR kafka.server.ReplicaFetcherThread: [ReplicaFetcherThread-1-203], Error for partition [kjTest,8] to broker 203:org.apache.kafka.common.errors.NotLeaderForParti
tionException: This server is not the leader for that topic-partition.
2019-04-23 17:22:42,430 ERROR kafka.server.ReplicaFetcherThread: [ReplicaFetcherThread-1-203], Error for partition [app_error_log,2] to broker 203:org.apache.kafka.common.errors.NotLeaderF
orPartitionException: This server is not the leader for that topic-partition.
2019-04-23 17:22:42,430 ERROR kafka.server.ReplicaFetcherThread: [ReplicaFetcherThread-1-203], Error for partition [kjTest2,8] to broker 203:org.apache.kafka.common.errors.NotLeaderForPart
itionException: This server is not the leader for that topic-partition.
2019-04-23 17:22:42,430 ERROR kafka.server.ReplicaFetcherThread: [ReplicaFetcherThread-1-203], Error for partition [fj1001,9] to broker 203:org.apache.kafka.common.errors.NotLeaderForParti
tionException: This server is not the leader for that topic-partition.
2019-04-23 17:22:42,430 ERROR kafka.server.ReplicaFetcherThread: [ReplicaFetcherThread-1-203], Error for partition [lzsw_alarm_topic,1] to broker 203:org.apache.kafka.common.errors.NotLead
erForPartitionException: This server is not the leader for that topic-partition.

[Kafka Server 782], Proceeding to do an unclean shutdown as all the controlled shutdown attempts failed

遇到这个问题,有可能是副本的offset比leader的新,导致的不能启动

使用命令直接平衡所有的topic

kafka-preferred-replica-election.sh --zookeeper 192.168.3.201:2181

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hblicy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值