redis集群新增节点:[ERR] Node is not empty

给集群新增节点时提示

./redis-trib.rb add-node 192.168.1.198:7006 192.168.1.198:7000


解决办法:

1、先杀掉新增redis节点服务

2、删除新增节点appendonly.aof、dump.rdb、nodes.conf再执行

3、还不行再删除所有redis节点的appendonly.aof、dump.rdb、nodes.conf,再执行

4、还不行清库再执行

[root@localhost ~]# cd /usr/local/redis-3.0.6/src/
[root@localhost src]# redis-cli -c -p 7000
127.0.0.1:7000>  flushdb
OK

我是进行到第2步就解决了


[root@localhost 7006]# cd /usr/local/redis-3.0.6/src/
#增加主节点操作192.168.1.198:7000是任意的旧节点
[root@localhost src]# ./redis-trib.rb add-node 192.168.1.198:7006 192.168.1.198:7000
>>> Adding node 192.168.1.198:7006 to cluster 192.168.1.198:7000
>>> Performing Cluster Check (using node 192.168.1.198:7000)
M: 2f70e9f2b4a06a846e46d7034a54e0fe6971beea 192.168.1.198:7000
   slots:5461-10922 (5462 slots) master
   1 additional replica(s)
S: 6c4f18b9e8729c3ab5d43b00b0bc1e2ee976f299 192.168.1.199:7004
   slots: (0 slots) slave
   replicates 26101db06b5c2d4431ca8308cf43d51f6939b4fc
S: ebb27bd0a48b67a4f4e0584be27c1c909944e935 192.168.1.199:7005
   slots: (0 slots) slave
   replicates 2f70e9f2b4a06a846e46d7034a54e0fe6971beea
M: e60f49920cf8620927b200b0001892d08067d065 192.168.1.198:7001
   slots:0-5460 (5461 slots) master
   1 additional replica(s)
S: 02f1958bd5032caca2fd47a56362c8d562d7e621 192.168.1.199:7003
   slots: (0 slots) slave
   replicates e60f49920cf8620927b200b0001892d08067d065
M: 26101db06b5c2d4431ca8308cf43d51f6939b4fc 192.168.1.198:7002
   slots:10923-16383 (5461 slots) master
   1 additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
>>> Send CLUSTER MEET to node 192.168.1.198:7006 to make it join the cluster.
[OK] New node added correctly.


你可能感兴趣的:(linux运维,redis)