1、现象
Redis集群迁移数据,分配槽点时遇到以下报错:
[root@sink ~]# redis-cli --cluster rebalance --cluster-use-empty-masters 172.0.1.1:6379
Performing Cluster Check (using node 172.0.1.1:6379)
[ERR] Nodes don't agree about configuration!
Check for open slots…
[WARNING] Node 172.0.1.1:6379 has slots in importing state 306.
[WARNING] The following slots are open: 306.
Check slots coverage…
[OK] All 16384 slots covered.
*** Please fix your cluster problems before rebalancing
2、原因
迁移过程中,迁移得槽点数过多,或者有bigkey导致源节点堵塞,引发源主从切换,导致迁移失败
3、解决
登录 172.0.1.1:6379 此节点,使用redis命令取消slots迁移,然后重新修复下集群
# redis-cli -h 172.0.1.1 -p 6379
> cluster setslot 306 stable
# redis-cli --cluster fix 172.0.1.1:6379
- 本文固定链接: http://www.jiagou.cc/914/
- 转载请注明: 摘星怪 于 架构迷 发表