redis建立叢集時顯示錯誤: [ERR] Node xxx is not empty. Either the node already knows other no...
阿新 • • 發佈:2018-12-10
純手打,轉載請附上本文網址!!!
在redis叢集配置的最後一步,使用命令報錯[ERR] Node xxx is not empty. Either the node already knows other no...
redis-trib.rb create --replicas 1 192.168.56.102:7001 192.168.56.102:7002 192.168.56.103:7003 192.168.56.103:7004 192.168.56.104:7005 192.168.56.104:7006
這是由於上次redis叢集沒有配置成功,生成了每個節點的配置檔案和db的備份檔案,所以才會產生這個錯誤。
請按如下步驟操作:
1、刪除每個redis節點的備份檔案,資料庫檔案和叢集配置檔案
比如說我有7001~7006 6個節點,那麼每個節點中的appendonly.aof、dump.rdb、node_xxx.conf檔案都要被刪除
2、使用redis-cli -c -h -p登入每個redis節點,使用以下命令
flushdb
cluster reset
3、重啟所有的redis服務,再試試redis叢集連線命令,應該就沒問題了
redis-trib.rb create --replicas 1 192.168.56.102:7001 192.168.56.102:7002 192.168.56.103:7003 192.168.56.103:7004 192.168.56.104:7005 192.168.56.104:7006