错误信息:
/usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis/client.rb:79:in `call': ERR Slot 15495 is already busy (Redis::CommandError)
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis.rb:2190:in `method_missing'
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis.rb:36:in `synchronize'
from /usr/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize'
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis.rb:36:in `synchronize'
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.0/lib/redis.rb:2189:in `method_missing'
from ./redis-trib.rb:205:in `flush_node_config'
from ./redis-trib.rb:657:in `flush_nodes_config'
from ./redis-trib.rb:656:in `each'
from ./redis-trib.rb:656:in `flush_nodes_config'
from ./redis-trib.rb:997:in `create_cluster_cmd'
from ./redis-trib.rb:1373:in `send'
from ./redis-trib.rb:1373
今天在一个虚拟机里面安装了6台redis服务打算搭建一个模拟redis集群,ip都是一样的,使用的是7001~7006端口,不过呢,前期检查都是正常的,当我运行rb,点击yes后就报了上面的错误了,查过网上不少资料,都没能解决这个问题,后来发现了,原因:
和nodes-conf文件有关,只要把全部的redis目录下的nodes-conf删除,打开redis.conf把# cluster-config-file nodes-6379.conf的#号放开,再次进行集群搭建就能成功了!
总结:nodes.conf文件不能设置成相同的名字