{"record":{"id":"0d28b3bbc7ab70e2","repo":"apache/cassandra","slug":"there-are-configuration-entries-for-startup-checks-0d28b3","errorCode":null,"errorMessage":"There are configuration entries for startup checks which are not configurable: <notConfigurableCheckNames>","messagePattern":"There are configuration entries for startup checks which are not configurable: <notConfigurableCheckNames>","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/StartupChecksConfiguration.java","lineNumber":129,"sourceCode":"    private void apply()\n    {\n        List<String> notExistingCheckNames = new ArrayList<>();\n        List<String> notConfigurableCheckNames = new ArrayList<>();\n\n        for (Map.Entry<String, Map<String, Object>> userConfigEntry : options.entrySet())\n        {\n            String key = userConfigEntry.getKey();\n            StartupCheck check = startupChecks.getCheck(key);\n            if (check == null)\n                notExistingCheckNames.add(key);\n            else if (!check.isConfigurable())\n                notConfigurableCheckNames.add(key);\n        }\n\n        if (!notExistingCheckNames.isEmpty())\n            throw new IllegalStateException(\"There are configuration entries for startup checks which do not exist: \" + notExistingCheckNames);\n        if (!notConfigurableCheckNames.isEmpty())\n            throw new IllegalStateException(\"There are configuration entries for startup checks which are not configurable: \" + notConfigurableCheckNames);\n\n        for (StartupCheck check : startupChecks.getChecks())\n        {\n            String startupCheckName = check.name();\n            Map<String, Object> configMap = this.options.computeIfAbsent(startupCheckName, k -> new HashMap<>());\n            if (configMap.containsKey(ENABLED_PROPERTY))\n                configMap.putIfAbsent(ENABLED_PROPERTY, FALSE);\n            else if (check.isDisabledByDefault())\n                configMap.put(ENABLED_PROPERTY, FALSE);\n            else\n                configMap.put(ENABLED_PROPERTY, TRUE);\n        }\n    }\n\n    public void verify() throws StartupException\n    {\n        assert startupChecks != null;\n        startupChecks.verify(this);","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/StartupChecksConfiguration.java#L111-L147","documentation":"StartupChecksConfiguration.apply() also rejects configuration for checks that exist but are not configurable (isConfigurable() == false). Throwing IllegalStateException stops startup, since operator-provided options could never take effect for such a check.","triggerScenarios":"cassandra.yaml supplies startup_checks.<name> options where <name> is a valid check that does not accept configuration.","commonSituations":"Configuring a fixed, always-on check assuming it accepts options; a check changed to non-configurable in an upgrade while old config remains; copy-pasted config blocks between checks.","solutions":["Remove the options for that check from cassandra.yaml","Only configure checks whose isConfigurable() returns true","If you need the check configurable, implement it as configurable in its source"],"exampleFix":"# before\nstartup_checks:\n  always_on_check:\n    enabled: true\n# after (check is not configurable)\nstartup_checks: {}","handlingStrategy":"validation","validationCode":"for (Map.Entry<String, Map<String,Object>> e : yaml.startup_checks.entrySet()) {\n    StartupCheck c = findCheck(e.getKey());\n    if (c != null && !c.isConfigurable() && !e.getValue().isEmpty())\n        throw new IllegalArgumentException(e.getKey() + \" is not configurable\");\n}","typeGuard":null,"tryCatchPattern":"try { startupChecksConfiguration.apply(); }\ncatch (IllegalStateException e) { log.error(\"Remove options for non-configurable checks: {}\", e.getMessage()); throw e; }","preventionTips":["Check isConfigurable() before documenting/adding options for a check","Avoid copy-pasting option blocks between different checks","Verify check configurability after version upgrades"],"tags":["configuration","startup","validation"],"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-14T16:17:12.679Z"}