Docker with redis master-slave failedload the master synchronization dbfrom ..

  docker, question

Docker is equipped with the subordinate of redis

Configuration is also very simple, slave seems to duplicate (error 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 # Failed trying to load the MASTER synchronization DB from disk
 redis-master_1  | 1:M 26 Jul 08:00:12.081 # Connection with slave 172.21.0.3:6458 lost.

Synchronization failed.Failed trying to load the MASTER synchronization DB from disk, and then slave is trying again and again. Has anyone met it? ?

Encountered the same problem, win10′ s docker master-slave failed and tried again, reportedFailed trying to load the MASTER synchronization DB from disk

Interestingly, when I started another slave and set the rdb path to be the same as slave_1, it was very successful.