prestodb/presto · error · RuntimeException
Failed to get sidecar node
Error message
Failed to get sidecar node
What it means
After exhausting maxRetries attempts, getSidecarLocationOnStartup could not obtain a sidecar node from the NodeManager (each attempt failed or returned null). The sidecar is not registered with the cluster, so the tool cannot discover native functions.
Source
Thrown at presto-built-in-worker-function-tools/src/main/java/com/facebook/presto/builtin/tools/NativeSidecarFunctionRegistryTool.java:125
catch (Exception e) {
throw new PrestoException(StandardErrorCode.INVALID_ARGUMENTS, "Failed to get functions from sidecar.", e);
}
}
public static URI getSidecarLocationOnStartup(NodeManager nodeManager, int maxRetries, long retryDelayMs)
{
Node sidecarNode = null;
for (int attempt = 1; attempt <= maxRetries; attempt++) {
try {
sidecarNode = nodeManager.getSidecarNode();
if (sidecarNode != null) {
break;
}
}
catch (Exception e) {
log.error("Error getting sidecar node (attempt " + attempt + "): " + e.getMessage());
if (attempt == maxRetries) {
throw new RuntimeException("Failed to get sidecar node", e);
}
else {
try {
Thread.sleep(retryDelayMs);
}
catch (InterruptedException ie) {
Thread.currentThread().interrupt();
throw new RuntimeException("Retry fetching sidecar function registry interrupted", ie);
}
}
}
}
return HttpUriBuilder
.uriBuilderFrom(sidecarNode.getHttpUri())
.appendPath(FUNCTION_SIGNATURES_ENDPOINT)
.build();
}View on GitHub (pinned to 55bb57d202)
Solutions
- Ensure the sidecar node is registered with discovery before the worker starts
- Increase the retry count or delay configuration for sidecar lookup
- Check discovery service health
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at presto-built-in-worker-function-tools/src/main/java/com/facebook/presto/builtin/tools/NativeSidecarFunctionRegistryTool.java:125 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/d7d0687a0bf74ead.
Report an issue: GitHub.