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

[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张图片

 

解决办法:

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_第2张图片

 

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

然后在连接 redis

[ERR] Node 192.168.0.102:7001 is not empty. Either the node already knows other nodes_第3张图片

 

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

 

你可能感兴趣的:(Java,redis,linux)