prestodb/presto · error · RuntimeException

Unable to load properties from config file

Error message

Unable to load properties from config file

What it means

The router's CustomSchedulerManager cannot read the scheduler configuration file into a Properties map. loadScheduler loads the custom scheduler plugin's config file; if loadProperties throws IOException (missing file, unreadable permissions, directory instead of file), it is wrapped in this RuntimeException. The scheduler cannot be initialized without these properties.

Source

Thrown at presto-router/src/main/java/com/facebook/presto/router/scheduler/CustomSchedulerManager.java:86

        }
        this.configFile = configFile;
    }

    public void addSchedulerFactory(SchedulerFactory factory)
    {
        checkArgument(factories.putIfAbsent(factory.getName(), factory) == null,
                "Presto Router Scheduler '%s' is already registered", factory.getName());
    }

    public void loadScheduler()
    {
        File configFileLocation = configFile.getAbsoluteFile();
        Map<String, String> properties;
        try {
            properties = new HashMap<>(loadProperties(configFileLocation));
        }
        catch (IOException e) {
            throw new RuntimeException("Unable to load properties from config file", e);
        }

        String name = properties.remove(NAME_PROPERTY);
        checkArgument(!isNullOrEmpty(name),
                "Router scheduler configuration %s does not contain %s", configFileLocation, NAME_PROPERTY);

        log.info("-- Loading Presto Router Scheduler %s --", name);
        SchedulerFactory factory = factories.get(name);
        checkState(factory != null, "Presto Router Scheduler %s is not registered", name);
        this.scheduler = factory.create(ImmutableMap.copyOf(properties));
        log.info("-- Loaded Presto Router Scheduler %s --", name);
    }

    public Scheduler getScheduler()
    {
        checkState(scheduler != null, "scheduler was not loaded");
        return scheduler;
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Verify the scheduler config file path configured in router properties exists and is readable by the router process (use an absolute path)
  2. Fix file permissions (chmod/chown) or recreate the missing config file
  3. Start the router from a working directory where the relative config path resolves, or change to an absolute path

Example fix

// before (router properties)
router.scheduler.custom.my-scheduler.config-path=scheduler.properties
// after
router.scheduler.custom.my-scheduler.config-path=/etc/presto/router/scheduler.properties
Defensive patterns

Strategy: try-catch

Validate before calling

File cfg = new File(configPath);
if (!cfg.isFile()) throw new IllegalStateException("Scheduler config missing: " + cfg.getAbsolutePath());
if (!cfg.canRead()) throw new IllegalStateException("Scheduler config not readable: " + cfg.getAbsolutePath());

Try / catch

try {
    schedulerManager.loadScheduler();
} catch (RuntimeException e) {
    if (e.getMessage().contains("Unable to load properties")) {
        LOG.error("Check scheduler config path/permissions: %s", e.getCause());
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling CustomSchedulerManager.loadScheduler() (via SchedulerFactory.create for CUSTOM_PLUGIN_SCHEDULER type) when the configured scheduler config file path does not exist, is a directory, or is not readable by the router process.

Common situations: Wrong 'router.scheduler.custom.<name>.config-path' in router properties; file deleted or mounted after router start; incorrect filesystem permissions for the router user; relative path resolved against an unexpected working directory.

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/4d166fceafaf4654. Report an issue: GitHub.