# redis.exceptions.ResponseError: MOVED 12345 192.168.1.10:6379

- **ID:** `database/redis-cluster-moved-redirect`
- **Domain:** database
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

A Redis cluster client sent a command to the wrong node; the cluster slot is owned by a different node, requiring a redirect.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Redis 6.2 | active | — | — |
| Redis 7.0 | active | — | — |
| Redis 7.2 | active | — | — |

## Workarounds

1. **Use a Redis cluster-aware client (e.g., redis-py-cluster) that automatically follows MOVED redirects: from rediscluster import RedisCluster; rc = RedisCluster(startup_nodes=[{'host':'192.168.1.10','port':6379}], decode_responses=True)** (95% success)
   ```
   Use a Redis cluster-aware client (e.g., redis-py-cluster) that automatically follows MOVED redirects: from rediscluster import RedisCluster; rc = RedisCluster(startup_nodes=[{'host':'192.168.1.10','port':6379}], decode_responses=True)
   ```
2. **Execute the command on the node specified in the MOVED error: redis-cli -h 192.168.1.10 -p 6379 GET mykey** (90% success)
   ```
   Execute the command on the node specified in the MOVED error: redis-cli -h 192.168.1.10 -p 6379 GET mykey
   ```
3. **Refresh the cluster slots map in the client: rc.cluster_slots = rc.cluster_slots() to force a re-fetch of slot assignments.** (85% success)
   ```
   Refresh the cluster slots map in the client: rc.cluster_slots = rc.cluster_slots() to force a re-fetch of slot assignments.
   ```

## Dead Ends

- **Ignore the MOVED error and retry the same node** — The cluster topology is static for that slot; retrying the same node will always fail because the slot is not hosted there. (100% fail)
- **Manually update the client's cluster slots map by hardcoding IP addresses** — Cluster nodes can change IPs or rebalance slots; hardcoding breaks when the cluster topology changes. (70% fail)
