{"record":{"id":"699f9815a7d861d6","repo":"apache/cassandra","slug":"keystore-password-file-s-does-not-exist","errorCode":null,"errorMessage":"keystore password file %s does not exist","messagePattern":"keystore password file (.+?) does not exist","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java","lineNumber":319,"sourceCode":"        protected boolean passwordMatchesIfPresent(String keyPassword)\n        {\n            return StringUtils.isEmpty(password) || keyPassword.equals(password);\n        }\n\n        private static String resolvePassword(String keystoreFilePath, String password, String passwordFilePath)\n        {\n            if (password != null)\n                return password;\n\n            if (StringUtils.isEmpty(passwordFilePath))\n                return null;\n\n            File keystorePasswordFile = new File(passwordFilePath);\n\n            if (!keystorePasswordFile.exists())\n            {\n                final String msg = format(\"keystore password file %s does not exist\", keystorePasswordFile.path());\n                throw new ConfigurationException(msg);\n            }\n\n            try\n            {\n                // we expect a password to be on the first line\n                List<String> lines = FileUtils.readLines(keystorePasswordFile);\n                if (lines.isEmpty())\n                    return \"\";\n\n                return lines.get(0);\n            }\n            catch (RuntimeException e)\n            {\n                throw new ConfigurationException(format(\"'Failed to read keystore password from the %s for %s\",\n                                                        keystorePasswordFile, keystoreFilePath),\n                                                 e);\n            }\n        }","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java#L301-L337","documentation":"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.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/security/FileBasedSslContextFactory.java:319 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the keystore password file at the configured path or fix the path in cassandra.yaml","Set the password inline via keystore_password instead of keystore_password_file"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}