1.錯誤
(error)CLUSTERDOWN The cluster is down
2.問題表現
Java項目使用redis集群時報錯,
HTTP Status 500 - Could not get a resource from the pool
查看redis集群啟動情況: ps -ef | grep "redis",如圖
在操作redis集群寫入數據時報錯:
(error)CLUSTERDOWN The cluster is down
3.解決辦法
3-1進入redis安裝目錄
cd /opt/redis-3.0.1/src
3-2修復集群節點,如7000,需要修復全部集群節點
./redis-trib.rb fix 127.0.0.1:7000
3-3測試
redis-cli -c -p 7000
set test ok