redis-cli --cluster create 创建redis集群报错
报错如下
[ERR] Node 192.168.186.1:7001 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.
解决方法
-
ps -ef | grep redis #(查询所有redis进程)
-
kill -9 pid
- 将每个节点下rdb、nodes.conf文件删除
- 启动redis实例
- 重新执行脚本,成功执行;