apache/cassandra · error · ConfigurationException

%s can not be bigger than %s. You have set %s and %s respect

Error message

%s can not be bigger than %s. You have set %s and %s respectively.

What it means

Thrown as a ConfigurationException when characteristicsFail is greater than characteristicsWarn in the password guardrail config. The design expects the failure threshold to be reached before the warning threshold, so fail > warn is invalid; the error includes both configured values ('%s can not be bigger than %s. You have set %s and %s respectively.').

Source

Thrown at src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java:236

        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++)
            minimumLenghtOfWarnCharacteristics += minimumLengthsWarn[i];

        if (minimumLenghtOfWarnCharacteristics > lengthWarn)
            throw new ConfigurationException(format("The shortest password to pass the warning validator for any %s " +
                                                    "characteristics out of %s is %s but you have set the %s to %s.",
                                                    characteristicsWarn,
                                                    MAX_CHARACTERISTICS,

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Swap the values so characteristics_fail < characteristics_warn
  2. Lower characteristics_fail or raise characteristics_warn until fail <= warn (and fail != warn)
  3. Consult the Cassandra password guardrail docs on threshold ordering

Example fix

// before
password_guardrails:
  characteristics_warn: 2
  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 bigger than characteristics_warn. Set " + characteristicsFail + " and " + characteristicsWarn + " respectively.");

Prevention

When it happens

Trigger: Setting characteristics_fail higher than characteristics_warn in cassandra.yaml, e.g. warn: 2, fail: 3.

Common situations: Assuming warn triggers before fail (the inverse ordering) as in other systems; swapping the two values by mistake; misunderstanding the direction of the thresholds in Cassandra's guardrails.

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


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/b496258ab68fd9ff. Report an issue: GitHub.