Rocketmq: slave broker print "ReputMessageService - findMappedFileByOffset failure" error continually in storeerror.log

Created on 7 Apr 2021  ·  4Comments  ·  Source: apache/rocketmq

The issue tracker is ONLY used for bug report(feature request need to follow RIP process). Keep in mind, please check whether there is an existing same report before your raise a new one.

Alternately (especially if your communication is not a bug report), you can send mail to our mailing lists. We welcome any friendly suggestions, bug fixes, collaboration and other improvements.

Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as the following:

BUG REPORT

  1. Please describe the issue you observed:

one of the slave broker print the the follow error in storeerror.log

ReputMessageService - Offset for /home/rocketmq/data/master/store/commitlog/00000000813896302592 not matched. Request offset: 519462681834, index: -275, mappedFileSize: 1073741824, mappedFiles count: 13
ReputMessageService - findMappedFileByOffset failure. 
java.lang.ArrayIndexOutOfBoundsException: -275
    at java.util.concurrent.CopyOnWriteArrayList.get(CopyOnWriteArrayList.java:387) ~[na:1.8.0_45]
    at java.util.concurrent.CopyOnWriteArrayList.get(CopyOnWriteArrayList.java:396) ~[na:1.8.0_45]
    at org.apache.rocketmq.store.MappedFileQueue.findMappedFileByOffset(MappedFileQueue.java:478) ~[rocketmq-store-4.2.0.jar:4.2.0]
    at org.apache.rocketmq.store.CommitLog.getData(CommitLog.java:148) [rocketmq-store-4.2.0.jar:4.2.0]
    at org.apache.rocketmq.store.CommitLog.getData(CommitLog.java:143) [rocketmq-store-4.2.0.jar:4.2.0]
    at org.apache.rocketmq.store.DefaultMessageStore$ReputMessageService.doReput(DefaultMessageStore.java:1751) [rocketmq-store-4.2.0.jar:4.2.0]
    at org.apache.rocketmq.store.DefaultMessageStore$ReputMessageService.run(DefaultMessageStore.java:1818) [rocketmq-store-4.2.0.jar:4.2.0]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
  1. Please tell us about your environment:

version: 4.2.0
cluster info: 4 async_master, 4 slave, async flush disk mode

Most helpful comment

This is because reputFromOffset is less than the minimum storage location of the slave broker。You can disable writing to this group of brokers, slave broker, and then clear all stored files on the slave broker,re-restoring synchronization

All 4 comments

This is because reputFromOffset is less than the minimum storage location of the slave broker。You can disable writing to this group of brokers, slave broker, and then clear all stored files on the slave broker,re-restoring synchronization

This is because reputFromOffset is less than the minimum storage location of the slave broker。You can disable writing to this group of brokers, slave broker, and then clear all stored files on the slave broker,re-restoring synchronization

Is it practicable for clear all stored files in slave broker with large stored data? It is needed to restart the slave broker?

This is because reputFromOffset is less than the minimum storage location of the slave broker。You can disable writing to this group of brokers, slave broker, and then clear all stored files on the slave broker,re-restoring synchronization

Is it practicable for clear all stored files in slave broker with large stored data? It is needed to restart the slave broker?

Need to restart。
1,disable writing to this group of brokers
2,stop the slave broker,if the cluster tps not is not high,this step can wait 3 days,wait for all the messages to be consumed and the message is saved for 3 days by default
3,clear all stored files
4,start the slave broker
5,turn on writing

This is because reputFromOffset is less than the minimum storage location of the slave broker。You can disable writing to this group of brokers, slave broker, and then clear all stored files on the slave broker,re-restoring synchronization

Is it practicable for clear all stored files in slave broker with large stored data? It is needed to restart the slave broker?

Need to restart。
1,disable writing to this group of brokers
2,stop the slave broker,if the cluster tps not is not high,this step can wait 3 days,wait for all the messages to be consumed and the message is saved for 3 days by default
3,clear all stored files
4,start the slave broker
5,turn on writing

thanks. Explaination is very clear.

Was this page helpful?
0 / 5 - 0 ratings