[ERR] Not all 16384 slots are covered by nodes.
redis集群開(kāi)不起來(lái),用redis-cli連接的時(shí)候出現(xiàn)如下錯(cuò)誤:
CLUSTERDOWN The cluster is down然后使用redis-trib.rb檢查:
./redis-trib.rb check 10.10.25.243:6379出現(xiàn)如下錯(cuò)誤:
Connecting to node 10.10.20.243:6379: OK
>>> Performing Cluster Check(using node 10.10.20.243:6379)
[OK] All nodes agree about slotsconfiguration.
>>> Check for open slots...
>>> Check slots coverage...
[ERR] Not all 16384 slots are covered by nodes.
因?yàn)槲抑挥幸粋€(gè)節(jié)點(diǎn),單節(jié)點(diǎn)集群,所以使用如下方法來(lái)修復(fù)節(jié)點(diǎn):
./redis-trib.rb fix 10.10.20.243:6379之后輸出如下:
....... >>> Covering slot 16276 with 10.10.25.243:6379 >>> Covering slot 16277 with 10.10.25.243:6379 >>> Covering slot 16278 with 10.10.25.243:6379 >>> Covering slot 16279 with 10.10.25.243:6379 >>> Covering slot 16280 with 10.10.25.243:6379 >>> Covering slot 16281 with 10.10.25.243:6379 >>> Covering slot 16282 with 10.10.25.243:6379 >>> Covering slot 16283 with 10.10.25.243:6379 >>> Covering slot 16284 with 10.10.25.243:6379 >>> Covering slot 16285 with 10.10.25.243:6379 >>> Covering slot 16286 with 10.10.25.243:6379 >>> Covering slot 16287 with 10.10.25.243:6379 >>> Covering slot 16288 with 10.10.25.243:6379 >>> Covering slot 16289 with 10.10.25.243:6379 >>> Covering slot 16290 with 10.10.25.243:6379 >>> Covering slot 16291 with 10.10.25.243:6379 >>> Covering slot 16292 with 10.10.25.243:6379 >>> Covering slot 16293 with 10.10.25.243:6379 >>> Covering slot 16294 with 10.10.25.243:6379 >>> Covering slot 16295 with 10.10.25.243:6379 >>> Covering slot 16296 with 10.10.25.243:6379 >>> Covering slot 16297 with 10.10.25.243:6379 >>> Covering slot 16298 with 10.10.25.243:6379 >>> Covering slot 16299 with 10.10.25.243:6379 >>> Covering slot 16300 with 10.10.25.243:6379 >>> Covering slot 16301 with 10.10.25.243:6379 >>> Covering slot 16302 with 10.10.25.243:6379 >>> Covering slot 16303 with 10.10.25.243:6379 >>> Covering slot 16304 with 10.10.25.243:6379 >>> Covering slot 16305 with 10.10.25.243:6379 >>> Covering slot 16306 with 10.10.25.243:6379 ........然后再檢查下集群的情況:
redis-trib.rb check 10.10.25.243:6379輸出如下:
>>> Performing Cluster Check (using node 10.10.25.243:6379) M: 4df1b649c1d0d08c2fa2a55e13d8d95c6d4f2b22 10.10.25.243:6379slots:0-16383 (16384 slots) master0 additional replica(s) [OK] All nodes agree about slots configuration. >>> Check for open slots... >>> Check slots coverage... [OK] All 16384 slots covered.檢查下集群信息:
root@nick-VirtualBox:/home/nick/software/redis-3.2.8# redis-cli -h 10.10.25.243 -p 6379 10.10.25.243:6379> cluster info cluster_state:ok cluster_slots_assigned:16384 cluster_slots_ok:16384 cluster_slots_pfail:0 cluster_slots_fail:0 cluster_known_nodes:1 cluster_size:1 cluster_current_epoch:0 cluster_my_epoch:0 cluster_stats_messages_sent:0 cluster_stats_messages_received:0?最后用redis-cli連下,正常了??梢赃B接,并且放入值和取出值也正常。
轉(zhuǎn)載于:https://www.cnblogs.com/toSeeMyDream/p/8716330.html
總結(jié)
以上是生活随笔為你收集整理的[ERR] Not all 16384 slots are covered by nodes.的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 【bzoj5084】hashit 广义
- 下一篇: Cookie与 Session使用详解