When encountering the "MOVED key moved to another node" error in Redis, it indicates that the data you are trying to access has been moved to a different node in a Redis Cluster setup. This is a part of Redis Cluster's automatic sharding mechanism. Here is the immediate action you can take:
MOVED <hash slot> <hostname>:<port>
. You should use this information to connect directly to the correct node. For example, if the error is MOVED 1234 127.0.0.1:6381
, connect to the node using Redis CLI with the command redis-cli -h 127.0.0.1 -p 6381
and then execute your command again.CLUSTER NODES
or CLUSTER INFO
commands. These commands will show you the current configuration and status of the cluster, including which slots are mapped to which nodes. This can help you verify that the cluster is configured correctly and is stable.Execute these actions step by step to understand and mitigate the issue.
Let Dr. Droid create custom investigation plans for your infrastructure.
Start Free POC (15-min setup) →