rongxionga 2019-12-21
redis5.0以前为什么要用ruby?
redis5.0以后的版本
集群搭建,不需要借助ruby
https://blog.csdn.net/qq_25215821/article/details/100997778
新版命令:
src/redis-cli --cluster create --cluster-replicas 1
ip1:6379 ip2:6380 ip3:6381
ip1:6382 ip2:6383 ip3:6384
坑-1: https://www.liangzl.com/get-article-detail-40471.html
redis集群部署一直卡在 Waiting for the cluster to join ......
原因:redis集群总线端口为redis客户端端口加上10000,比如说你的redis 6379端口为客户端通讯端口,那么16379端口为集群总线端口
解决:添加redis 集群总线端口 和每个redis实例的通信端口
坑-2: https://www.jianshu.com/p/7720c922dd80
ERR] Node 192.168.10.204:6379 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.
解决:
首先关闭redis
其次如果之前redis有数据存在,flushall清空;
然后关闭redis删除 redis目录如下文件: dump.rdb,nodes-6379.conf
重启解决
5.0.2集群搭建: