apache/cassandra · error · ConfigurationException
%s can not be equal to %s. You set %s and %s respectively.
Error message
%s can not be equal to %s. You set %s and %s respectively.
What it means
Thrown as a ConfigurationException when characteristicsFail equals characteristicsWarn in the password guardrail config. The fail threshold must be distinct from (specifically lower than) the warn threshold; an equal value is ambiguous, so validateParameters rejects it with a message echoing both configured values.
Source
Thrown at src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java:229
LOWER_CASE_FAIL_KEY,
lowerCaseFail);
if (illegalSequenceLength < IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH)
throw new ConfigurationException(format("Illegal sequence length can not be lower than %s.",
IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH));
if (characteristicsWarn > 4)
throw new ConfigurationException(format("%s can not be bigger than %s",
CHARACTERISTIC_WARN_KEY,
MAX_CHARACTERISTICS));
if (characteristicsFail > 4)
throw new ConfigurationException(format("%s can not be bigger than %s",
CHARACTERISTIC_FAIL_KEY,
MAX_CHARACTERISTICS));
if (characteristicsFail == characteristicsWarn)
throw new ConfigurationException(format("%s can not be equal to %s. You set %s and %s respectively.",
CHARACTERISTIC_FAIL_KEY,
CHARACTERISTIC_WARN_KEY,
characteristicsFail,
characteristicsWarn));
if (characteristicsFail > characteristicsWarn)
throw new ConfigurationException(format("%s can not be bigger than %s. You have set %s and %s respectively.",
CHARACTERISTIC_FAIL_KEY,
CHARACTERISTIC_WARN_KEY,
characteristicsFail,
characteristicsWarn));
int[] minimumLengthsWarn = new int[]{ specialsWarn, digitsWarn,
upperCaseWarn, lowerCaseWarn };
Arrays.sort(minimumLengthsWarn);
int minimumLenghtOfWarnCharacteristics = 0;
for (int i = 0; i < characteristicsWarn; i++)View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Set characteristics_fail to a value strictly less than characteristics_warn (fail triggers before warn by design here)
- Remove one of the settings and use defaults
- Decide the intended warn/fail policy first, then configure ordered distinct thresholds
Example fix
// before password_guardrails: characteristics_warn: 3 characteristics_fail: 3 // after password_guardrails: characteristics_warn: 3 characteristics_fail: 2
Defensive patterns
Strategy: validation
Validate before calling
if (characteristicsFail == characteristicsWarn)
throw new ConfigurationException("characteristics_fail can not be equal to characteristics_warn"); Prevention
- Configure warn and fail as an ordered pair with fail < warn
- Add a config-lint rule rejecting equal warn/fail thresholds
- Test the guardrail policy with sample passwords after every change
When it happens
Trigger: Setting characteristics_fail and characteristics_warn to the same number in cassandra.yaml password guardrails.
Common situations: Copy-pasting one threshold to both keys; trying to 'skip' warning and go straight to failure by equating thresholds; templated configs substituting the same value into both fields.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Invalid guardrails configuration:
- %s can not be greater than %s
- %s can not be bigger than %s
- %s can not be bigger than %s. You have set %s and %s respect
- The shortest password to pass the failing validator for any
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/ed445788cd4a89e7.
Report an issue: GitHub.