title: redis安装可能遇到的错误
createTime: 2022-01-04T20:47:06+08:00
updateTime: 2022-01-04T20:47:06+08:00
permalink: /pages/1b76b7/
categories:
- database
- redis
tags: - gem source
1
1表示没有gem源
5.安装http://rubygems.org
gem sources -a https://rubygems.org
6. 重新安装redis-3.0.0.gem
gem install redis
1 
17. 安装完成
1[参考网址](https://blog.csdn.net/j15533415886/article/details/88081772)
2
3## redis 集群:CLUSTERDOWN The cluster is down
11.执行192.168.200.130:7001> set name jia
22.报错: (error)CLUSTERDOWN The cluster is down
33.修复集群节点 ./redis-trib.rb fix 127.0.0.1:7000
1
2## redis:CLUSTER cluster is down 的解决方案
3+ 关键词:
4+ CLUSTER cluster is down
5+ [ERR] Not all 16384 slots are covered by nodes.
- ./redis-cli -h *** -p 7001 -c
- 连接成功,但是设置值的时候提示:CLUSTER cluster is down,这个时候显示集群挂了。
- 集群出了问题,那么检测一下问题
- 检查集群状态
- ./redis-trib.rb check 127.0.0.1:7001
6.注意:这个时候需要用到的是./redis-trib.rb,需要移动到该文件夹位置之下。IP地址打上自己的,端口选择其中一个即可,redis似乎会检测集群的其余节点。
7.检测结果: [ERR] Not all 16384 slots are covered by nodes.
8.结果说明:有节点出了问题。 - 修复命令:
10 ./redis-trib.rb fix 173.168.68.221:7001
1[设置值的时候提示:CLUSTER cluster is down:CLUSTER cluster is down 的解决方案](https://blog.csdn.net/qq_35066345/article/details/79833609)
2
3
4## cluster meet解决CLUSTERDOWN The cluster is down
5+ 如果上述两种方法都解决不了CLUSTERDOWN The cluster is down
6那么使用Cluster meet来解决
7+ 在redis安装目录的src下执行下列命令去cluster meet 另一个端口为7001的节点
8+ ./redis-cli -c -h 192.168.242.134 -p 6379 cluster meet 192.168.242.134 7001
9+ 使用./redis-trib.rb check 192.168.242.134:6379重新check发现正常了
10[cluster meet解决CLUSTERDOWN The cluster is down](https://www.cnblogs.com/guxiong/p/6266890.html)
11
12## redis-trib.rb create创建集群报错
13+ [ERR] Node 172.168.63.202:7001 is not empty. Either the nodealready knows other nodes (check with CLUSTER NODES) or contains some
- 将每个节点下aof、rdb、nodes.conf本地备份文件删除;
- 172.168.63.201:7001> flushdb #清空当前数据库(可省略)
- 之后再执行脚本,成功执行;
1
2
3[./redis-trib.rb create --replicas命令创建集群报错](https://www.cnblogs.com/huxinga/p/6644226.html)