I use the command for resharding Elasticache nodes (v4.x)
redis-cli --cluster reshard a.b.c.d:6379 --cluster-from c18b1d --cluster-to 687bc4f --cluster-slots 2730 --cluster-yes
And got an error:
Moving slot 5462 from x.x.x.x:6379 to x.x.x.x:6379: clusterManagerMoveSlot failed: ERR Wrong CLUSTER subcommand or number of arguments
I tried to do a lot of Google search but found no answer about this one, please help!
Comment From: SoulPancake
@bugb The error message suggests that the redis-cli command was executed with incorrect arguments or in an incorrect order.
Here's the proper format for the redis-cli --cluster reshard command:
redis-cli --cluster reshard <source-node-host>:<port> <destination-node-host>:<port> <slot-range>
So in your case, the correct format should be:
redis-cli --cluster reshard x.x.x.x:6379 x.x.x.x:6379 5462 --cluster-yes
Replace x.x.x.x with the actual hostnames or IP addresses of the source and destination nodes, and 5462 with the actual slot range you want to reshard.
Comment From: bugb
Hi @SoulPancake, thank you so much for your quick reply! But I got issues when using your command
redis-cli --cluster reshard 68.x.x.x:6379 68.x.x.x:6379 5462-8191
Could not connect to Redis at 68.x.x.x:6379:68: Name or service not known
Note: I still can connect to 68.x.x.x without any problems!
Do you have any further advice for it?
Comment From: bugb
If I use interactive mode, I still got errors:
redis-cli --cluster reshard x.x.x.x:6379
(I am using redis-cli 7.0.8)
Comment From: madolson
I use the command for resharding Elasticache nodes (v4.x)
@bugb I think this is your real problem. I work for the ElastiCache team at AWS, we don't expose this low level functionality. We only support resharding at the cluster level, see https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/redis-cluster-resharding-online.html. If you need help resharding a specific slot, please reach out to customer support.