{"record":{"id":"509d0681c8261e5e","repo":"apache/cassandra","slug":"cluster-metadata-dump-file-s-does-not-exist","errorCode":null,"errorMessage":"Cluster metadata dump file %s does not exist.","messagePattern":"Cluster metadata dump file (.+?) does not exist\\.","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/CMSOfflineTool.java","lineNumber":163,"sourceCode":"            {\n                execute(parent.output);\n                parent.output.out.flush();\n                parent.output.err.flush();\n            }\n            catch (IOException e)\n            {\n                throw new RuntimeException(e);\n            }\n        }\n\n        protected abstract void execute(Output output) throws IOException;\n\n        public ClusterMetadata parseClusterMetadata() throws IOException\n        {\n            File file = new File(metadataDumpFile);\n            if (!file.exists())\n            {\n                throw new IllegalArgumentException(\"Cluster metadata dump file \" + metadataDumpFile + \" does not exist.\");\n            }\n\n            // Make sure the partitioner we use to manipulate the metadata is the same one used to generate it\n            IPartitioner partitioner;\n            try (FileInputStreamPlus fisp = new FileInputStreamPlus(metadataDumpFile))\n            {\n                int x = fisp.readUnsignedVInt32();\n                Version version = Version.fromInt(x);\n                partitioner = ClusterMetadata.Serializer.getPartitioner(fisp, version);\n            }\n            DatabaseDescriptor.toolInitialization();\n            DatabaseDescriptor.setPartitionerUnsafe(partitioner);\n            ClusterMetadataService.initializeForTools(false);\n\n            return ClusterMetadataService.deserializeClusterMetadata(metadataDumpFile);\n        }\n\n        public void writeMetadata(Output output, ClusterMetadata metadata, String outputFilePath) throws IOException","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/CMSOfflineTool.java#L145-L181","documentation":"Thrown by CMSOfflineTool.parseClusterMetadata() when the cluster metadata dump file supplied via --dump doesn't exist on disk. The tool cannot read metadata without the dump produced by `nodetool cms ... loaddump`/`cms loaddump`.","triggerScenarios":"Running CMSOfflineTool (e.g. cms offline tasks) with --dump /path that points to a missing file or a typo'd path.","commonSituations":"Wrong relative path when running from a different working directory; dump was never created or was deleted; filename typo in a script.","solutions":["Generate the dump first (cms loaddump / nodetool equivalent) and pass its actual path","Verify the path with `ls` and use an absolute path in the command","Check the file wasn't removed between generation and tool run"],"exampleFix":"# before\ncms offline --dump /tmp/wrong-name.cms\n# after\ncms offline --dump /tmp/cluster-metadata-dump.cms  # verified with ls -l","handlingStrategy":"validation","validationCode":"File dump = new File(metadataDumpFile);\nif (!dump.exists() || !dump.isFile()) throw new IllegalArgumentException(\"dump file missing: \" + dump);","typeGuard":null,"tryCatchPattern":"try { parseClusterMetadata(); } catch (IllegalArgumentException e) { if (e.getMessage().endsWith(\"does not exist.\")) { /* create dump or fix --dump path */ } else throw e; }","preventionTips":["Generate the dump (cms loaddump) before running offline tools","Use absolute paths in scripts","Verify the dump exists with ls before invoking the tool"],"tags":["cli","file","cluster-metadata"],"backgroundTag":"file-not-found","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"}