[ERR] Node 192.168.0.102:7001 is not empty. Either the node already knows other nodes

时间:2024-04-13 17:05:01

[ERR] Node 192.168.0.102:7001 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.

redis-cli  --cluster create 192.168.0.102:7001 192.168.0.107:7001 192.168.0.108:7001 192.168.0.102:7002 192.168.0.107:7002 192.168.0.108:7002 --cluster-replicas 1
 

启动redis 集群的时候出现了这个问题 :

[ERR] Node 192.168.0.102:7001 is not empty. Either the node already knows other nodes

 

解决办法:

1) 先将redis 进程干掉   ps -ef | grep redis    kill pid

2) 将每个节点下aof、rdb、nodes.conf本地备份文件删除,redis.conf   appendfilename ; 

3) 之后再执行脚本,成功执行;

4) 这种情况可能发生在每次非正常关闭redis集群的时候

[ERR] Node 192.168.0.102:7001 is not empty. Either the node already knows other nodes

 

出现上图所示说明已经启动成功了,redis 集群创建成功

然后在连接 redis

[ERR] Node 192.168.0.102:7001 is not empty. Either the node already knows other nodes

 

Another.Redis.Desktop.Manager 这款客户端工具还比较好用,推荐给大家