redis
data_error
ai_generated
partial
Error: RDB checksum mismatch: expected 0x8a2b3c4d but got 0x9e1f0a5b
ID: redis/rdb-checksum-mismatch-on-replica
80%Fix Rate
84%Confidence
1Evidence
2024-09-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Redis 6.2.0 | active | — | — | — |
| Redis 7.0.0 | active | — | — | — |
| Redis 7.2.0 | active | — | — | — |
Root Cause
During replication, the RDB file transferred from master to replica has been corrupted in transit or on disk, causing a checksum verification failure.
generic中文
在复制过程中,从主节点传输到从节点的 RDB 文件在传输或磁盘上已损坏,导致校验和验证失败。
Official Documentation
https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/Workarounds
-
80% success On the master, run a manual BGSAVE to generate a fresh RDB file, then on the replica, use REPLICAOF NO ONE and REPLICAOF master-ip master-port to trigger a full resync.
On the master, run a manual BGSAVE to generate a fresh RDB file, then on the replica, use REPLICAOF NO ONE and REPLICAOF master-ip master-port to trigger a full resync.
-
75% success Check disk health on both master and replica using fsck or smartctl, and ensure network stability (e.g., TCP checksum offloading) to prevent corruption during transfer.
Check disk health on both master and replica using fsck or smartctl, and ensure network stability (e.g., TCP checksum offloading) to prevent corruption during transfer.
-
85% success If the error persists, manually copy the RDB file from master to replica using rsync with checksum verification, then restart the replica to load the file.
If the error persists, manually copy the RDB file from master to replica using rsync with checksum verification, then restart the replica to load the file.
中文步骤
在主节点上运行手动 BGSAVE 以生成新的 RDB 文件,然后在从节点上使用 REPLICAOF NO ONE 和 REPLICAOF master-ip master-port 触发完全重新同步。
使用 fsck 或 smartctl 检查主节点和从节点的磁盘健康状况,并确保网络稳定性(例如 TCP 校验和卸载)以防止传输过程中的损坏。
如果错误持续存在,使用带校验和验证的 rsync 手动将 RDB 文件从主节点复制到从节点,然后重启从节点加载文件。
Dead Ends
Common approaches that don't work:
-
80% fail
Retrying the replication without fixing the underlying network or disk issue will cause the same checksum mismatch on subsequent attempts.
-
90% fail
Disabling RDB checksums via rdb-checksum no in redis.conf removes the error but allows silent data corruption to propagate.
-
70% fail
Restarting the replica without addressing the master's RDB file integrity may load a corrupted dataset from persistent storage.