1

I have two docker machines:

$ docker-machine ls
NAME           ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
redis-master   *        virtualbox   Running   tcp://192.168.99.100:2376           v1.10.1   
redis-slave1   -        virtualbox   Running   tcp://192.168.99.101:2376           v1.10.1   

I am trying to deploy master/slave redis replication to those machines, so on each of them I run REDIS container + SENTINEL container and run SLAVEOF command on master redis instance. Everything works fine at first, but after some time (1-2 minutes) master prints # Connection with slave 192.168.99.101:6379 lost. message in log and slave logs # Connection with master lost. and infinitely (without success) tries to resync with master.

REDIS version I use is 3.0.7 (also using sentinel shipped with redis).

Here is MASTER log (redis and sentinel logs): http://pastebin.com/raw/MvwCTeEu

Here is SLAVE log (redis and sentinel logs): http://pastebin.com/raw/vV6e3utK

sentinel.conf:

port 26379
dir /tmp
sentinel announce-ip <SENTINEL_IP>
sentinel monitor mymaster <MASTER_IP> 6379 2
sentinel down-after-milliseconds mymaster 30000
sentinel parallel-syncs mymaster 1
sentinel failover-timeout mymaster 180000
sentinel announce-port 26379

redis.conf: http://pastebin.com/raw/dqFYzTwz (it's actually default REDIS config , except repl-backlog-size which I've increased to 100mb to check if it wont help but it did not).

This is strange issue because at first replication/syncing works fine at first but, as I said, after 1-2 minutes master-slave connection is lost. During this time no redis/sentinel command are executed on any instance. I just start 4 containers and leave them for 1-2 minutes...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.