{"record":{"id":"18094976ef0db5f2","repo":"hibiken/asynq","slug":"nodes-not-found","errorCode":null,"errorMessage":"nodes not found","messagePattern":"nodes not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/rdb/inspect.go","lineNumber":2121,"sourceCode":"\treturn r.client.ClusterKeySlot(context.Background(), key).Result()\n}\n\n// ClusterNodes returns a list of nodes the given queue belongs to.\nfunc (r *RDB) ClusterNodes(qname string) ([]redis.ClusterNode, error) {\n\tkeyslot, err := r.ClusterKeySlot(qname)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclusterSlots, err := r.client.ClusterSlots(context.Background()).Result()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, slotRange := range clusterSlots {\n\t\tif int64(slotRange.Start) <= keyslot && keyslot <= int64(slotRange.End) {\n\t\t\treturn slotRange.Nodes, nil\n\t\t}\n\t}\n\treturn nil, fmt.Errorf(\"nodes not found\")\n}\n","sourceCodeStart":2103,"sourceCodeEnd":2123,"githubUrl":"https://github.com/hibiken/asynq/blob/d135f1439bee74e989b7f9b41ecd542cc87f024a/internal/rdb/inspect.go#L2103-L2123","documentation":"Returned by RDB cluster-slot lookup when ClusterKeySlot computed a hash slot for a queue but the ClusterSlots() response contained no range covering that slot. This should be impossible with a healthy Redis Cluster (all 16384 slots are owned), so it indicates an incomplete cluster or a truncated slot map.","triggerScenarios":"Calling ClusterKeySlot/cluster-node resolution against a Redis Cluster that has unassigned slots (during resharding or failover), or a ClusterSlots reply missing the relevant slot range.","commonSituations":"Cluster resharding in progress; a failing primary whose slots are not yet migrated; misconfigured cluster with fewer nodes than slots; running cluster-mode code against a non-cluster setup.","solutions":["Run CLUSTER SLOTS / redis-cli --cluster check to find unassigned slots","Wait for resharding/failover to complete and retry","Assign the missing slots: redis-cli --cluster fix","Ensure the cluster owns all 16384 slots before relying on slot lookups"],"exampleFix":"// before\nnodes, err := r.clusterNodeLookup(qname)\nif err != nil { return err }\n// after\nnodes, err := r.clusterNodeLookup(qname)\nif err != nil {\n    time.Sleep(500 * time.Millisecond) // transient during reshard\n    nodes, err = r.clusterNodeLookup(qname)\n}\nif err != nil { return err }","handlingStrategy":"retry","validationCode":"slots, err := client.ClusterSlots(ctx).Result()\ncovered := false\nfor _, s := range slots { if s.Start <= slot && slot <= s.End { covered = true } }\nif !covered { return errors.New(\"cluster has unassigned slots\") }","typeGuard":null,"tryCatchPattern":"var nodes []SlotRangeNode\nerr := retry.Do(func() error {\n    var e error\n    nodes, e = inspector clusterLookup(qname)\n    return e\n}, retry.Attempts(3), retry.Delay(500*time.Millisecond))","preventionTips":["Run redis-cli --cluster check regularly to detect unassigned slots","Avoid slot lookups during resharding windows","Ensure all 16384 slots are assigned before serving traffic","Alert on CLUSTER SLOTS gaps"],"tags":["redis","cluster","slot-mapping"],"backgroundTag":"resource-not-found","analyzedSha":"d135f1439bee74e989b7f9b41ecd542cc87f024a","analyzedAt":"2026-09-07T19:02:34.660Z","contentChangedAt":"2026-09-07T19:02:34.660Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}