prestodb/presto · critical · RedisProviderInitializationException

Unable to Load RedisProviderPlugin

Error message

Unable to Load RedisProviderPlugin

What it means

PropertiesUtil.loadProperties reads a properties file from disk and wraps any IOException thrown while opening or reading it into a RedisProviderInitializationException with this message. It indicates the Redis provider plugin could not load its configuration file, so plugin initialization aborts. The misleading wording comes from the generic message; the actual problem is file I/O on the properties file (or the credentials file referenced by initializeConfigs).

Source

Thrown at redis-hbo-provider/src/main/java/com/facebook/presto/statistic/PropertiesUtil.java:37

import java.nio.file.Files;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import static com.google.common.collect.Maps.fromProperties;

public final class PropertiesUtil
{
    private PropertiesUtil() {}

    public static Map<String, String> loadProperties(File file)
    {
        Properties properties = new Properties();
        try (InputStream in = Files.newInputStream(file.toPath())) {
            properties.load(in);
        }
        catch (IOException e) {
            throw new RedisProviderInitializationException("Unable to Load RedisProviderPlugin", e);
        }
        return fromProperties(properties);
    }

    public static Map<String, String> initializeConfigs(String path)
    {
        Map<String, String> properties = new HashMap<>(loadProperties(new File(path)));
        // load secrets
        if (properties.containsKey(RedisProviderConfig.REDIS_CREDENTIALS_PATH)) {
            File credentialFile = new File(properties.get(RedisProviderConfig.REDIS_CREDENTIALS_PATH));
            properties.putAll(loadProperties(credentialFile));
        }
        return properties;
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Verify the file path passed to loadProperties/initializeConfigs exists and is a regular readable file (ls -l / Files.exists / file.canRead()).
  2. Fix the permissions so the Presto process user can read the properties file (chmod/chown) and confirm correct ownership in containers.
  3. Check that any credentials file referenced by the redis.credentials-path property exists and is readable, since initializeConfigs loads it through the same code path.
  4. Use an absolute path (or correct relative path for the coordinator/worker working directory) in the plugin configuration.
  5. Read the wrapped IOException cause for the exact reason (NoSuchFileException, AccessDeniedException, etc.) and address it specifically.

Example fix

// before
Map<String, String> properties = PropertiesUtil.initializeConfigs("redis-provider.properties");
// after
File configFile = new File("/etc/presto/redis-provider.properties");
if (!configFile.isFile() || !configFile.canRead()) {
    throw new IllegalStateException("Redis provider config missing or unreadable: " + configFile.getAbsolutePath());
}
Map<String, String> properties = PropertiesUtil.initializeConfigs(configFile.getAbsolutePath());
Defensive patterns

Strategy: validation

Validate before calling

File file = new File(path);
if (!file.exists()) {
    throw new IllegalStateException("Properties file does not exist: " + file.getAbsolutePath());
}
if (!file.isFile()) {
    throw new IllegalStateException("Path is not a regular file: " + file.getAbsolutePath());
}
if (!file.canRead()) {
    throw new IllegalStateException("No read permission for: " + file.getAbsolutePath());
}
// also verify credentials file referenced by config
Map<String, String> props = PropertiesUtil.initializeConfigs(file.getAbsolutePath());

Type guard

private static boolean isReadableFile(File file)
{
    return file != null && file.isFile() && file.canRead();
}

Try / catch

try {
    Map<String, String> configs = PropertiesUtil.loadProperties(configFile);
}
catch (RedisProviderInitializationException e) {
    Throwable cause = e.getCause(); // IOException: NoSuchFileException, AccessDeniedException, etc.
    throw new IllegalStateException("Cannot load Redis provider config " + configFile + ": " + cause, e);
}

Prevention

When it happens

Trigger: Calling PropertiesUtil.loadProperties(File) or initializeConfigs(path) when the properties file path does not exist, the path is a directory, the process lacks read permissions, a symlink is broken, or the credentials file configured via redis.credentials-path (REDIS_CREDENTIALS_PATH) is unreadable. Also thrown on malformed properties input that triggers an IOException during load.

Common situations: Typo or wrong absolute path in redis.properties.file / etc/presto config; the plugin launched under a service user without read access to the config; container image missing the mounted properties file; credentials file deleted or moved after being referenced; relative path resolved against an unexpected working directory.

Related errors


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