apache/cassandra · error · ConfigurationException

keystore password file

Error message

keystore password file %s does not exist

What it means

Fired in resolvePassword when no inline password is configured but the configured password file path (e.g. keystore_password_file) does not exist on disk. ConfigurationException is thrown so SSL setup fails fast rather than silently using a null password.

Solutions

  1. Create the keystore password file at the configured path or fix the path in cassandra.yaml
  2. Set the password inline via keystore_password instead of keystore_password_file
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java:319 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java:319

        protected boolean passwordMatchesIfPresent(String keyPassword)
        {
            return StringUtils.isEmpty(password) || keyPassword.equals(password);
        }

        private static String resolvePassword(String keystoreFilePath, String password, String passwordFilePath)
        {
            if (password != null)
                return password;

            if (StringUtils.isEmpty(passwordFilePath))
                return null;

            File keystorePasswordFile = new File(passwordFilePath);

            if (!keystorePasswordFile.exists())
            {
                final String msg = format("keystore password file %s does not exist", keystorePasswordFile.path());
                throw new ConfigurationException(msg);
            }

            try
            {
                // we expect a password to be on the first line
                List<String> lines = FileUtils.readLines(keystorePasswordFile);
                if (lines.isEmpty())
                    return "";

                return lines.get(0);
            }
            catch (RuntimeException e)
            {
                throw new ConfigurationException(format("'Failed to read keystore password from the %s for %s",
                                                        keystorePasswordFile, keystoreFilePath),
                                                 e);
            }
        }

View on GitHub (pinned to 88fd0f6a0e)