{"record":{"id":"3351620ffc72391f","repo":"apache/cassandra","slug":"bad-configuration-unable-to-start-server","errorCode":null,"errorMessage":"Bad configuration; unable to start server: ","messagePattern":"Bad configuration; unable to start server: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":2449,"sourceCode":"            FileUtils.createDirectory(conf.saved_caches_directory);\n\n            if (conf.cdc_enabled)\n            {\n                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. */","sourceCodeStart":2431,"sourceCodeEnd":2467,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L2431-L2467","documentation":"DatabaseDescriptor.applyAll wraps any ConfigurationException from config validation into an IllegalArgumentException with the prefix 'Bad configuration; unable to start server: '. It is a catch-all indicating invalid cassandra.yaml settings prevented daemon startup; the underlying ConfigurationException message is appended.","triggerScenarios":"Any invalid configuration caught during daemon init: null required directories, invalid concurrency values, bad endpoint/snitch settings, invalid partitioner, etc.","commonSituations":"Typos or invalid values in cassandra.yaml; config edited between restarts; automated provisioning writing bad keys.","solutions":["Read the appended ConfigurationException message after the colon for the real cause","Validate cassandra.yaml against the current version's expected keys","Fix the offending configuration value and restart","Check cassandra version upgrade notes for renamed/removed config keys"],"exampleFix":"// before\nconcurrent_reads: -1\n// after\nconcurrent_reads: 32","handlingStrategy":"try-catch","validationCode":"// Pre-validate critical config keys before DatabaseDescriptor.applyAll\ncheckNotNull(yaml.get(\"data_file_directories\"), \"data_file_directories\");\ncheckNotNull(yaml.get(\"commitlog_directory\"), \"commitlog_directory\");","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.daemonInitialize(); }\ncatch (IllegalArgumentException e) {\n    // cause message after 'Bad configuration; unable to start server: ' is the real reason\n    logger.error(\"Config error: {}\", e.getMessage().replaceFirst(\".*: \", \"\"));\n}","preventionTips":["Parse the appended ConfigurationException message for the root cause","Keep cassandra.yaml valid per version; diff against release defaults after upgrades","Validate config in CI before deploying"],"tags":["config","startup","wrapper"],"backgroundTag":"invalid-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}