Invalid configuration for cluster creation

使用ruby启动redis集群时,报错:

>>> Creating cluster
*** ERROR: Invalid configuration for cluster creation.
*** Redis Cluster requires at least 3 master nodes.
*** This is not possible with 8 nodes and 192 replicas per node.
*** At least 579 nodes are required.

倒数第二行说192个replicas

说明我的格式写错了:

解决:

 

结果:

>>> Creating cluster
>>> Performing hash slots allocation on 9 nodes...
Using 3 masters:
192.168.2.136:7000
192.168.2.136:7001
192.168.2.136:7002
Adding replica 192.168.2.136:7003 to 192.168.2.136:7000
Adding replica 192.168.2.136:7004 to 192.168.2.136:7000
Adding replica 192.168.2.136:7005 to 192.168.2.136:7001
Adding replica 192.168.2.136:7006 to 192.168.2.136:7001
Adding replica 192.168.2.136:7007 to 192.168.2.136:7002
Adding replica 192.168.2.136:7008 to 192.168.2.136:7002
M: c96dfd3e7c3cc7d3b5baa7de11673c6425ca4ac1 192.168.2.136:7000
   slots:0-5460 (5461 slots) master
M: 387cfc158a49ca574be110d9cfaeb0199c5654cd 192.168.2.136:7001
   slots:5461-10922 (5462 slots) master
M: 222edffcf0a0c653ae7e11f70e383de260305fb0 192.168.2.136:7002
   slots:10923-16383 (5461 slots) master
S: 8504cfa04902cbdc02e374a96c0b225e08e7a640 192.168.2.136:7003
   replicates c96dfd3e7c3cc7d3b5baa7de11673c6425ca4ac1
S: 97d1b4c8f8138097bbd382da2cc3eb75d9f17e9b 192.168.2.136:7004
   replicates c96dfd3e7c3cc7d3b5baa7de11673c6425ca4ac1
S: 86e2a2492c8a8680f10312b3000ce68b7a6939c9 192.168.2.136:7005
   replicates 387cfc158a49ca574be110d9cfaeb0199c5654cd
S: 08d8e65dded077a824a3e25f42c76a0f184f0f8b 192.168.2.136:7006
   replicates 387cfc158a49ca574be110d9cfaeb0199c5654cd
S: f8ef6807963e42148e7408f5cc1ab96d43a111a5 192.168.2.136:7007
   replicates 222edffcf0a0c653ae7e11f70e383de260305fb0
S: 17c6ba37aaec16fe7aff8c867cf923f4b0cda45e 192.168.2.136:7008
   replicates 222edffcf0a0c653ae7e11f70e383de260305fb0
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.......
>>> Performing Cluster Check (using node 192.168.2.136:7000)
M: c96dfd3e7c3cc7d3b5baa7de11673c6425ca4ac1 192.168.2.136:7000
   slots:0-5460 (5461 slots) master
M: 387cfc158a49ca574be110d9cfaeb0199c5654cd 192.168.2.136:7001
   slots:5461-10922 (5462 slots) master
M: 222edffcf0a0c653ae7e11f70e383de260305fb0 192.168.2.136:7002
   slots:10923-16383 (5461 slots) master
M: 8504cfa04902cbdc02e374a96c0b225e08e7a640 192.168.2.136:7003
   slots: (0 slots) master
   replicates c96dfd3e7c3cc7d3b5baa7de11673c6425ca4ac1
M: 97d1b4c8f8138097bbd382da2cc3eb75d9f17e9b 192.168.2.136:7004
   slots: (0 slots) master
   replicates c96dfd3e7c3cc7d3b5baa7de11673c6425ca4ac1
M: 86e2a2492c8a8680f10312b3000ce68b7a6939c9 192.168.2.136:7005
   slots: (0 slots) master
   replicates 387cfc158a49ca574be110d9cfaeb0199c5654cd
M: 08d8e65dded077a824a3e25f42c76a0f184f0f8b 192.168.2.136:7006
   slots: (0 slots) master
   replicates 387cfc158a49ca574be110d9cfaeb0199c5654cd
M: f8ef6807963e42148e7408f5cc1ab96d43a111a5 192.168.2.136:7007
   slots: (0 slots) master
   replicates 222edffcf0a0c653ae7e11f70e383de260305fb0
M: 17c6ba37aaec16fe7aff8c867cf923f4b0cda45e 192.168.2.136:7008
   slots: (0 slots) master
   replicates 222edffcf0a0c653ae7e11f70e383de260305fb0
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.

忘了写个数。。。 

猜你喜欢

转载自blog.csdn.net/zhou_438/article/details/84712197