apache/cassandra · warning
Used environment property variable
Error message
Used environment property variable {} to override Cassandra configuration but there is no such environment property counter-part to override. What it means
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).
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.
Example fix
// before (docker) -e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch # typo // after -e CASSANDRA_ENDPOINT_SNITCH_NAME=GossipingPropertyFileSnitch # valid key per version (or set endpoint_snitch in cassandra.yaml)
Defensive patterns
Strategy: validation
Validate before calling
# check the env-derived key exists in yaml before relying on it
key=$(echo "$name" | sed 's/^CASSANDRA_//' | tr 'A-Z_' 'a-z/')
grep -q "^${key}:" conf/cassandra.yaml || echo "unknown env config key: $name" Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Detected environment variable
- Used sytem property variable
- a hints file cannot be configured for both compression and…
- A maximum number of tokens per node is supported
- accord.cache_size option was set incorrectly to
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/3515cf8b8a4245e6.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/config/YamlConfigurationLoader.java:246
{
String originalKey = env.getKey();
if (env.getKey().startsWith(ENVIRONMENT_VARIABLE_PREFIX))
{
String configKey = LocalizeString.toLowerCaseLocalized(originalKey.replace(ENVIRONMENT_VARIABLE_PREFIX, "")
.replace(NESTED_CONFIG_SEPARATOR_ENVIRONMENT, NESTED_CONFIG_SEPARATOR));
String configValue = env.getValue();
if (OVERRIDABLE_CONFIG_NAMES.contains(configKey))
{
if (configValue != null && !overridingProperties.containsKey(configKey))
{
if (!DatabaseDescriptor.hasLoggedConfig()) // CASSANDRA-9909: Avoid flooding config during initialization
logger.warn("Detected environment variable {}={} override for Cassandra configuration '{}'.", originalKey, configValue, configKey);
overridingProperties.put(configKey, getScalarOrJsonTree(configValue));
}
}
else
{
logger.warn("Used environment property variable {} to override Cassandra configuration but there is no such environment property counter-part to override.", originalKey);
}
}
}
if (!overridingProperties.isEmpty())
updateFromMap(maybeFlattenNestedProperties(overridingProperties), false, obj);
}
}
private static Map<String, Object> maybeFlattenNestedProperties(Map<String, Object> overridingProperties)
{
Map<String, Object> copyOfProperties = new HashMap<>(overridingProperties);
for (Map.Entry<String, Object> entry : overridingProperties.entrySet())
{
String[] parts = entry.getKey().split("\\.");
if (parts.length > 1 && !parts[parts.length - 1].equals("parameters") && !parts[parts.length - 1].equals("configurations"))
{
if (entry.getValue() instanceof Map)
{View on GitHub (pinned to 88fd0f6a0e)