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
- Ensure the configuration source defines at least one selector and valid root groups
- Check why load() produced an empty selector list (file path, permissions, parse errors) in the manager logs
- 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
- Ship a default config with at least one catch-all selector
- Monitor refresh failures and config file emptiness
- Gate query admission on successful initial config load
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
- ACCUMULO_TABLE_EXISTS
- Selector refers to nonexistent group: %s
- Selector specifies an invalid query type: %s
- Ambiguous configuration for %s. Matches %s and %s
- Unknown property at line %s:%s: %s
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/0325086af028c437.
Report an issue: GitHub.