{"record":{"id":"69ea3b26c9088fca","repo":"apache/cassandra","slug":"could-not-find-nodeid-for-endpoint","errorCode":null,"errorMessage":"Could not find NodeId for endpoint {}","messagePattern":"Could not find NodeId for endpoint (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/tcm/migration/GossipCMSListener.java","lineNumber":75,"sourceCode":"            if (Gossiper.isHibernate(epState))\n                return;\n\n            if (hostIdValue != null)\n            {\n                UUID hostId = UUID.fromString(hostIdValue.value);\n                nodeId = metadata.directory.nodeIdFromHostId(hostId);\n                InetAddressAndPort oldEndpoint = metadata.directory.endpoint(nodeId);\n                if (Gossiper.instance.compareEndpointStartup(oldEndpoint, endpoint) > 0)\n                {\n                    logger.warn(\"Host ID collision for {} between {} and {}; ignored {}\", hostId, oldEndpoint, endpoint, endpoint);\n                    return;\n                }\n                logger.info(\"Node {} (hostId = {}) changing IP from {} to {}\", nodeId, hostId, oldEndpoint, endpoint);\n                Gossiper.instance.removeEndpoint(oldEndpoint);\n            }\n            else\n            {\n                logger.warn(\"Could not find NodeId for endpoint {}\", endpoint);\n                return;\n            }\n        }\n        // only thing that can change is the release version and addresses\n        CassandraVersion gossipVersion = epState.getReleaseVersion();\n        NodeAddresses newAddresses = GossipHelper.getAddressesFromEndpointState(endpoint, epState);\n        while (true)\n        {\n            NodeVersion cmVersion = metadata.directory.versions.get(nodeId);\n            if (cmVersion.cassandraVersion.equals(gossipVersion) && newAddresses.equals(metadata.directory.getNodeAddresses(nodeId)))\n            {\n                return;\n            }\n            else\n            {\n                ClusterMetadata.Transformer transformer = metadata.transformer();\n                if (gossipVersion != null && !cmVersion.cassandraVersion.equals(gossipVersion))\n                    transformer = transformer.withVersion(nodeId, NodeVersion.fromCassandraVersion(gossipVersion));","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/migration/GossipCMSListener.java#L57-L93","documentation":"Warning logged by GossipCMSListener.onJoin when gossip delivers state for an endpoint that has no corresponding NodeId in the ClusterMetadata directory. The listener cannot correlate the gossiping node with TCM membership, so it returns early and ignores the endpoint's state (e.g. an IP change cannot be applied).","triggerScenarios":"onJoin (via onAlive) reads the hostId gossip application state, calls metadata.directory.nodeIdFromHostId(hostId), and gets null — the endpoint/host ID is unknown to the CMS directory. Called by onAlive when a previously down node comes back or a new node joins via gossip.","commonSituations":"A node rejoining after being removed from the directory (decommissioned) but still gossiping; gossip and TCM membership out of sync after a failed migration/upgrade; a foreign node from another cluster misconfigured with this cluster name joining gossip; stale gossip state on a restarted node.","solutions":["If the node was decommissioned, fully stop it and remove it from gossip (nodetool assassinate only as a last resort) so its stale state stops arriving","If the node should be a member, re-bootstrap it properly through the CMS so it gets a NodeId registered in the directory","Verify the node's cluster name and seeds configuration — a node from a different cluster must not be allowed to gossip into this one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"NodeId nodeId = metadata.directory.nodeIdFromHostId(hostId);\nif (nodeId == null) {\n    // endpoint unknown to CMS: stop processing gossip state for it\n    logger.warn(\"Unknown endpoint {} - not registered with CMS\", endpoint);\n    return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fully stop decommissioned nodes so they stop gossiping","Verify cluster name and seed configuration on all joining nodes","After failed migrations, verify directory membership matches gossip membership before resuming"],"tags":["cluster-membership","gossip","node-not-found","distributed-consistency"],"backgroundTag":"entity-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}