{"record":{"id":"6eeb861e13eba5c5","repo":"apache/cassandra","slug":"unable-to-load-commitlog-archiving-properties","errorCode":null,"errorMessage":"Unable to load commitlog_archiving.properties","messagePattern":"Unable to load commitlog_archiving\\.properties","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java","lineNumber":120,"sourceCode":"    public static CommitLogArchiver construct()\n    {\n        Properties commitlogProperties = new Properties();\n        try (InputStream stream = CommitLogArchiver.class.getClassLoader().getResourceAsStream(COMMITLOG_ARCHIVNG_PROPERTIES_FILE_NAME))\n        {\n            if (stream == null)\n            {\n                logger.trace(\"No {} found; archiving and point-in-time-restoration will be disabled\", COMMITLOG_ARCHIVNG_PROPERTIES_FILE_NAME);\n                return disabled();\n            }\n            else\n            {\n                commitlogProperties.load(stream);\n                return getArchiverFromProperties(commitlogProperties);\n            }\n        }\n        catch (IOException e)\n        {\n            throw new RuntimeException(\"Unable to load \" + COMMITLOG_ARCHIVNG_PROPERTIES_FILE_NAME, e);\n        }\n    }\n\n    @VisibleForTesting\n    static CommitLogArchiver getArchiverFromProperties(Properties commitlogCommands)\n    {\n        assert !commitlogCommands.isEmpty();\n        String archiveCommand = commitlogCommands.getProperty(\"archive_command\");\n        String restoreCommand = commitlogCommands.getProperty(\"restore_command\");\n        String restoreDirectories = commitlogCommands.getProperty(\"restore_directories\");\n        if (restoreDirectories != null && !restoreDirectories.isEmpty())\n        {\n            for (String dir : restoreDirectories.split(DELIMITER))\n            {\n                File directory = new File(dir);\n                if (!directory.exists())\n                {\n                    if (!directory.tryCreateDirectory())","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java#L102-L138","documentation":"Thrown during CommitLogArchiver construction when the commitlog_archiving.properties file exists but cannot be read (IOException while loading its contents). Cassandra requires this file to be parseable when it is present, since it defines archive/restore commands. The underlying IOException is chained as the cause.","triggerScenarios":"Calling CommitLogArchiver.construct() when commitlog_archiving.properties exists on the classpath/config path but the read fails (I/O error, unreadable permissions, stream closed mid-read).","commonSituations":"File permissions changed after deployment; file truncated or corrupted; filesystem errors (NFS, disk full) while reading the properties file; container image with partially copied config.","solutions":["Check file permissions on commitlog_archiving.properties so the Cassandra process can read it (read access for the cassandra user).","Verify the file is not empty/corrupted; re-deploy a valid commitlog_archiving.properties.","Fix the underlying filesystem issue (disk full, NFS hang) reported in the chained IOException cause.","If archiving is not used, either remove the file or leave it present but valid; Cassandra only reads it when it exists."],"exampleFix":"// before (unreadable file)\n-rw------- root root /etc/cassandra/commitlog_archiving.properties\n// after\nchown cassandra:cassandra /etc/cassandra/commitlog_archiving.properties\nchmod 644 /etc/cassandra/commitlog_archiving.properties","handlingStrategy":"try-catch","validationCode":"// before startup\nFile f = new File(confDir, \"commitlog_archiving.properties\");\nif (f.exists() && (!f.isFile() || !f.canRead()))\n    throw new IllegalStateException(\"commitlog_archiving.properties exists but is not readable\");","typeGuard":null,"tryCatchPattern":"try { archiver = CommitLogArchiver.construct(); }\ncatch (RuntimeException e) {\n    if (e.getCause() instanceof IOException)\n        log.error(\"Fix commitlog_archiving.properties read access\", e);\n    throw e;\n}","preventionTips":["Ensure config files ship with world/group read permission for the cassandra user","Verify config files after container image build (test that the process can read them)","Monitor disk/filesystem health on config volumes"],"tags":["cassandra","commitlog","configuration","io"],"backgroundTag":"file-read-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"}