prestodb/presto · critical · PrestoException

CONFIGURATION_UNAVAILABLE

CONFIGURATION_UNAVAILABLE

Error message

Failed to read password file: 

What it means

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.

Source

Thrown at presto-password-authenticators/src/main/java/com/facebook/presto/password/file/PasswordStore.java:110

            catch (HashedPasswordException e) {
                throw invalidFile(lineNumber, e.getMessage(), e);
            }
        }
        return ImmutableMap.copyOf(users);
    }

    private static RuntimeException invalidFile(int lineNumber, String message, Throwable cause)
    {
        return new PrestoException(CONFIGURATION_INVALID, format("Error in password file line %s: %s", lineNumber, message), cause);
    }

    private static List<String> readPasswordFile(File file)
    {
        try {
            return Files.readAllLines(file.toPath());
        }
        catch (IOException e) {
            throw new PrestoException(CONFIGURATION_UNAVAILABLE, "Failed to read password file: " + file, e);
        }
    }

    private static HashedPassword getHashedPassword(String hashedPassword)
    {
        switch (getHashingAlgorithm(hashedPassword)) {
            case BCRYPT:
                return password -> doesBCryptPasswordMatch(password, hashedPassword);
            case PBKDF2:
                return password -> doesPBKDF2PasswordMatch(password, hashedPassword);
        }
        throw new HashedPasswordException("Hashing algorithm of password cannot be determined");
    }

    public interface HashedPassword
    {
        boolean matches(String password);
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Verify the file.password-file path exists and is spelled correctly
  2. Fix permissions/ownership so the coordinator OS user can read it (e.g. chmod 640, chown to the presto user)
  3. Restore the file from backup or regenerate it if deleted or its mount is unavailable
  4. Restart the coordinator after fixing so loadPasswordFile() succeeds

Example fix

// before (server config)
file.password-file=/etc/presto/passwd.db  // path missing
// after
file.password-file=/etc/presto/password.db  // verified: exists, readable by presto user
Defensive patterns

Strategy: validation

Validate before calling

File f = new File(config.getPasswordFile());
if (!f.isFile() || !f.canRead()) {
    throw new IllegalStateException("Password file missing or unreadable: " + f);
}

Try / catch

try {
    store = new FilePasswordStore(config);
} catch (PrestoException e) {
    if (e.getErrorCode() == CONFIGURATION_UNAVAILABLE) {
        log.error("Cannot read password file: %s", e.getMessage());
    }
    throw e; // fail fast; do not serve auth from a broken store
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/e02630616f14548b. Report an issue: GitHub.