You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
redis-trib: check no slot is assigned when creating a new cluster #1085
root@host1:/usr/local/src/redis# ./src/redis-trib.rb create host1.domain.com:6379 host2.domain.com:6379
>>> Creating cluster
Connecting to node host1.domain.com:6379: OK
Connecting to node host2.domain.com:6379: OK
>>> Performing hash slots allocation on 2 nodes...
M: 9c60c6684f898e2a0a7782d44ec90632cc0c3b73 host1.domain.com:6379
slots:0-8191 (8192 slots) master
M: 2f5649e3133f75b581d7250708796b2899eedbd2 host2.domain.com:6379
slots:8192-16383 (8192 slots) master
Can I set the above configuration? (type 'yes' to accept): yes
/var/lib/gems/1.8/gems/redis-3.0.4/lib/redis/client.rb:85:in `call': ERR Slot 7185 is already busy (Redis::CommandError) from /var/lib/gems/1.8/gems/redis-3.0.4/lib/redis.rb:2240:in `method_missing' from /var/lib/gems/1.8/gems/redis-3.0.4/lib/redis.rb:36:in `synchronize' from /usr/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize'
from /var/lib/gems/1.8/gems/redis-3.0.4/lib/redis.rb:36:in `synchronize' from /var/lib/gems/1.8/gems/redis-3.0.4/lib/redis.rb:2239:in `method_missing' from ./src/redis-trib.rb:184:in `flush_node_config' from ./src/redis-trib.rb:476:in `flush_nodes_config'
from ./src/redis-trib.rb:475:in `each' from ./src/redis-trib.rb:475:in `flush_nodes_config' from ./src/redis-trib.rb:684:in `create_cluster_cmd' from ./src/redis-trib.rb:755:in `send'
from ./src/redis-trib.rb:755
Hello! It looks like you tried to create a cluster with a node that was already partially used in some way. However redis-trib should check better that this is not the case before proceeding, it currently only tests that the nodes are empty AFAIK, but they may have assigned slots like in that case.
Hi,
I had the same experience in setting up a cluster where one node still had some testing data in it (SET foo "bar" or something similar). Would be great to have an automated "flushall"-call on all nodes. If the data node is the n-th node, the rest of the nodes already got some config written to them. Maybe an explicit option, so nobody kills their data. As I wasn't sure if the configs would be the same always, I was going for sure and deleted all before rerunning the script.
Performing hash slots allocation on 2 nodes...
M: 1e93a0ccde04d9fba0403917e622e82a891b2137 10.1.0.164:1234
slots:0-8191 (8192 slots) master
M: 09dc42131bc1910bc6efa1cb2ac38c5ae159e02b 10.1.2.104:1112
slots:8192-16383 (8192 slots) master
Can I set the above configuration? (type 'yes' to accept): yes
/Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis/client.rb:85:in call': ERR Slot 7185 is already busy (Redis::CommandError) from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:2240:inmethod_missing'
from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:36:in synchronize' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:inmon_synchronize'
from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:36:in synchronize' from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:2239:inmethod_missing'
from ./redis-trib.rb:184:in flush_node_config' from ./redis-trib.rb:476:inflush_nodes_config'
from ./redis-trib.rb:475:in each' from ./redis-trib.rb:475:inflush_nodes_config'
from ./redis-trib.rb:684:in create_cluster_cmd' from ./redis-trib.rb:755:insend'
from ./redis-trib.rb:755
How to solve this. I tried with deleting node.conf file.
Performing hash slots allocation on 2 nodes...
M: ad9135944fc33a65c5df8e71e1a99fbe9891605e 10.1.0.164:1234
slots:0-8191 (8192 slots) master
M: e4efb4f928de29ed8c3f6aeb8a00b3bc09020c45 10.1.2.68:1112
slots:8192-16383 (8192 slots) master
Can I set the above configuration? (type 'yes' to accept): yes
Nodes configuration updated
Sending CLUSTER MEET messages to join the cluster
/Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis/client.rb:85:in call': ERR Invalid IP address in MEET (Redis::CommandError) from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:2240:inmethod_missing'
from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:36:in synchronize' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:inmon_synchronize'
from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:36:in synchronize' from /Library/Ruby/Gems/1.8/gems/redis-3.0.4/lib/redis.rb:2239:inmethod_missing'
from ./redis-trib.rb:495:in join_cluster' from ./redis-trib.rb:493:ineach'
from ./redis-trib.rb:493:in join_cluster' from ./redis-trib.rb:687:increate_cluster_cmd'
from ./redis-trib.rb:755:in `send'
from ./redis-trib.rb:755
Please help me. Thanks advance
Closing because the code base changed too much since this was signaled (and the problem is not clear). Please resubmit after testing with the latest version if you have still issues. Thanks.
Activity
charsyam commentedon May 4, 2013
@garlandkr How about retrying after deleting nodes.conf file
antirez commentedon May 8, 2013
Hello! It looks like you tried to create a cluster with a node that was already partially used in some way. However redis-trib should check better that this is not the case before proceeding, it currently only tests that the nodes are empty AFAIK, but they may have assigned slots like in that case.
Keeping open as a reminder to do this check.
durchgedreht commentedon May 21, 2013
Hi,
I had the same experience in setting up a cluster where one node still had some testing data in it (SET foo "bar" or something similar). Would be great to have an automated "flushall"-call on all nodes. If the data node is the n-th node, the rest of the nodes already got some config written to them. Maybe an explicit option, so nobody kills their data. As I wasn't sure if the configs would be the same always, I was going for sure and deleted all before rerunning the script.
SureshSc commentedon Aug 21, 2013
antirez commentedon Aug 21, 2013
Hello @SureshSc, probably one of the nodes you are using to create the cluster are not empty.
SureshSc commentedon Aug 22, 2013
cluster delslots 7185
(error) ERR Slot 7185 is already unassignedcluster delslots 7185
(error) ERR Slot 7185 is already unassigned
How to assign.
What is node in redis cluster.
Can you share any document which is easy to understand please
SureshSc commentedon Aug 22, 2013
After deleting confi file i got this
antirez commentedon Nov 27, 2013
Closing because the code base changed too much since this was signaled (and the problem is not clear). Please resubmit after testing with the latest version if you have still issues. Thanks.
Squashed 'deps/hiredis/' changes from f8de9a4bd..b6a052fe0