当前位置:   article > 正文

redis集群搭建报错-(error) CLUSTERDOWN The cluster is down

clusterdown the cluster is down

【README】

最近搭建一个redis集群,参考博文 (https://www.cnblogs.com/mafly/p/redis_cluster.html) 对集群配置后,master, slave 也启动起来,但无法插入数据;

 

【1】报错信息;

  1. [root@centos201 redis-cluster]# /usr/local/bin/redis-cli -c -h 192.168.163.201 -p 6379
  2. 192.168.163.201:6379> keys *
  3. 1) "k3"
  4. 2) "k2"
  5. 192.168.163.201:6379> set k4 v4
  6. (error) CLUSTERDOWN The cluster is down

【2】解决方法

step1) 找到创建集群的 文件 redis-trib.rb 并执行如下命令检车集群服务(ip+端口号)

  1. [root@centos201 bin]# ./redis-trib.rb check 192.168.163.201:6379
  2. Connecting to node 192.168.163.201:6379: OK
  3. Connecting to node 192.168.163.201:6381: OK
  4. Connecting to node 192.168.163.202:6380: OK
  5. Connecting to node 192.168.163.202:6381: OK
  6. Connecting to node 192.168.163.201:6380: OK
  7. Connecting to node 192.168.163.202:6379: OK
  8. *** WARNING: 192.168.163.202:6381 claims to be slave of unknown node ID e3f10671246e54c0ae60b7bf9f73efc9c60a2669.
  9. >>> Performing Cluster Check (using node 192.168.163.201:6379)
  10. M: 3faa9492e958d4f7d4e882d0c478d5445e3eafa8 192.168.163.201:6379
  11. slots:0-5460 (5461 slots) master
  12. 1 additional replica(s)
  13. S: fb2d63eef5286da9613ff252ea3e02bc5bf1714a 192.168.163.201:6381
  14. slots: (0 slots) slave
  15. replicates ec6f04c5cb3e3392b7787445440b7494ddff8923
  16. S: 2f71a7878b1ea9a773bc0c2b938a97b72fe99883 192.168.163.202:6380
  17. slots: (0 slots) slave
  18. replicates 3faa9492e958d4f7d4e882d0c478d5445e3eafa8
  19. S: 5a3d443feba5c67451b31ded6480bb5a70804b88 192.168.163.202:6381
  20. slots: (0 slots) slave
  21. replicates e3f10671246e54c0ae60b7bf9f73efc9c60a2669
  22. S: e2d2d0554c6051bb27b51aa5093ae66a85c4a16c 192.168.163.201:6380
  23. slots: (0 slots) slave
  24. replicates ec6f04c5cb3e3392b7787445440b7494ddff8923
  25. M: ec6f04c5cb3e3392b7787445440b7494ddff8923 192.168.163.202:6379
  26. slots:5461-10922 (5462 slots) master
  27. 2 additional replica(s)
  28. [OK] All nodes agree about slots configuration.
  29. >>> Check for open slots...
  30. >>> Check slots coverage...
  31. [ERR] Not all 16384 slots are covered by nodes.

step2)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/638403
推荐阅读
相关标签
  

闽ICP备14008679号