-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Redis in Cluster mode, CLUSTER ADDSLOTS fails always with (error) ERR Invalid or out of range slot #331
Comments
Hi @tellan55 |
Hi @enricogior I found it as a comment in this link, (http://redis.io/commands/cluster-addslots) Also it might be an error but it is in the recent book "Redis Essentials" by Silva, Maxwell Dayvson... in the section about Redis Cluster. If not supported how can we distributed the Hash Slots? Thanks |
@tellan55 |
Thanks Enrico, I will see how to programmatically inject those hash slots. |
I decided to use Windows command instead any other programmatically language. Based on that, here is the command you will need to run as *.bat file inside each cluster node and in the folder that contains redis-cli.exe changing those 3 initial values (0,1,5461) to the correspondent values per cluster node and adapting it the topology you decide to deploy: 0 = initial cluster slots value for /L %%n in (0,1,5461) do redis-cli.exe -c -h 127.0.0.1 -p 6379 cluster addslots %%n |
how do you finished? i am chinese ,my english is bad,so could you tell me easyly ? thank you! |
Hi there
I am starting using Redis in Cluster mode.
I follow-up all that I have found here, many web sites on Internet, including Redis.io, however I can't distribute the Hash Slots. (http://redis.io/commands/cluster-addslots)
I have tried bash, DOS commands, power shell and directly inside the server in a console with the redis-cli and always the same error.
This Master doesn't know yet about the other Masters and/or slaves. This is the command I am using to connect to the Master:
redis-cli -c -p 6379 -h 127.0.0.1
After successful connection run cluster info:
127.0.0.1:6379> cluster info
cluster_state:fail
cluster_slots_assigned:0
cluster_slots_ok:0
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:1
cluster_size:0
cluster_current_epoch:0
cluster_my_epoch:0
cluster_stats_messages_sent:0
cluster_stats_messages_received:0
Then when running the command:
127.0.0.1:6379> CLUSTER ADDSLOTS {0..5460}
(error) ERR Invalid or out of range slot
I can add hash slots when I use the command CLUSTER ADSDSLOTS 1 2 3 4
But not when using CLUSTER ADDSLOTS {0..5460}.
Is this command supported in the Windows ported version to do this?
Thanks
The text was updated successfully, but these errors were encountered: