{"record":{"id":"c1b47f8772dbba1a","repo":"apache/cassandra","slug":"invalid-configuration-of-startup-checks","errorCode":null,"errorMessage":"Invalid configuration of startup_checks: ","messagePattern":"Invalid configuration of startup_checks: ","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1458,"sourceCode":"            throw new ConfigurationException(\"Invalid configuration for cms_commit_retry_strategy. \" + e.getMessage(), e);\n        }\n    }\n\n    public static StartupChecksConfiguration getStartupChecksConfiguration()\n    {\n        return startupChecksConfiguration;\n    }\n\n    private static void applyStartupChecks()\n    {\n        try\n        {\n            StartupChecks startupChecks = new StartupChecks().withDefaultTests().withTest(new FileSystemOwnershipCheck()).withServiceLoaderTests();\n            startupChecksConfiguration = new StartupChecksConfiguration(startupChecks, conf.startup_checks);\n        }\n        catch (Throwable t)\n        {\n            throw new ConfigurationException(\"Invalid configuration of startup_checks: \" + t.getMessage());\n        }\n    }\n\n    private static String storagedirFor(String type)\n    {\n        return storagedir(type + \"_directory\") + File.pathSeparator() + type;\n    }\n\n    private static String storagedir(String errMsgType)\n    {\n        String storagedir = STORAGE_DIR.getString();\n        if (storagedir == null)\n            throw new ConfigurationException(errMsgType + \" is missing and \" + STORAGE_DIR.getKey() + \" system property is not set\", false);\n        return storagedir;\n    }\n\n    static int calculateDefaultSpaceInMiB(String type, String path, String setting, int preferredSizeInMiB, long totalSpaceInBytes, long totalSpaceNumerator, long totalSpaceDenominator)\n    {","sourceCodeStart":1440,"sourceCodeEnd":1476,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1440-L1476","documentation":"DatabaseDescriptor failed to construct the StartupChecksConfiguration from the cassandra.yaml startup_checks section. Any throwable while building the default startup checks plus service-loader-supplied tests and applying conf.startup_checks is converted into a ConfigurationException. This means the startup_checks map/list in the config is structurally invalid or references an unusable check.","triggerScenarios":"cassandra.yaml defines a startup_checks section whose entries (class names, enable/disable flags, parameters) cannot be applied to the StartupChecks object built from withDefaultTests(), FileSystemOwnershipCheck, and withServiceLoaderTests().","commonSituations":"Disabling a startup check with a misspelled check name; a custom check class on the classpath failing to load via ServiceLoader; merging config files from different Cassandra versions where startup_checks keys differ.","solutions":["Read t.getMessage() appended to the error to identify the offending check entry.","Correct or remove the invalid startup_checks entries in cassandra.yaml.","Verify any custom startup-check classes are on the classpath and registered for ServiceLoader.","Temporarily remove the startup_checks section entirely to confirm it is the source of the failure."],"exampleFix":"// before (cassandra.yaml)\nstartup_checks:\n  - filesystem_ownership_check: disableed\n// after\nstartup_checks:\n  - filesystem_ownership_check: disable","handlingStrategy":"validation","validationCode":"// verify every named startup check exists before applying\nMap<String, Object> checks = (Map<String, Object>) yaml.get(\"startup_checks\");\nif (checks != null) checks.keySet().forEach(k ->\n    requireKnownStartupCheck(k)); // throws if not in default/service-loader registry","typeGuard":null,"tryCatchPattern":"catch (ConfigurationException e) { logger.error(\"startup_checks section invalid: {}\", e.getMessage()); throw e; }","preventionTips":["Only reference documented check names","Keep custom check classes and ServiceLoader registration files on the classpath","Diff cassandra.yaml against the version's shipped default when upgrading"],"tags":["configuration","startup-checks","cassandra"],"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"}