[ERR] Node is not empty. Either the node already knows other nodes (check with C
2016-07-29 10:12
561 查看
最近在给公司网管系统redis集群环境添加节点时候遇到一个问题,提示新增的Node不为空:
[root@node00 src]# ./redis-trib.rb add-node --slave --master-id4f6424e47a2275d2b7696bfbf8588e8c4c3a5b95 172.168.63.202:7001172.168.63.202:7000
......
[OK] All nodes agree about slotsconfiguration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
Connecting to node 172.168.63.202:7001: OK
[ERR] Node 172.168.63.202:7001 is not empty. Either the nodealready knows other nodes (check with CLUSTER NODES) or contains somekey in database 0.
解决方法:
1)、将需要新增的节点下aof、rdb等本地备份文件删除;
2)、同时将新Node的集群配置文件删除,即:删除你redis.conf里面cluster-config-file所在的文件;
3)、再次添加新节点如果还是报错,则登录新Node,./redis-cli–h x –p对数据库进行清除:
172.168.63.201:7001> flushdb #清空当前数据库
通过以上解决方法中的1)、2)或者3)之后再执行脚本,成功执行;
[root@node00 src]# ./redis-trib.rb add-node --slave --master-id4f6424e47a2275d2b7696bfbf8588e8c4c3a5b95 172.168.63.202:7001172.168.63.202:7000
......
[OK] All nodes agree about slotsconfiguration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
Connecting to node 172.168.63.202:7001: OK
[ERR] Node 172.168.63.202:7001 is not empty. Either the nodealready knows other nodes (check with CLUSTER NODES) or contains somekey in database 0.
解决方法:
1)、将需要新增的节点下aof、rdb等本地备份文件删除;
2)、同时将新Node的集群配置文件删除,即:删除你redis.conf里面cluster-config-file所在的文件;
3)、再次添加新节点如果还是报错,则登录新Node,./redis-cli–h x –p对数据库进行清除:
172.168.63.201:7001> flushdb #清空当前数据库
通过以上解决方法中的1)、2)或者3)之后再执行脚本,成功执行;
相关文章推荐
- hdu4587 TWO NODES 求割点
- 搭建SolrCloud时,使用HostName作为Node时需要注意
- DOMchildNOdes
- crossplatform---Nodejs in Visual Studio Code 10.IISNode
- crossplatform---Nodejs in Visual Studio Code 08.IIS
- crossplatform---Nodejs in Visual Studio Code 06.新建Module
- crossplatform---Nodejs in Visual Studio Code 05.Swig+Bootstrap
- crossplaform---Nodejs in Visual Studio Code 04.Swig模版
- crossplatform---Nodejs in Visual Studio Code 03.学习Express
- crossplatform---Nodejs in Visual Studio Code 02.学习Nodejs
- crossplatform---Nodejs in Visual Studio Code 01.简单介绍Nodejs
- corssplatform---NodeJS基础
- 237. Delete Node in a Linked List
- hadoop datanode 连接namenode的问题
- 互联网我来了 -- 1. Node.js 来打个招呼
- [LeetCode] Swap Nodes in Pairs
- 将使用npm管理的node.js项目部署到vCloudLabs
- 从文件上传开始, 进入node.js的世界
- 用node.js建博客(一) - node.js安装及Express框架简介
- 用node.js建博客(四) - express中的404处理