Repository navigation
Description
This is what I get when I stop the master.
[8465] 10 Apr 22:05:43.433 * Caching the disconnected master state.
[8465] 10 Apr 22:05:43.769 * Connecting to MASTER...
[8465] 10 Apr 22:05:43.769 * MASTER <-> SLAVE sync started
[8465] 10 Apr 22:05:43.769 # Error condition on socket for SYNC: Connection refused
[8465] 10 Apr 22:05:44.771 * Connecting to MASTER...
[8465] 10 Apr 22:05:44.771 * MASTER <-> SLAVE sync started
[8465] 10 Apr 22:05:44.772 # Error condition on socket for SYNC: Connection refused
[8465] 10 Apr 22:05:45.774 * Connecting to MASTER...
[8465] 10 Apr 22:05:45.775 * MASTER <-> SLAVE sync started
[8465] 10 Apr 22:05:45.775 # Error condition on socket for SYNC: Connection refused
[8465] 10 Apr 22:05:46.777 * Connecting to MASTER...
[8465] 10 Apr 22:05:46.777 * MASTER <-> SLAVE sync started
[8465] 10 Apr 22:05:46.777 # Error condition on socket for SYNC: Connection refused
[8465] 10 Apr 22:05:47.779 * Connecting to MASTER...
[8465] 10 Apr 22:05:47.780 * MASTER <-> SLAVE sync started
[8465] 10 Apr 22:05:47.780 # Cluster state changed: fail
[8465] 10 Apr 22:05:47.780 # Error condition on socket for SYNC: Connection refused
[8465] 10 Apr 22:05:48.782 * Connecting to MASTER...
[8465] 10 Apr 22:05:48.783 * MASTER <-> SLAVE sync started
[8465] 10 Apr 22:05:48.783 # Error condition on socket for SYNC: Connection refused
...and it continues like this.
This is a test using localhost. I've tried to use one maser and one slave and one master and two slaves, but the output is the same.
This is my redis.conf file:
port 1234
cluster-enabled yes
cluster-config-file nodes1.conf
cluster-node-timeout 5
appendonly yes
The other redis.conf files are just like this, but the port and the config-cluster-file are different.
This is the cluster nodes output on the slave before the failure:
redis 127.0.0.1:1235> cluster nodes
ffc6464df68df47864fde0ea9eb4d9d9191dc1b1 127.0.0.1:1234 master - 1365624792 1365624792 connected 0-16383
c785f0d5f4752aab965f39c09d66cb239d51772f 127.0.0.1:1236 slave ffc6464df68df47864fde0ea9eb4d9d9191dc1b1 1365624793 1365624793 connected
b37d87bb080a9021bc265f99c9f114005d8ef0f2 :0 myself,slave ffc6464df68df47864fde0ea9eb4d9d9191dc1b1 0 1365624792 connected
This is the cluster nodes output on the slave after the failure:
redis 127.0.0.1:1235> cluster nodes
ffc6464df68df47864fde0ea9eb4d9d9191dc1b1 127.0.0.1:1234 master,fail? - 1365624843 1365624807 disconnected 0-16383
c785f0d5f4752aab965f39c09d66cb239d51772f 127.0.0.1:1236 slave ffc6464df68df47864fde0ea9eb4d9d9191dc1b1 1365624843 1365624843 connected
b37d87bb080a9021bc265f99c9f114005d8ef0f2 :0 myself,slave ffc6464df68df47864fde0ea9eb4d9d9191dc1b1 0 1365624840 connected
Activity
antirez commentedon Apr 10, 2013
Hello, for the failover to work, you need to have at least three masters. This is the minimum required, because master consensus is needed both for failure detection and promotion authorization. Thank for your experiments with Redis Cluster! That's very appreciated.
frafra commentedon Apr 10, 2013
I'm so sorry, I didn't got this point :) I hope that this issue could help someone else.
Thank you for your work! :)
antirez commentedon Apr 10, 2013
It was impossible for you to know that because there is no documentation at all... :-) Sorry for that!
antirez commentedon May 18, 2013
Still not clear, maybe but it's a dangerous setup.
Cheers,
Salvatore
atul86244 commentedon Jul 1, 2013
I am trying to setup a redis cluster on two centos VMs I created on my windows 7 PC. I keep getting below error:
When I try from node 1:
[root@localhost src]# ./redis-trib.rb create 127.0.0.1:6380 127.0.0.1:6379
Squashed 'deps/hiredis/' changes from f8de9a4bd..b6a052fe0
Merge pull request redis#1047 from Cyan4973/test_alias