I can not create a cluster with two machines and 12 nodes

89 views
Skip to first unread message

Jorge Vinuesa González

unread,
Jun 18, 2015, 4:03:39 PM6/18/15
to redi...@googlegroups.com
I'm trying to make a cluster of redis (version 3.0.1) with two different machine

Server 1 [172.16.0.42] : 6 nodes on the ports 7000, 7001, 7002, 7003, 7004 and 7005.
Server 2 [172.16.0.43] : 6 nodes on the ports 7000, 7001, 7002, 7003, 7004 and 7005.

This is the directory structure on the two machines:

root@redis-02-pre:/etc/redis/cluster-test# ls -lthr
total 996K
-rwxr-xr-x 1 root root 956K Jun  2 11:48 redis-server
drwxr-xr-x 2 root root 4.0K Jun 18 17:30 7002
drwxr-xr-x 2 root root 4.0K Jun 18 17:30 7005
drwxr-xr-x 2 root root 4.0K Jun 18 17:30 7001
drwxr-xr-x 2 root root 4.0K Jun 18 17:30 7000
drwxr-xr-x 2 root root 4.0K Jun 18 17:30 7003
drwxr-xr-x 2 root root 4.0K Jun 18 17:30 7004

Example node 7000
root@redis-02-pre:/etc/redis/cluster-test/7000# ls -lthr
total 20K
-rw-r--r-- 1 root root 196 Jun 18 16:53 redis.conf

root@redis-02-pre:/etc/redis/cluster-test/7000# cat redis.conf
port 7000
cluster-enabled yes
cluster-config-file /etc/redis/cluster-test/7000/nodes.conf
cluster-node-timeout 5000
appendonly yes
# Generated by CONFIG REWRITE
dir "/etc/redis/cluster-test/7000"

NOTE: Other files change the port 700X

root@redis-02-pre:/etc/redis/cluster-test# apt-cache policy ruby
ruby:
  Installed: 1:1.9.3.4
  Candidate: 1:1.9.3.4
  Version table:
 *** 1:1.9.3.4 0
        500 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

root@redis-02-pre:/etc/redis/cluster-test/7000# gem list

*** LOCAL GEMS ***
redis (3.2.1)


Now, I try to create the cluster but .....

root@redis-02-pre:/etc/redis/cluster-test# /opt/tuguu/deploy/redis/src/redis-trib.rb create --replicas 1 172.16.0.42:7000 172.16.0.42:7001 172.16.0.42:7002 172.16.0.42:7003 172.16.0.42:7004 172.16.0.42:7005 172.16.0.43:7000 172.16.0.43:7001 172.16.0.43:7002 172.16.0.43:7003 172.16.0.43:7004 172.16.0.43:7005
>>> Creating cluster
Connecting to node 172.16.0.42:7000: OK
Connecting to node 172.16.0.42:7001: OK
Connecting to node 172.16.0.42:7002: OK
Connecting to node 172.16.0.42:7003: OK
Connecting to node 172.16.0.42:7004: OK
Connecting to node 172.16.0.42:7005: OK
Connecting to node 172.16.0.43:7000: OK
Connecting to node 172.16.0.43:7001: OK
Connecting to node 172.16.0.43:7002: OK
Connecting to node 172.16.0.43:7003: OK
Connecting to node 172.16.0.43:7004: OK
Connecting to node 172.16.0.43:7005: OK
>>> Performing hash slots allocation on 12 nodes...
Using 6 masters:
172.16.0.42:7000
172.16.0.43:7000
172.16.0.42:7001
172.16.0.43:7001
172.16.0.42:7002
172.16.0.43:7002
Adding replica 172.16.0.43:7003 to 172.16.0.42:7000
Adding replica 172.16.0.42:7003 to 172.16.0.43:7000
Adding replica 172.16.0.43:7004 to 172.16.0.42:7001
Adding replica 172.16.0.42:7004 to 172.16.0.43:7001
Adding replica 172.16.0.43:7005 to 172.16.0.42:7002
Adding replica 172.16.0.42:7005 to 172.16.0.43:7002
M: 76063f8570fc197d24e9ca3ebc4d9982a3e8f93e 172.16.0.42:7000
   slots:0-2730 (2731 slots) master
M: 27d663de2f145a86a2a7131c1a50c739275005d3 172.16.0.42:7001
   slots:5461-8191 (2731 slots) master
M: 26ffd7d8d849df7fcadbd0d84bd5eade74a9b69a 172.16.0.42:7002
   slots:10923-13652 (2730 slots) master
S: ab1813f538ec7c66f7a4057e03526b0ac3043398 172.16.0.42:7003
   replicates 9eed4acd36e1c5f2885acc2f696372b8f448290a
S: 1088b09ddec4508ea99ed5a69eb93da7a6cd88a6 172.16.0.42:7004
   replicates f276bf2f8c8b06051c48a9380954a2b681fd7951
S: b2236a942224d204a212b87edd837269aa76ba8e 172.16.0.42:7005
   replicates acc4505bbdffe72a5d11835157cb52cc0487fa51
M: 9eed4acd36e1c5f2885acc2f696372b8f448290a 172.16.0.43:7000
   slots:2731-5460 (2730 slots) master
M: f276bf2f8c8b06051c48a9380954a2b681fd7951 172.16.0.43:7001
   slots:8192-10922 (2731 slots) master
M: acc4505bbdffe72a5d11835157cb52cc0487fa51 172.16.0.43:7002
   slots:13653-16383 (2731 slots) master
S: ab470987311065b71599f4b3e05a5dfe51844a6d 172.16.0.43:7003
   replicates 76063f8570fc197d24e9ca3ebc4d9982a3e8f93e
S: c53fd80683f617f4fa43060f3cd5e184dbec95cf 172.16.0.43:7004
   replicates 27d663de2f145a86a2a7131c1a50c739275005d3
S: 6448cb53108163b041d7fa24461255d474c31745 172.16.0.43:7005
   replicates 26ffd7d8d849df7fcadbd0d84bd5eade74a9b69a
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join.....................................................................................................................................................................................................

and the dots keep growing.

Akmal Abbasov

unread,
Jun 27, 2015, 8:30:06 PM6/27/15
to redi...@googlegroups.com
Hi, were you able to find a solution?
Thank you.
Reply all
Reply to author
Forward
0 new messages