{"record":{"id":"35e9bfb76bd7fc26","repo":"apache/cassandra","slug":"throw-new-ioexception-e","errorCode":null,"errorMessage":"throw new IOException(e)","messagePattern":"throw new IOException\\(e\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/NodeProbe.java","lineNumber":2459,"sourceCode":"        {\n            if (jmxc != null)\n                jmxc.addConnectionNotificationListener(monitor, null, null);\n            ssProxy.addNotificationListener(monitor, null, null);\n            if (ssProxy.resumeBootstrap())\n            {\n                out.println(\"Resuming bootstrap\");\n                monitor.awaitCompletion();\n                if (monitor.getError() != null)\n                    throw monitor.getError();\n            }\n            else\n            {\n                out.println(\"Node is already bootstrapped.\");\n            }\n        }\n        catch (Exception e)\n        {\n            throw new IOException(e);\n        }\n        finally\n        {\n            try\n            {\n                ssProxy.removeNotificationListener(monitor);\n                if (jmxc != null)\n                    jmxc.removeConnectionNotificationListener(monitor);\n            }\n            catch (Throwable e)\n            {\n                out.println(\"Exception occurred during clean-up. \" + e);\n            }\n        }\n    }\n\n    public Map<String, List<Integer>> getMaximumPoolSizes(List<String> stageNames)\n    {","sourceCodeStart":2441,"sourceCodeEnd":2477,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/NodeProbe.java#L2441-L2477","documentation":"This is NodeProbe's catch-all wrapper for exceptions raised during an assistted/bootstrap-related operation (assassinate/removal flows that register a JMX notification listener `monitor`). Any failure in the proxied operation or in the notification-listener registration is rethrown as an IOException with the original exception as cause. The finally block also detaches the listener.","triggerScenarios":"Invoking a NodeProbe method (e.g. decommission/assassinate/move style operations around this try block) when the remote node throws, or when JMX notification listener add/remove fails.","commonSituations":"Running `nodetool decommission`/bootstrap-related commands against an unhealthy node; node already bootstrapped; JMX connection dropped mid-operation; server-side storage service exception.","solutions":["Read the wrapped cause (e.getCause()) to identify the server-side failure.","Check the target node's system.log for the underlying operation error.","Verify JMX connectivity and that the node is in the expected state (e.g. not already bootstrapped, as printed by the tool).","Retry the command once the node state/JMX connection is healthy."],"exampleFix":"// before (opaque failure)\nnodetool decommission\n// after (inspect cause first)\n# tail -f /var/log/cassandra/system.log while re-running the nodetool command","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { probe.decommission(); }\ncatch (IOException e) { Throwable cause = e.getCause(); log.error(\"Operation failed: {}\", cause == null ? e : cause); }","preventionTips":["Check node health (nodetool status, gossip state) before streaming operations","Confirm node is not already bootstrapped/decommissioned before re-running","Keep JMX connectivity stable; avoid long-lived NodeProbe objects across operations"],"tags":["jmx","nodetool","io","bootstrap"],"backgroundTag":"api-request-failed","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"}