About Centos Redis clustering

210 views
Skip to first unread message

Cihan Tunali

unread,
Apr 17, 2014, 4:15:02 AM4/17/14
to redi...@googlegroups.com
Hello,

I am newbie at linux world and i am trying to cluster Redis. I have two physical servers and in them i have two Redis server configuration running on different ports. So my configuration is:

- 10.12.6.8:7001 (server A)
- 10.12.6.8:7002 (server A)
- 10.12.6.9:7001 (server B)
- 10.12.6.9:7002 (server B)

And my configuration files are attached.All config files stored at /etc/redis/. So when i try to cluster them it stuck at " Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join... " . 
When i break the process it said "^C./redis-trib.rb:505:in `sleep': Interrupt
        from ./redis-trib.rb:505:in `wait_cluster_join'
        from ./redis-trib.rb:840:in `create_cluster_cmd'
        from ./redis-trib.rb:1056:in `<main>'
I clustered one server with out any problem whlie 3 Redis server running on it, but now i could not find the problem. Either i can not break the cluster configuration :) Can you help me please? Thanks. 

[root@DEVSRV-CENTOS01 src]# ./redis-trib.rb create 10.12.6.8:7001 10.12.6.8:7002 10.12.6.9:7001 10.12.6.9:7002
>>> Creating cluster
Connecting to node 10.12.6.8:7001: OK
Connecting to node 10.12.6.8:7002: OK
Connecting to node 10.12.6.9:7001: OK
Connecting to node 10.12.6.9:7002: OK
>>> Performing hash slots allocation on 4 nodes...
Using 4 masters:
M: e253ccae71ba7400547d545d3763bcde6939091d 10.12.6.8:7001
   slots:0-4095 (4096 slots) master
M: cf2deb7c5f19f0827453b2c3b371eef0be6dac5d 10.12.6.8:7002
   slots:8192-12287 (4096 slots) master
M: 9a6ca32912edc0ea4aa364ea4fab21a33e747505 10.12.6.9:7001
   slots:4096-8191 (4096 slots) master
M: 4481361fe56b023a5660754f9895b12f517fecb9 10.12.6.9:7002
   slots:12288-16383 (4096 slots) master
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join..............................................................................................................................Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join...............................................................................................................................................................................................................................................^C./redis-trib.rb:505:in `sleep': Interrupt
        from ./redis-trib.rb:505:in `wait_cluster_join'
        from ./redis-trib.rb:840:in `create_cluster_cmd'
        from ./redis-trib.rb:1056:in `<main>'


Aredis.conf
Aredis2.conf
Bredis.conf
Bredis2.conf

Jan-Erik Rediger

unread,
Apr 17, 2014, 5:32:57 AM4/17/14
to redi...@googlegroups.com
Anything in the logs?
On one server you should have on directory per instance, as each
instance will write a nodes.conf containing info about the other nodes.
So make sure you specify a correct dir and that this directory is
writable.
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

> daemonize yes
> pidfile /var/run/redis.pid
> tcp-backlog 511
> tcp-keepalive 0
> loglevel notice
> logfile /var/log/redis.log
> databases 16
> save 900 1
> save 300 10
> save 60 10000
> stop-writes-on-bgsave-error yes
> rdbcompression yes
> rdbchecksum yes
> dbfilename dump.rdb
> slave-serve-stale-data yes
> slave-read-only yes
> repl-disable-tcp-nodelay no
> slave-priority 100
> appendfilename "appendonly.aof"
> appendfsync everysec
> no-appendfsync-on-rewrite no
> auto-aof-rewrite-percentage 100
> auto-aof-rewrite-min-size 64mb
> lua-time-limit 5000
> slowlog-log-slower-than 10000
> slowlog-max-len 128
> notify-keyspace-events ""
> hash-max-ziplist-entries 512
> hash-max-ziplist-value 64
> list-max-ziplist-entries 512
> list-max-ziplist-value 64
> zset-max-ziplist-entries 128
> zset-max-ziplist-value 64
> activerehashing yes
> client-output-buffer-limit normal 0 0 0
> client-output-buffer-limit slave 256mb 64mb 60
> client-output-buffer-limit pubsub 32mb 8mb 60
> hz 10
> aof-rewrite-incremental-fsync yes
>
> port 7001
> cluster-enabled yes
> cluster-config-file nodes.conf
> cluster-node-timeout 5000
> appendonly yes

> daemonize yes
> pidfile /var/run/redis2.pid
> tcp-backlog 511
> tcp-keepalive 0
> loglevel notice
> logfile /var/log/redis2.log
> databases 16
> save 900 1
> save 300 10
> save 60 10000
> stop-writes-on-bgsave-error yes
> rdbcompression yes
> rdbchecksum yes
> dbfilename dump.rdb
> slave-serve-stale-data yes
> slave-read-only yes
> repl-disable-tcp-nodelay no
> slave-priority 100
> appendfilename "appendonly2.aof"
> appendfsync everysec
> no-appendfsync-on-rewrite no
> auto-aof-rewrite-percentage 100
> auto-aof-rewrite-min-size 64mb
> lua-time-limit 5000
> slowlog-log-slower-than 10000
> slowlog-max-len 128
> notify-keyspace-events ""
> hash-max-ziplist-entries 512
> hash-max-ziplist-value 64
> list-max-ziplist-entries 512
> list-max-ziplist-value 64
> zset-max-ziplist-entries 128
> zset-max-ziplist-value 64
> activerehashing yes
> client-output-buffer-limit normal 0 0 0
> client-output-buffer-limit slave 256mb 64mb 60
> client-output-buffer-limit pubsub 32mb 8mb 60
> hz 10
> aof-rewrite-incremental-fsync yes
>
> port 7002
> cluster-enabled yes
> cluster-config-file nodes2.conf
> cluster-node-timeout 5000
> appendonly yes

> daemonize yes
> pidfile /var/run/redis.pid
> tcp-backlog 511
> tcp-keepalive 0
> loglevel notice
> logfile /var/log/redis.log
> databases 16
> save 900 1
> save 300 10
> save 60 10000
> stop-writes-on-bgsave-error yes
> rdbcompression yes
> rdbchecksum yes
> dbfilename dump.rdb
> slave-serve-stale-data yes
> slave-read-only yes
> repl-disable-tcp-nodelay no
> slave-priority 100
> appendfilename "appendonly.aof"
> appendfsync everysec
> no-appendfsync-on-rewrite no
> auto-aof-rewrite-percentage 100
> auto-aof-rewrite-min-size 64mb
> lua-time-limit 5000
> slowlog-log-slower-than 10000
> slowlog-max-len 128
> notify-keyspace-events ""
> hash-max-ziplist-entries 512
> hash-max-ziplist-value 64
> list-max-ziplist-entries 512
> list-max-ziplist-value 64
> zset-max-ziplist-entries 128
> zset-max-ziplist-value 64
> activerehashing yes
> client-output-buffer-limit normal 0 0 0
> client-output-buffer-limit slave 256mb 64mb 60
> client-output-buffer-limit pubsub 32mb 8mb 60
> hz 10
> aof-rewrite-incremental-fsync yes
>
> port 7001
> cluster-enabled yes
> cluster-config-file nodes.conf
> cluster-node-timeout 5000
> appendonly yes

> daemonize yes
> pidfile /var/run/redis2.pid
> tcp-backlog 511
> tcp-keepalive 0
> loglevel notice
> logfile /var/log/redis2.log
> databases 16
> save 900 1
> save 300 10
> save 60 10000
> stop-writes-on-bgsave-error yes
> rdbcompression yes
> rdbchecksum yes
> dbfilename dump.rdb
> slave-serve-stale-data yes
> slave-read-only yes
> repl-disable-tcp-nodelay no
> slave-priority 100
> appendfilename "appendonly2.aof"
> appendfsync everysec
> no-appendfsync-on-rewrite no
> auto-aof-rewrite-percentage 100
> auto-aof-rewrite-min-size 64mb
> lua-time-limit 5000
> slowlog-log-slower-than 10000
> slowlog-max-len 128
> notify-keyspace-events ""
> hash-max-ziplist-entries 512
> hash-max-ziplist-value 64
> list-max-ziplist-entries 512
> list-max-ziplist-value 64
> zset-max-ziplist-entries 128
> zset-max-ziplist-value 64
> activerehashing yes
> client-output-buffer-limit normal 0 0 0
> client-output-buffer-limit slave 256mb 64mb 60
> client-output-buffer-limit pubsub 32mb 8mb 60
> hz 10
> aof-rewrite-incremental-fsync yes
>
> port 7002
> cluster-enabled yes
> cluster-config-file nodes2.conf
> cluster-node-timeout 5000
> appendonly yes

Cihan Tunali

unread,
Apr 18, 2014, 3:34:59 AM4/18/14
to redi...@googlegroups.com
Hello,

Ok, I need to delete current wrong cluster. Is there any way to do that? Thanks.

CT

17 Nisan 2014 Perşembe 12:32:57 UTC+3 tarihinde Jan-Erik Rediger yazdı:

Cihan Tunali

unread,
Apr 18, 2014, 11:05:29 AM4/18/14
to redi...@googlegroups.com
Last situation;

I re-install everything, so;

- Firewall disabled all hosts
- all nodes.conf files has 777 right (/nodes.conf and /root/nodes.conf)
- all redis.conf files has different ports
- all redis instances has different directoryies (/etc/redis, /etc/redis/6380,/etc/redis/6381,/etc/redis/6382,/etc/redis/6383,/etc/redis/6384)

But still i could not managed to cluster them :( Any ideas?
-------------------------------------------------------------
[root@DEVSRV-CENTOS01 src]# ./redis-trib.rb create 10.12.6.8:6379 10.12.6.8:6380 10.12.6.8:6381 10.12.6.9:6382 10.12.6.9:6383 10.12.6.9:6384
>>> Creating cluster
Connecting to node 10.12.6.8:6379: OK
Connecting to node 10.12.6.8:6380: OK
Connecting to node 10.12.6.8:6381: OK
Connecting to node 10.12.6.9:6382: OK
Connecting to node 10.12.6.9:6383: OK
Connecting to node 10.12.6.9:6384: OK
>>> Performing hash slots allocation on 6 nodes...
Using 6 masters:
M: 191ccd8aa0fb09d0644ee1ab91bd71c24221a857 10.12.6.8:6379
   slots:0-2729 (2730 slots) master
M: 169131f9ef63eb3eb26fd3f59b3a49a958c595f7 10.12.6.8:6380
   slots:5460-8189 (2730 slots) master
M: 169131f9ef63eb3eb26fd3f59b3a49a958c595f7 10.12.6.8:6381
   slots:10920-13649 (2730 slots) master
M: 3aa2caf7933463648b0b4d18eb04a7ad2a68504b 10.12.6.9:6382
   slots:2730-5459 (2730 slots) master
M: 8b076e94d11ae15780ebe8b166fc81e2f9ca9ac1 10.12.6.9:6383
   slots:8190-10919 (2730 slots) master
M: 8b076e94d11ae15780ebe8b166fc81e2f9ca9ac1 10.12.6.9:6384
   slots:13650-16383 (2734 slots) master
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join................................................................................................................^C./redis-trib.rb:505:in `sleep': Interrupt
        from ./redis-trib.rb:505:in `wait_cluster_join'
        from ./redis-trib.rb:840:in `create_cluster_cmd'
        from ./redis-trib.rb:1056:in `<main>'
-----------------------------------------------------------------------------------------------------------

Ayn comment wil be pleased. Thanks.

CT

18 Nisan 2014 Cuma 10:34:59 UTC+3 tarihinde Cihan Tunali yazdı:
HostB_under_etc-redis6384-redis.conf
HostB_under_etc-redis6383-redis.conf
HostB_under_etc-redis-redis.conf
HostB_under_root-nodes.conf
HostA_nodes.conf
HostA_under_etc-redis-6380-redis.conf
HostA_under_etc-redis-6381-redis.conf
HostA_under_etc-redis-redis.conf
HostA_under_root-nodes.conf
HostB_nodes.conf
Reply all
Reply to author
Forward
0 new messages