{"record":{"id":"7772418422203a25","repo":"apache/cassandra","slug":"unable-to-start-server","errorCode":null,"errorMessage":"; unable to start server","messagePattern":"; unable to start server","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":2453,"sourceCode":"                if (conf.cdc_raw_directory == null)\n                    throw new ConfigurationException(\"cdc_raw_directory must be specified\", false);\n                FileUtils.createDirectory(conf.cdc_raw_directory);\n            }\n\n            boolean created = maybeCreateHeapDumpPath();\n            if (!created && conf.dump_heap_on_uncaught_exception)\n            {\n                logger.error(String.format(\"cassandra.yaml:dump_heap_on_uncaught_exception is enabled but unable to create heap dump path %s. Disabling.\", conf.heap_dump_path != null ? conf.heap_dump_path : \"null\"));\n                conf.dump_heap_on_uncaught_exception = false;\n            }\n        }\n        catch (ConfigurationException e)\n        {\n            throw new IllegalArgumentException(\"Bad configuration; unable to start server: \" + e.getMessage());\n        }\n        catch (FSWriteError e)\n        {\n            throw new IllegalStateException(e.getCause().getMessage() + \"; unable to start server\", e);\n        }\n    }\n\n    public static IPartitioner getPartitioner()\n    {\n        return partitioner;\n    }\n\n    public static String getPartitionerName()\n    {\n        return partitionerName;\n    }\n\n    /* For tests ONLY, don't use otherwise or all hell will break loose. Tests should restore value at the end. */\n    public static IPartitioner setPartitionerUnsafe(IPartitioner newPartitioner)\n    {\n        IPartitioner old = setOnlyPartitionerUnsafe(newPartitioner);\n        StorageService.instance.valueFactory = new VersionedValue.VersionedValueFactory(partitioner);","sourceCodeStart":2435,"sourceCodeEnd":2471,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L2435-L2471","documentation":"When daemon init fails with FSWriteError (typically a filesystem failure creating required directories), DatabaseDescriptor rethrows it as IllegalStateException with the filesystem error cause message followed by '; unable to start server'.","triggerScenarios":"Data/data_file_directories, commitlog, saved_caches, cdc_raw or heap dump path cannot be created on disk: bad path, permissions, disk full, read-only filesystem.","commonSituations":"Running as a user without write permission on data directories; mount not present in containers; SELinux/AppArmor blocking writes; disk full.","solutions":["Check the cause message before '; unable to start server' to identify the failing path","Create the directory and chown/chmod it to the Cassandra user","Verify disk is writable and not full (df/mount)","Correct path settings in cassandra.yaml"],"exampleFix":"// before (yaml)\ndata_file_directories: [/data/cassandra/data]  # mount does not exist\n// after\ndata_file_directories: [/var/lib/cassandra/data]","handlingStrategy":"validation","validationCode":"java.nio.file.Path dir = java.nio.file.Paths.get(dataDir);\nif (!java.nio.file.Files.isDirectory(dir) || !java.nio.file.Files.isWritable(dir))\n    throw new IllegalStateException(\"Data directory not writable: \" + dir);","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.daemonInitialize(); }\ncatch (IllegalStateException e) {\n    String fsProblem = e.getMessage().replace(\"; unable to start server\", \"\");\n    logger.error(\"Filesystem issue: {}\", fsProblem);\n}","preventionTips":["Ensure all configured directories exist and are writable by the cassanda OS user before start","Check disk space and mount points in container/K8s init checks","Keep SELinux/AppArmor policies allowing writes to data paths"],"tags":["filesystem","startup","permissions"],"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-14T11:17:12.474Z"}