1. 程式人生 > >redis 叢集 建立報錯 [ERR] Node is not empty. Either the node already knows other nodes (check with C

redis 叢集 建立報錯 [ERR] Node is not empty. Either the node already knows other nodes (check with C

[[email protected] src]# ./redis-trib.rb add-node --slave --master-id4f6424e47a2275d2b7696bfbf8588e8c4c3a5b95 172.168.63.202:7001172.168.63.202:7000

......

[OK] All nodes agree about slotsconfiguration.

>>> Check for open slots...

>>> Check slots coverage...

[OK] All 16384 slots covered.

Connecting to node 172.168.63.202:7001: OK

[ERR] Node 172.168.63.202:7001 is not empty. Either the nodealready knows other nodes (check with CLUSTER NODES) or contains some key in database 0.


解決方法:

1)、將需要新增的節點aofrdb等本地備份檔案刪除;

2)、同時將新Node的叢集配置檔案刪除,即:刪除你redis.conf裡面cluster-config-file所在的檔案;

3)、再次新增新節點如果還是報錯,則登入新

Node,./redis-cli–h x –p資料庫進行清除:

172.168.63.201:7001>  flushdb      #清空當前資料庫