{"id":"baa2eb0ce98f934a","repo":"redis/redis-py","slug":"cluster-mode-is-not-enabled-on-this-node-baa2eb","errorCode":null,"errorMessage":"Cluster mode is not enabled on this node","messagePattern":"Cluster mode is not enabled on this node","errorType":"exception","errorClass":"RedisClusterException","httpStatus":null,"severity":"error","filePath":"redis/cluster.py","lineNumber":2700,"sourceCode":"                            **kwargs,\n                        )\n                        if startup_node in self.startup_nodes.values():\n                            self.startup_nodes[startup_node.name].redis_connection = r\n                        else:\n                            startup_node.redis_connection = r\n                    try:\n                        # Make sure cluster mode is enabled on this node\n                        cluster_slots = str_if_bytes(r.execute_command(\"CLUSTER SLOTS\"))\n                        if disconnect_startup_nodes_pools:\n                            with r.connection_pool._lock:\n                                # take care to clear connections before we move on\n                                # mark all active connections for reconnect - they will be\n                                # reconnected on next use, but will allow current in flight commands to complete first\n                                r.connection_pool.update_active_connections_for_reconnect()\n                                # Needed to clear READONLY state when it is no longer applicable\n                                r.connection_pool.disconnect_free_connections()\n                    except ResponseError:\n                        raise RedisClusterException(\n                            \"Cluster mode is not enabled on this node\"\n                        )\n                    startup_nodes_reachable = True\n                except Exception as e:\n                    # Try the next startup node.\n                    # The exception is saved and raised only if we have no more nodes.\n                    exception = e\n                    continue\n\n                # CLUSTER SLOTS command results in the following output:\n                # [[slot_section[from_slot,to_slot,master,replica1,...,replicaN]]]\n                # where each node contains the following list: [IP, port, node_id]\n                # Therefore, cluster_slots[0][2][0] will be the IP address of the\n                # primary node of the first slot section.\n                # If there's only one server in the cluster, its ``host`` is ''\n                # Fix it to the host in startup_nodes\n                if (\n                    len(cluster_slots) == 1","sourceCodeStart":2682,"sourceCodeEnd":2718,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/cluster.py#L2682-L2718","documentation":"Error \"Cluster mode is not enabled on this node\" thrown in redis/redis-py.","triggerScenarios":"Thrown at redis/cluster.py:2700 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}