prestodb/presto · error · PrestoException

CONFIGURATION_INVALID

CONFIGURATION_INVALID

Error message

No root groups are configured

What it means

ReloadingResourceGroupConfigurationManager.getRootGroups refuses to serve when the reloading selectors list is empty, throwing PrestoException with code CONFIGURATION_INVALID. This guards against routing queries with an empty (failed or not-yet-loaded) configuration.

Source

Thrown at presto-resource-group-managers/src/main/java/com/facebook/presto/resourceGroups/reloading/ReloadingResourceGroupConfigurationManager.java:109

        this.maxRefreshInterval = config.getMaxRefreshInterval();
        this.exactMatchSelectorEnabled = config.getExactMatchSelectorEnabled();
        this.managerSpecProvider = requireNonNull(managerSpecProvider, "provider is null");
        load();
    }

    @Override
    protected Optional<Duration> getCpuQuotaPeriod()
    {
        return cpuQuotaPeriod.get();
    }

    @Override
    protected List<ResourceGroupSpec> getRootGroups()
    {
        checkMaxRefreshInterval();

        if (this.selectors.get().isEmpty()) {
            throw new PrestoException(CONFIGURATION_INVALID, "No root groups are configured");
        }

        return rootGroups.get();
    }

    @PreDestroy
    public void destroy()
    {
        configExecutor.shutdownNow();
    }

    @PostConstruct
    public void start()
    {
        if (started.compareAndSet(false, true)) {
            configExecutor.scheduleWithFixedDelay(this::load, 10, 10, TimeUnit.SECONDS);
        }
    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Ensure the configuration source defines at least one selector and valid root groups
  2. Check why load() produced an empty selector list (file path, permissions, parse errors) in the manager logs
  3. Call the manager's load/refresh endpoint or restart after fixing the config source

Example fix

// before (resource-groups.json) missing selectors entirely
// after: add selectors
{"selectors": [{"source": ".*"}], "rootGroups": [...]}
Defensive patterns

Strategy: try-catch

Validate before calling

if (manager.getSelectors().isEmpty()) {
    throw new IllegalStateException("Refusing to serve queries: no selectors configured");
}

Try / catch

try { rootGroups = manager.getRootGroups(); } catch (PrestoException e) {
    if (e.getErrorCode() == ResourceGroupManagerErrorCode.CONFIGURATION_INVALID.toErrorCode()) { reloadConfig(); }
    else throw e;
}

Prevention

When it happens

Trigger: getRootGroups called before the configuration file has loaded, or after a reload that produced zero selectors; selectors atomic reference empty at call time.

Common situations: Resource group config file missing/empty at startup; reload wrote an empty selectors list; manager started before config source is available.

Related errors


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