{"record":{"id":"ae92f69a06fe4227","repo":"apache/cassandra","slug":"java-io-ioexception","errorCode":null,"errorMessage":"java.io.IOException","messagePattern":"java\\.io\\.IOException","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/nodetool/CMSAdmin.java","lineNumber":344,"sourceCode":"        {\n            try\n            {\n                if (dumpOptions == null)\n                {\n                    String fileLocation = probe.getCMSOperationsProxy().dumpClusterMetadata();\n                    printCMSDumpLocation(probe, fileLocation);\n                }\n                else\n                {\n                    String fileLocation = probe.getCMSOperationsProxy().dumpClusterMetadata(dumpOptions.epoch,\n                                                                                            dumpOptions.transformEpoch,\n                                                                                            dumpOptions.version.name());\n                    printCMSDumpLocation(probe, fileLocation);\n                }\n            }\n            catch (IOException e)\n            {\n                throw new RuntimeException(e);\n            }\n        }\n\n        private void printCMSDumpLocation(NodeProbe probe, String fileLocation)\n        {\n            probe.output().out.println(\"Cluster Metadata dump available at \" + fileLocation);\n        }\n    }\n}\n","sourceCodeStart":326,"sourceCodeEnd":354,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/nodetool/CMSAdmin.java#L326-L354","documentation":"During `nodetool cms dump` (or similar CMSAdmin dump command), writing or resolving the dump file location threw an IOException. The tool wraps it in a RuntimeException so the nodetool client fails with the IO cause attached.","triggerScenarios":"The dump target path is not writable (permissions, read-only filesystem, nonexistent directory) or an IO error occurs while the server writes the cluster metadata dump file.","commonSituations":"Dumping to a directory the Cassandra process cannot write to, full disk, or passing a --output location on a node whose filesystem is read-only.","solutions":["Check that the dump target directory exists and is writable by the Cassandra user (ls -ld, chown if needed)","Free disk space if the filesystem is full","Re-run the dump with a path on a writable local filesystem, then inspect the wrapped IOException cause in the output"],"exampleFix":"// before\nnodetool cms dump --output /proc/foo\n// after\nnodetool cms dump --output /var/lib/cassandra/data/cmmdump","handlingStrategy":"try-catch","validationCode":"File dir = new File(outputPath);\nif (!dir.getParentFile().canWrite()) throw new IllegalStateException(\"not writable: \" + dir);","typeGuard":null,"tryCatchPattern":"try { dump(); }\ncatch (RuntimeException e) {\n    if (e.getCause() instanceof IOException io) {\n        System.err.println(\"Dump IO failure: \" + io.getMessage());\n    }\n}","preventionTips":["Pre-dump to a directory writable by the Cassandra user","Monitor disk space","Unwrap getCause() to find the real IOException"],"tags":["io","nodetool","filesystem"],"backgroundTag":"file-write-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"}