返回到文章

采纳

编辑于

Kafka Broker 日志警告无法消除 : Received a PartitionLeaderEpoch assignment for an epoch < latestEpoch

kafka

Broker日志提示大量警告

已查询该文章但未找到解决办法:https://www.orchome.com/1066

2020-04-30 16:50:37,010 WARN kafka.server.epoch.LeaderEpochFileCache: Received a PartitionLeaderEpoch assignment for an epoch < latestEpoch. This implies messages have arrived out of order. New: {epoch:16, offset:339490219592}, Current: {epoch:498, offset335305734105} for Partition: __consumer_offsets-47
2020-04-30 16:50:37,011 WARN kafka.server.epoch.LeaderEpochFileCache: Received a PartitionLeaderEpoch assignment for an epoch < latestEpoch. This implies messages have arrived out of order. New: {epoch:16, offset:339490219599}, Current: {epoch:498, offset335305734105} for Partition: __consumer_offsets-47
2020-04-30 16:50:37,011 WARN kafka.server.epoch.LeaderEpochFileCache: Received a PartitionLeaderEpoch assignment for an epoch < latestEpoch. This implies messages have arrived out of order. New: {epoch:14, offset:105463605}, Current: {epoch:336, offset104508994} for Partition: appDataToK3_test-12
2020-04-30 16:50:37,011 WARN kafka.server.epoch.LeaderEpochFileCache: Received a PartitionLeaderEpoch assignment for an epoch < latestEpoch. This implies messages have arrived out of order. New: {epoch:17, offset:92001836731}, Current: {epoch:479, offset86819324213} for Partition: __consumer_offsets-4
2020-04-30 16:50:37,012 WARN kafka.server.epoch.LeaderEpochFileCache: Received a PartitionLeaderEpoch assignment for an epoch < latestEpoch. This implies messages have arrived out of order. New: {epoch:16, offset:339490219606}, Current: {epoch:498, offset335305734105} for Partition: __consumer_offsets-47

描述

  1. kafka日常使用没有特殊操作

  2. 曾怀疑是follower 跟不上 leader 导致提示异常,查看topic ISR ,发现上面日志中 __consumer_offsets-47 有报警告,但是下面查看topic 分区47的 __consumer_offsets IRS是正常

     Topic: __consumer_offsets    Partition: 38    Leader: 153    Replicas: 153,154,150    Isr: 154,153
     Topic: __consumer_offsets    Partition: 39    Leader: 154    Replicas: 154,150,151    Isr: 154,151,150
     Topic: __consumer_offsets    Partition: 40    Leader: 150    Replicas: 150,152,153    Isr: 152,150,153
     Topic: __consumer_offsets    Partition: 41    Leader: 151    Replicas: 151,153,154    Isr: 151,154,153
     Topic: __consumer_offsets    Partition: 42    Leader: 152    Replicas: 152,154,150    Isr: 152,154,150
     Topic: __consumer_offsets    Partition: 43    Leader: 153    Replicas: 153,150,151    Isr: 151,153
     Topic: __consumer_offsets    Partition: 44    Leader: 154    Replicas: 154,151,152    Isr: 154,152,151
     Topic: __consumer_offsets    Partition: 45    Leader: 150    Replicas: 150,153,154    Isr: 154,150,153
     Topic: __consumer_offsets    Partition: 46    Leader: 151    Replicas: 151,154,150    Isr: 151,154,150
     Topic: __consumer_offsets    Partition: 47    Leader: 152    Replicas: 152,150,151    Isr: 152,150,151
     Topic: __consumer_offsets    Partition: 48    Leader: 153    Replicas: 153,151,152    Isr: 151,152,153
     Topic: __consumer_offsets    Partition: 49    Leader: 154    Replicas: 154,152,153    Isr: 154,152,153
    
  3. 下图是监控 JMX kafka.network:type=SocketServer,name=NetworkProcessorAvgIdlePercent 的值
    QQ截图20200430170630.png

问题:

  1. 什么问题导致该警告频繁打印,怎么能消除
  2. 如何解决 follower 跟不上leader问题,可以调整什么参数吗?