redis
config_error
ai_generated
true
ERR Slot 1234 is not assigned to any node
ID: redis/err-cluster-slot-unassigned
85%Fix Rate
86%Confidence
1Evidence
2024-02-14First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Redis 7.0.14 | active | — | — | — |
| Redis 7.2.2 | active | — | — | — |
| redis-cli 7.2.2 | active | — | — | — |
Root Cause
In a Redis Cluster, a hash slot has not been assigned to any node, often due to incomplete cluster initialization, resharding failure, or node removal without reassigning slots.
generic中文
在 Redis 集群中,某个哈希槽未分配给任何节点,通常是由于集群初始化不完整、重新分片失败或节点移除后未重新分配槽位。
Official Documentation
https://redis.io/docs/latest/operate/oss_and_stack/management/scaling/Workarounds
-
90% success Use redis-cli to fix the slot assignment: `redis-cli --cluster fix <any-node-ip>:6379`. This scans for unassigned slots and reassigns them automatically.
Use redis-cli to fix the slot assignment: `redis-cli --cluster fix <any-node-ip>:6379`. This scans for unassigned slots and reassigns them automatically.
-
85% success Manually assign the slot to a node using: `redis-cli --cluster addslots <node-ip>:6379 1234` after ensuring the node has the slot range available.
Manually assign the slot to a node using: `redis-cli --cluster addslots <node-ip>:6379 1234` after ensuring the node has the slot range available.
-
80% success If resharding was interrupted, resume it: `redis-cli --cluster reshard <source-node-ip>:6379 --from <source-node-id> --to <target-node-id> --slots 1234 --yes`
If resharding was interrupted, resume it: `redis-cli --cluster reshard <source-node-ip>:6379 --from <source-node-id> --to <target-node-id> --slots 1234 --yes`
中文步骤
Use redis-cli to fix the slot assignment: `redis-cli --cluster fix <any-node-ip>:6379`. This scans for unassigned slots and reassigns them automatically.
Manually assign the slot to a node using: `redis-cli --cluster addslots <node-ip>:6379 1234` after ensuring the node has the slot range available.
If resharding was interrupted, resume it: `redis-cli --cluster reshard <source-node-ip>:6379 --from <source-node-id> --to <target-node-id> --slots 1234 --yes`
Dead Ends
Common approaches that don't work:
-
99% fail
Slots are persisted in cluster configuration, not reset on restart.
-
80% fail
New nodes need explicit slot assignment via resharding.