apache/cassandra · error · ConfigurationException

Dictionary file %s does not exist.

Error message

Dictionary file %s does not exist.

What it means

The password validator's dictionary guardrail requires a word-list file on the node's local filesystem. When the configured dictionary path (cassandra.password_validator.dictionary) points to a path that does not exist, validateParameters throws a ConfigurationException during configuration loading.

Source

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

        int minimumLenghtOfFailCharacteristics = 0;
        for (int i = 0; i < characteristicsFail; i++)
            minimumLenghtOfFailCharacteristics += minimumLengthsFail[i];

        if (minimumLenghtOfFailCharacteristics > lengthFail)
            throw new ConfigurationException(format("The shortest password to pass the failing validator for any %s " +
                                                    "characteristics out of %s is %s but you have set the %s to %s.",
                                                    characteristicsFail,
                                                    MAX_CHARACTERISTICS,
                                                    minimumLenghtOfFailCharacteristics,
                                                    LENGTH_FAIL_KEY,
                                                    lengthFail));

        if (dictionary != null)
        {
            File dictionaryFile = new File(dictionary);
            if (!dictionaryFile.exists())
                throw new ConfigurationException(format("Dictionary file %s does not exist.", dictionary));

            if (!dictionaryFile.isReadable())
                throw new ConfigurationException(format("Dictionary file %s is not readable.", dictionary));
        }
    }

    private ConfigurationException getValidationException(String key1, int value1, String key2, int value2)
    {
        return new ConfigurationException(format("%s of value %s is less or equal to %s of value %s",
                                                 key1, value1,
                                                 key2, value2));
    }
}

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Create the dictionary file at the configured path, or correct the path in the configuration to point at an existing file
  2. Verify on each node with `ls <path>` that the file exists locally (config is per-node)
  3. Use a deployment tool (e.g. config management) to distribute the dictionary file to all nodes before applying the config

Example fix

// before
cassandra.password_validator.dictionary: /etc/cassandra/passwords.txt  (file missing)
// after
sudo cp wordlist.txt /etc/cassandra/passwords.txt  # then reload config, or fix the path
Defensive patterns

Strategy: validation

Validate before calling

import java.io.File;
File f = new File(dictionaryPath);
if (!f.exists()) throw new IllegalStateException("Dictionary missing: " + dictionaryPath);

Try / catch

try {
    applyGuardrailConfig(config);
} catch (ConfigurationException e) {
    if (e.getMessage().startsWith("Dictionary file") && e.getMessage().contains("does not exist")) {
        logger.error("Provision dictionary at configured path: {}", e.getMessage());
    }
}

Prevention

When it happens

Trigger: Setting cassandra.password_validator.dictionary to a nonexistent or mistyped absolute path; the file being deleted after configuration was written; paths valid on one node but not others in a heterogeneous deployment.

Common situations: Config file copied from another machine with a different layout; the dictionary file not provisioned on every node; relative path resolved against an unexpected working directory.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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