{"record":{"id":"95df9bce699274bd","repo":"apache/cassandra","slug":"error-decommissioning-node","errorCode":null,"errorMessage":"Error decommissioning node","messagePattern":"Error decommissioning node","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/nodetool/Decommission.java","lineNumber":52,"sourceCode":"    @Override\n    public void execute(NodeProbe probe)\n    {\n        try\n        {\n            if (probe.getStorageService().isDecommissioning())\n            {\n                probe.output().out.println(\"This node is still decommissioning.\");\n                return;\n            }\n            if (\"DECOMMISSIONED\".equals(probe.getStorageService().getBootstrapState()))\n            {\n                probe.output().out.println(\"Node was already decommissioned.\");\n                return;\n            }\n            probe.decommission(force);\n        } catch (InterruptedException e)\n        {\n            throw new RuntimeException(\"Error decommissioning node\", e);\n        } catch (UnsupportedOperationException e)\n        {\n            throw new IllegalStateException(\"Unsupported operation: \" + e.getMessage(), e);\n        }\n    }\n\n    @Command(name = \"abortdecommission\", description = \"Abort an ongoing, failed decommission\")\n    public static class Abort extends AbstractCommand\n    {\n        @Option(paramLabel = \"nodeId\", names = { \"--node\" })\n        private String nodeId;\n\n        @Override\n        protected void execute(NodeProbe probe)\n        {\n            probe.abortDecommission(nodeId);\n        }\n    }","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/nodetool/Decommission.java#L34-L70","documentation":"RuntimeException wrapper from Decommission.execute when probe.decommission() throws InterruptedException while waiting for the decommission operation. The node's decommission was initiated but the nodetool client's wait was interrupted; the operation on the server may still be in progress.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/tools/nodetool/Decommission.java:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run nodetool status / netstats to check whether decommission continues on the node","Avoid interrupting nodetool during long decommissions","Restore the interrupt status in calling code if embedding NodeProbe"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}