{"record":{"id":"3515cf8b8a4245e6","repo":"apache/cassandra","slug":"used-environment-property-variable-to-override","errorCode":null,"errorMessage":"Used environment property variable {} to override Cassandra configuration but there is no such environment property counter-part to override.","messagePattern":"Used environment property variable (.+?) to override Cassandra configuration but there is no such environment property counter-part to override\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/config/YamlConfigurationLoader.java","lineNumber":246,"sourceCode":"            {\n                String originalKey = env.getKey();\n                if (env.getKey().startsWith(ENVIRONMENT_VARIABLE_PREFIX))\n                {\n                    String configKey = LocalizeString.toLowerCaseLocalized(originalKey.replace(ENVIRONMENT_VARIABLE_PREFIX, \"\")\n                                                                                      .replace(NESTED_CONFIG_SEPARATOR_ENVIRONMENT, NESTED_CONFIG_SEPARATOR));\n                    String configValue = env.getValue();\n                    if (OVERRIDABLE_CONFIG_NAMES.contains(configKey))\n                    {\n                        if (configValue != null && !overridingProperties.containsKey(configKey))\n                        {\n                            if (!DatabaseDescriptor.hasLoggedConfig()) // CASSANDRA-9909: Avoid flooding config during initialization\n                                logger.warn(\"Detected environment variable {}={} override for Cassandra configuration '{}'.\", originalKey, configValue, configKey);\n                            overridingProperties.put(configKey, getScalarOrJsonTree(configValue));\n                        }\n                    }\n                    else\n                    {\n                        logger.warn(\"Used environment property variable {} to override Cassandra configuration but there is no such environment property counter-part to override.\", originalKey);\n                    }\n                }\n            }\n            if (!overridingProperties.isEmpty())\n                updateFromMap(maybeFlattenNestedProperties(overridingProperties), false, obj);\n        }\n    }\n\n    private static Map<String, Object> maybeFlattenNestedProperties(Map<String, Object> overridingProperties)\n    {\n        Map<String, Object> copyOfProperties = new HashMap<>(overridingProperties);\n        for (Map.Entry<String, Object> entry : overridingProperties.entrySet())\n        {\n            String[] parts = entry.getKey().split(\"\\\\.\");\n            if (parts.length > 1 && !parts[parts.length - 1].equals(\"parameters\") && !parts[parts.length - 1].equals(\"configurations\"))\n            {\n                if (entry.getValue() instanceof Map)\n                {","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/YamlConfigurationLoader.java#L228-L264","documentation":"Warning from YamlConfigurationLoader.maybeAddEnvironmentVariables when an environment variable with the Cassandra env prefix does not map to a known overridable configuration key. The variable is ignored (does not override cassandra.yaml), so the intended override silently has no effect; this message flags that (with a pre-existing awkward 'environment property variable' phrasing).","triggerScenarios":"Setting env vars like CASSANDRA_COMMITLOG_SYNC (typo), CASSANDRA_SOME_REMOVED_SETTING after an upgrade, or any CASSANDRA_-prefixed name not present in OVERRIDABLE_CONFIG_NAMES when the node starts and scans the environment.","commonSituations":"Typos in container env definitions; stale variables from older images after config-key renames; variables intended for other tools prefixed CASSANDRA_ by convention but never valid config keys; Helm/Compose templates with outdated keys.","solutions":["Correct the env var name to a valid overridable key (see the current version's cassandra.yaml key names, uppercase with underscores).","Move the setting to cassandra.yaml if the key exists but isn't env-overridable.","Audit container/deployment manifests after version upgrades for renamed or removed config keys.","Treat this warning at startup as 'your override is being ignored' — do not dismiss it."],"exampleFix":"// before (docker)\n-e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch   # typo\n// after\n-e CASSANDRA_ENDPOINT_SNITCH_NAME=GossipingPropertyFileSnitch  # valid key per version\n(or set endpoint_snitch in cassandra.yaml)","handlingStrategy":"validation","validationCode":"# check the env-derived key exists in yaml before relying on it\nkey=$(echo \"$name\" | sed 's/^CASSANDRA_//' | tr 'A-Z_' 'a-z/')\ngrep -q \"^${key}:\" conf/cassandra.yaml || echo \"unknown env config key: $name\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fix typos in CASSANDRA_* env vars — unknown names are silently ignored for config.","After version upgrades, re-validate env var names against the new cassandra.yaml.","Do not use the CASSANDRA_ prefix for variables that are not config keys."],"tags":["configuration","environment-variables","typo","containers"],"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"}