{"id":"da20cf7c0094bda5","repo":"redis/redis-py","slug":"node-host-port-doesn-t-exist-in-the-cluster","errorCode":null,"errorMessage":"Node {host}:{port} doesn't exist in the cluster","messagePattern":"Node (.+?):(.+?) doesn't exist in the cluster","errorType":"exception","errorClass":"RedisClusterException","httpStatus":null,"severity":"error","filePath":"redis/cluster.py","lineNumber":3037,"sourceCode":"        else:\n            # nothing passed by the user. set node to None\n            pubsub_node = None\n\n        self.node = pubsub_node\n\n    def get_pubsub_node(self):\n        \"\"\"\n        Get the node that is being used as the pubsub connection\n        \"\"\"\n        return self.node\n\n    def _raise_on_invalid_node(self, redis_cluster, node, host, port):\n        \"\"\"\n        Raise a RedisClusterException if the node is None or doesn't exist in\n        the cluster.\n        \"\"\"\n        if node is None or redis_cluster.get_node(node_name=node.name) is None:\n            raise RedisClusterException(\n                f\"Node {host}:{port} doesn't exist in the cluster\"\n            )\n\n    def execute_command(self, *args):\n        \"\"\"\n        Execute a subscribe/unsubscribe command.\n\n        Taken code from redis-py and tweak to make it work within a cluster.\n        \"\"\"\n        # NOTE: don't parse the response in this function -- it could pull a\n        # legitimate message off the stack if the connection is already\n        # subscribed to one or more channels\n\n        if self.connection is None:\n            if self.connection_pool is None:\n                if len(args) > 1:\n                    # Hash the first channel and get one of the nodes holding\n                    # this slot","sourceCodeStart":3019,"sourceCodeEnd":3055,"githubUrl":"https://github.com/redis/redis-py/blob/da03cdc7e8731092b13e395605c3c1fb2de25de1/redis/cluster.py#L3019-L3055","documentation":"Error \"Node {host}:{port} doesn't exist in the cluster\" thrown in redis/redis-py.","triggerScenarios":"Thrown at redis/cluster.py:3037 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}