{"id":"819a9b6c83b37b63","repo":"redis/redis-py","slug":"startup-nodes-could-not-agree-on-a-valid-slots-cac-819a9b","errorCode":null,"errorMessage":"startup_nodes could not agree on a valid slots cache: {', '.join(disagreements)}","messagePattern":"startup_nodes could not agree on a valid slots cache: (.+?)","errorType":"exception","errorClass":"RedisClusterException","httpStatus":null,"severity":"error","filePath":"redis/cluster.py","lineNumber":2762,"sourceCode":"                        target_replica_node = self._get_or_create_cluster_node(\n                            host, port, REPLICA, tmp_nodes_cache\n                        )\n                        nodes_for_slot.append(target_replica_node)\n\n                    for i in range(int(slot[0]), int(slot[1]) + 1):\n                        if i not in tmp_slots:\n                            tmp_slots[i] = nodes_for_slot\n                        else:\n                            # Validate that 2 nodes want to use the same slot cache\n                            # setup\n                            tmp_slot = tmp_slots[i][0]\n                            if tmp_slot.name != target_node.name:\n                                disagreements.append(\n                                    f\"{tmp_slot.name} vs {target_node.name} on slot: {i}\"\n                                )\n\n                                if len(disagreements) > 5:\n                                    raise RedisClusterException(\n                                        f\"startup_nodes could not agree on a valid \"\n                                        f\"slots cache: {', '.join(disagreements)}\"\n                                    )\n\n                fully_covered = self.check_slots_coverage(tmp_slots)\n                if fully_covered:\n                    # Don't need to continue to the next startup node if all\n                    # slots are covered\n                    break\n\n            if not startup_nodes_reachable:\n                raise RedisClusterException(\n                    f\"Redis Cluster cannot be connected. Please provide at least \"\n                    f\"one reachable node: {str(exception)}\"\n                ) from exception\n\n            # Create Redis connections to all nodes\n            self.create_redis_connections(list(tmp_nodes_cache.values()))","sourceCodeStart":2744,"sourceCodeEnd":2780,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/cluster.py#L2744-L2780","documentation":"Error \"startup_nodes could not agree on a valid slots cache: {', '.join(disagreements)}\" thrown in redis/redis-py.","triggerScenarios":"Thrown at redis/cluster.py:2762 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"da03cdc7e8731092b13e395605c3c1fb2de25de1","analyzedAt":"2026-08-04T20:26:47.563Z","schemaVersion":2}