{"record":{"id":"e02630616f14548b","repo":"prestodb/presto","slug":"configuration-unavailable","errorCode":"CONFIGURATION_UNAVAILABLE","errorMessage":"Failed to read password file: ","messagePattern":"Failed to read password file: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"critical","filePath":"presto-password-authenticators/src/main/java/com/facebook/presto/password/file/PasswordStore.java","lineNumber":110,"sourceCode":"            catch (HashedPasswordException e) {\n                throw invalidFile(lineNumber, e.getMessage(), e);\n            }\n        }\n        return ImmutableMap.copyOf(users);\n    }\n\n    private static RuntimeException invalidFile(int lineNumber, String message, Throwable cause)\n    {\n        return new PrestoException(CONFIGURATION_INVALID, format(\"Error in password file line %s: %s\", lineNumber, message), cause);\n    }\n\n    private static List<String> readPasswordFile(File file)\n    {\n        try {\n            return Files.readAllLines(file.toPath());\n        }\n        catch (IOException e) {\n            throw new PrestoException(CONFIGURATION_UNAVAILABLE, \"Failed to read password file: \" + file, e);\n        }\n    }\n\n    private static HashedPassword getHashedPassword(String hashedPassword)\n    {\n        switch (getHashingAlgorithm(hashedPassword)) {\n            case BCRYPT:\n                return password -> doesBCryptPasswordMatch(password, hashedPassword);\n            case PBKDF2:\n                return password -> doesPBKDF2PasswordMatch(password, hashedPassword);\n        }\n        throw new HashedPasswordException(\"Hashing algorithm of password cannot be determined\");\n    }\n\n    public interface HashedPassword\n    {\n        boolean matches(String password);\n    }","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-password-authenticators/src/main/java/com/facebook/presto/password/file/PasswordStore.java#L92-L128","documentation":"PasswordStore.readPasswordFile throws a PrestoException with code CONFIGURATION_UNAVAILABLE when it cannot read the configured password file from disk (IOException from Files.readAllLines). The library treats an unreadable password file as a server configuration problem, not an authentication failure, so all authentications via this store fail until the file is readable.","triggerScenarios":"loadPasswordFile() calls readPasswordFile() and hits an IOException: file does not exist, wrong path/permissions, or unreadable mount, when the password store initializes or reloads the file.","commonSituations":"file.password-file points to a moved/deleted path; file owned by a different user than the coordinator process; permissions tightened after hardening (chmod/chown); NFS mount unavailable at startup; SELinux denial on the host.","solutions":["Verify the file.password-file path exists and is spelled correctly","Fix permissions/ownership so the coordinator OS user can read it (e.g. chmod 640, chown to the presto user)","Restore the file from backup or regenerate it if deleted or its mount is unavailable","Restart the coordinator after fixing so loadPasswordFile() succeeds"],"exampleFix":"// before (server config)\nfile.password-file=/etc/presto/passwd.db  // path missing\n// after\nfile.password-file=/etc/presto/password.db  // verified: exists, readable by presto user","handlingStrategy":"validation","validationCode":"File f = new File(config.getPasswordFile());\nif (!f.isFile() || !f.canRead()) {\n    throw new IllegalStateException(\"Password file missing or unreadable: \" + f);\n}","typeGuard":null,"tryCatchPattern":"try {\n    store = new FilePasswordStore(config);\n} catch (PrestoException e) {\n    if (e.getErrorCode() == CONFIGURATION_UNAVAILABLE) {\n        log.error(\"Cannot read password file: %s\", e.getMessage());\n    }\n    throw e; // fail fast; do not serve auth from a broken store\n}","preventionTips":["Package the password file with the deployment and verify existence in a startup health check","Set ownership/permissions (presto user readable, e.g. 640) in provisioning automation","Avoid network-mounted password files, or check mount availability before coordinator start","Monitor CONFIGURATION_UNAVAILABLE error rates in coordinator logs"],"tags":["io","filesystem","configuration","presto-exception"],"backgroundTag":"config-file-not-found","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}