redis集群服务器迁移报错[ERR] Node XXX.XXX.XXX.XX:7001 is not empty. Either the nodealready knows other nodes

redis迁移服务器报节点错误:
[ERR] Node XXX.XXX.XXX.XX:7001 is not empty. Either the nodealready knows other nodes (check with CLUSTER NODES) or contains some
解决方法如下:
1)检查新部署的服务器的ruby环境。
2)将每个节点下aof、rdb、nodes.conf本地备份文件删除;
3)172.168.63.201:7001> flushdb #清空当前数据库(可省略)
4)之后再执行脚本,成功执行;
redis集群服务器迁移报错[ERR] Node XXX.XXX.XXX.XX:7001 is not empty. Either the nodealready knows other nodes

dump.rdb文件:

dump.rdb是由Redis服务器自动生成的 默认情况下 每隔一段时间redis服务器程序会自动对数据库做一次遍历,把内存快照写在一个叫做“dump.rdb”的文件里,这个持久化机制叫做SNAPSHOT,即快照。有了SNAPSHOT后,如果服务器宕机,重新启动redis服务器程序时redis会自动加载dump.rdb,将数据库状态恢复到上一次做SNAPSHOT时的状态。

重新连接redis集群,成功

redis集群服务器迁移报错[ERR] Node XXX.XXX.XXX.XX:7001 is not empty. Either the nodealready knows other nodes