{"record":{"id":"d252e9a3465893b6","repo":"apache/cassandra","slug":"error-during-joining-the-ring","errorCode":null,"errorMessage":"Error during joining the ring","messagePattern":"Error during joining the ring","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/tools/nodetool/Join.java","lineNumber":41,"sourceCode":"\nimport picocli.CommandLine.Command;\n\nimport static com.google.common.base.Preconditions.checkState;\n\n\n@Command(name = \"join\", description = \"Join the ring\")\npublic class Join extends AbstractCommand\n{\n    @Override\n    public void execute(NodeProbe probe)\n    {\n        checkState(!probe.isJoined(), \"This node has already joined the ring.\");\n        try\n        {\n            probe.joinRing();\n        } catch (IOException e)\n        {\n            throw new RuntimeException(\"Error during joining the ring\", e);\n        }\n    }\n}\n","sourceCodeStart":23,"sourceCodeEnd":45,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/nodetool/Join.java#L23-L45","documentation":"Join calls StorageServiceMBean.joinRing() to make the node join the ring; if that remote call fails with IOException the command wraps it in RuntimeException('Error during joining the ring'). Common causes are the node not being ready, bootstrap failures, or communication problems with the local JMX endpoint.","triggerScenarios":"Running `nodetool join` (or a wrapper executing execute()) when the node cannot bootstrap: IO errors during streaming, node still decommissioned/in wrong state, or the local JMX call failing.","commonSituations":"Node restarted after decommission; bootstrap blocked by insufficient disk or seed connectivity; firewalled inter-node ports; attempting join on an already-failing node.","solutions":["Check node logs for the underlying bootstrap/streaming exception","Verify seeds are reachable and inter-node ports (7000/7001, storage_port) are open","Confirm node state (nodetool status) — it must be in a joinable state (not already joined, not decommissioned)","After fixing, retry nodetool join"],"exampleFix":"// before\nprobe.joinRing(); // throws IOException -> 'Error during joining the ring'\n// after\n// fix underlying issue first (seeds/ports/disk), then:\ntry { probe.joinRing(); } catch (IOException e) { check logs for root cause; }","handlingStrategy":"try-catch","validationCode":"// verify node is in a joinable state before joining\nboolean joined = probe.isJoined();\nif (joined) throw new IllegalStateException(\"node already joined\");","typeGuard":null,"tryCatchPattern":"try { nodetoolJoin(); } catch (RuntimeException e) { if (e.getMessage().equals(\"Error during joining the ring\")) { /* inspect node logs for bootstrap failure */ } }","preventionTips":["Check seeds reachability and inter-node port openness before bootstrap","Verify sufficient disk space and node state with nodetool info/status","Read cassandra logs immediately after a failed join to find the root IOException"],"tags":["bootstrap","cluster","io"],"backgroundTag":"http-request-failed","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"}