Docker with redis master-slave Failed load the MASTER synchronization DB from..

< H2 > docker is equipped with the master and slave of redis < / H2 >

configuration is also very simple. Slave seems to be copied repeatedly (if there is a mistake, it is still returning to retry)
docker-compose

version: "3"
services:
  redis-master:
    image: redis:3.2.12-alpine
    volumes:
      - ./master/redis.conf:/usr/local/etc/redis/redis.conf
      - ./master/data:/tmp
    ports: 
      - 6455:6455
    command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
  redis-slave:
    image: redis:3.2.12-alpine
    depends_on:
      - redis-master
    volumes:
      - ./slave/redis.conf:/usr/local/etc/redis/redis.conf
      - ./slave/data:/tmp
    ports: 
      - 6458:6458
    command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]

master/redis.conf

bind 0.0.0.0
protected-mode no
port 6455
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /tmp
appendonly yes
appendfilename "data.aof"

slave/redis.conf

bind 0.0.0.0
protected-mode no
port 6458
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /tmp
appendonly yes
appendfilename "data.aof"
slaveof redis-master 6455

result

 17:C 26 Jul 08:00:11.973 * DB saved on disk
redis-master_1  | 17:C 26 Jul 08:00:11.974 * RDB: 0 MB of memory used by copy-on-write
redis-master_1  | 1:M 26 Jul 08:00:12.074 * Background saving terminated with success
redis-slave_1   | 1:S 26 Jul 08:00:12.075 * MASTER <-> SLAVE sync: receiving 77 bytes from master
redis-master_1  | 1:M 26 Jul 08:00:12.076 * Synchronization with slave 172.21.0.3:6458 succeeded
redis-slave_1   | 1:S 26 Jul 08:00:12.080 * MASTER <-> SLAVE sync: Flushing old data
redis-slave_1   | 1:S 26 Jul 08:00:12.080 * MASTER <-> SLAVE sync: Loading DB in memory
redis-slave_1   | 1:S 26 Jul 08:00:12.080 -sharp Failed trying to load the MASTER synchronization DB from disk
redis-master_1  | 1:M 26 Jul 08:00:12.081 -sharp Connection with slave 172.21.0.3:6458 lost.

Synchronize failed, Failed trying to load the MASTER synchronization DB from disk , and then slave kept trying again and again. Has anyone ever encountered it?

Aug.21,2021

now I have the same problem, and I find that it is the slave volume data volume problem. If anonymous volumes are used, it is right not to bind to the host. But I also want to use named volumes. I haven't found a way yet.


encountered the same problem. If the master / slave fails to retry again and again under win10's docker, please report Failed trying to load the MASTER synchronization DB from disk

.

interestingly, when I opened another slave and set the rdb path to the same as slave_1, it was a fucking success


Failed trying to load the MASTER synchronization DB from disk
I have this problem because the versions of the master and slave are inconsistent

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-16de4cc-88df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-16de4cc-88df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?