{"record":{"id":"4fdc38339186382a","repo":"apache/cassandra","slug":"error-while-decommissioning-node","errorCode":null,"errorMessage":"Error while decommissioning node: ","messagePattern":"Error while decommissioning node: ","errorType":"exception","errorClass":"java.lang.RuntimeException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/tcm/sequences/UnbootstrapAndLeave.java","lineNumber":206,"sourceCode":"                    return continuable();\n                }\n                break;\n            case MID_LEAVE:\n                try\n                {\n                    streams.execute(startLeave.nodeId(),\n                                    startLeave.delta(),\n                                    midLeave.delta(),\n                                    finishLeave.delta());\n                    ClusterMetadataService.instance().commit(midLeave);\n                }\n                catch (ExecutionException e)\n                {\n                    if (startLeave.nodeId().equals(ClusterMetadata.current().myNodeId()))\n                        StorageService.instance.markDecommissionFailed();\n                    JVMStabilityInspector.inspectThrowable(e);\n                    logger.error(\"Error while decommissioning node: {}\", e.getCause().getMessage());\n                    throw new RuntimeException(\"Error while decommissioning node: \" + e.getCause().getMessage());\n                }\n                catch (Throwable t)\n                {\n                    logger.warn(\"Exception committing midLeave, will retry\", t);\n                    JVMStabilityInspector.inspectThrowable(t);\n                    return continuable();\n                }\n                break;\n            case FINISH_LEAVE:\n                try\n                {\n                    ClusterMetadataService.instance().commit(finishLeave);\n                    StorageService.instance.clearTransientMode();\n                }\n                catch (Throwable t)\n                {\n                    logger.warn(\"Exception committing finishLeave, will retry\", t);\n                    JVMStabilityInspector.inspectThrowable(t);","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/sequences/UnbootstrapAndLeave.java#L188-L224","documentation":"UnbootstrapAndLeave.executeNext wraps the commit of mid-leave transformations; when an ExecutionException surfaces it marks decommission failed and rethrows a RuntimeException prefixed 'Error while decommissioning node:'. The underlying cause (e.getCause().getMessage()) indicates why the schema/range movement commit failed during unbootstrap. JVMStabilityInspector also inspects the throwable, so some causes may additionally affect node stability.","triggerScenarios":"ExecutionException from committing a midLeave/midUnbootstrap transformation during decommission - e.g. cluster metadata commit rejected, another concurrent topology change, or a failure in the async execution of range movement.","commonSituations":"Decommission interrupted by concurrent topology operations; node losing quorum with CMS mid-unbootstrap; timeouts during streaming/metadata transitions.","solutions":["Inspect the cause message in the log line above the exception to find the root failure","Fix the underlying issue (restore CMS connectivity, resolve conflicting topology operation), then run abortdecommission or retry decommission","If the node is stuck in a failed decommission state, use nodetool abortdecommission to cancel the sequence"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// ensure CMS reachability and no conflicting topology change before decommissioning\nassert ClusterMetadataService.instance().current().isAccessible();","typeGuard":null,"tryCatchPattern":"try { executeDecommission(); }\ncatch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Error while decommissioning node:\")) {\n        logger.error(\"decommission failed: {}\", e.getMessage());\n        // inspect cause, fix connectivity/conflict, then abort or retry\n    }\n}","preventionTips":["Avoid running concurrent topology changes during decommission","Monitor CMS connectivity/quorum throughout unbootstrap","On failure, resolve root cause from the logged cause message, then abortdecommission or retry"],"tags":["decommission","cluster-operations","tcm"],"backgroundTag":"database-write-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}