{"record":{"id":"1f15f9dcdab6f5e3","repo":"apache/cassandra","slug":"ignored-host-s-s-don-t-exist-in-the-cluster","errorCode":null,"errorMessage":"Ignored host(s) %s don't exist in the cluster","messagePattern":"Ignored host\\(s\\) (.+?) don't exist in the cluster","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tcm/ClusterMetadataService.java","lineNumber":449,"sourceCode":"            throw new IllegalStateException(msg);\n        }\n\n        ClusterMetadata metadata = metadata();\n        if (metadata.myNodeState() != NodeState.JOINED)\n        {\n            String msg = String.format(\"Initial CMS node needs to be fully joined, not: %s\", metadata.myNodeState());\n            logger.error(msg);\n            throw new IllegalStateException(msg);\n        }\n\n        Set<InetAddressAndPort> existingMembers = metadata.fullCMSMembers();\n\n        if (!metadata.directory.allAddresses().containsAll(ignored))\n        {\n            Set<InetAddressAndPort> allAddresses = Sets.newHashSet(metadata.directory.allAddresses());\n            String msg = String.format(\"Ignored host(s) %s don't exist in the cluster\", Sets.difference(ignored, allAddresses));\n            logger.error(msg);\n            throw new IllegalStateException(msg);\n        }\n\n        for (Map.Entry<NodeId, NodeVersion> entry : metadata.directory.versions.entrySet())\n        {\n            NodeVersion version = entry.getValue();\n            InetAddressAndPort ep = metadata.directory.getNodeAddresses(entry.getKey()).broadcastAddress;\n            if (ignored.contains(ep))\n            {\n                // todo; what do we do if an endpoint has a mismatching gossip-clustermetadata?\n                //       - we could add the node to --ignore and force this CM to it?\n                //       - require operator to bounce/manually fix the CM on that node\n                //       for now just requiring that any ignored host is also down\n//                if (FailureDetector.instance.isAlive(ep))\n//                    throw new IllegalStateException(\"Can't ignore \" + ep + \" during CMS migration - it is not down\");\n                logger.info(\"Endpoint {} running {} is ignored\", ep, version);\n                continue;\n            }\n","sourceCodeStart":431,"sourceCodeEnd":467,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/ClusterMetadataService.java#L431-L467","documentation":"upgradeFromGossip accepts an 'ignored' set of hosts to exclude from the gossip-to-TCM upgrade. Before proceeding, it validates that every ignored host exists in the cluster's directory of addresses; if any are unknown, it throws IllegalStateException naming the missing hosts, because ignoring non-existent nodes would silently corrupt the upgrade process.","triggerScenarios":"Calling upgradeFromGossip(Set<InetAddressAndPort> ignored) where at least one address in 'ignored' is not present in metadata.directory.allAddresses() — typically a typo'd IP, a decommissioned node, or a host from a different cluster.","commonSituations":"Copy-pasting host lists from another cluster or an old operations doc, specifying nodes that were already removed via decommission, DNS-resolved names mismatching stored IPs, or misconfigured upgrade automation scripts.","solutions":["Remove the unknown host(s) from the ignored set and re-run upgradeFromGossip.","Verify host addresses against the live directory (metadata.directory.allAddresses() or nodetool status) before passing them.","Fix IP typos or use exact registered addresses (IP:port) as they appear in the node directory.","If the node was decommissioned, it no longer needs to be in the ignored list — just drop it."],"exampleFix":"// before\nSet<InetAddressAndPort> ignored = Sets.newHashSet(toAddr(\"10.0.0.99\")); // not in cluster\nservice.upgradeFromGossip(ignored);\n// after\nSet<InetAddressAndPort> all = ClusterMetadata.current().directory.allAddresses();\nignored.retainAll(all);\nservice.upgradeFromGossip(ignored);","handlingStrategy":"validation","validationCode":"Set<InetAddressAndPort> all = ClusterMetadata.current().directory.allAddresses();\nSet<InetAddressAndPort> unknown = Sets.difference(ignored, all);\nif (!unknown.isEmpty()) throw new IllegalArgumentException(\"Unknown ignored hosts: \" + unknown);","typeGuard":null,"tryCatchPattern":"try { service.upgradeFromGossip(ignored); } catch (IllegalStateException e) { logger.error(\"Invalid ignored set: {}\", e.getMessage()); }","preventionTips":["Build the ignored list from directory data, not hand-typed addresses","Validate host lists against nodetool status before automation runs","Drop decommissioned nodes from ignored lists"],"tags":["upgrade","cluster-metadata","validation","unknown-host"],"backgroundTag":"invalid-argument-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}