prestodb/presto · error · PrestoException
NO_CPP_SIDECARS
NO_CPP_SIDECARS
Error message
Expected exactly one coordinator sidecar, but found none
What it means
PluginNodeManager.getSidecarNode returns a coordinator sidecar (native C++ worker attached to the coordinator). When the underlying NodeManager reports no coordinator sidecars, the library throws NO_CPP_SIDECARS because the requested execution target does not exist in this deployment.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/nodeManager/PluginNodeManager.java:83
{
//Retrieves all active worker nodes, excluding coordinators, resource managers, and catalog servers.
return nodeManager.getAllNodes().getActiveNodes().stream()
.filter(node -> !node.isResourceManager() && !node.isCoordinator() && !node.isCatalogServer())
.collect(toImmutableSet());
}
@Override
public Node getCurrentNode()
{
return nodeManager.getCurrentNode();
}
@Override
public Node getSidecarNode()
{
Set<InternalNode> coordinatorSidecars = nodeManager.getCoordinatorSidecars();
if (coordinatorSidecars.isEmpty()) {
throw new PrestoException(NO_CPP_SIDECARS, "Expected exactly one coordinator sidecar, but found none");
}
return coordinatorSidecars.stream()
.skip(new Random().nextInt(coordinatorSidecars.size()))
.findFirst()
.get();
}
@Override
public String getEnvironment()
{
return environment;
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Verify sidecar processes are launched and configured to register with the coordinator (check sidecar/node config and logs)
- Check coordinator /v1/node for registered sidecars; wait for registration or restart the sidecar
- Upgrade/pin coordinator and sidecar versions so sidecar registration is enabled; if sidecars are not used, avoid code paths calling getSidecarNode
Example fix
// before
Node sidecar = pluginNodeManager.getSidecarNode(); // throws if none
// after
Set<InternalNode> sidecars = nodeManager.getCoordinatorSidecars();
if (sidecars.isEmpty()) { fallbackToLocalOrThrowWithContext(); }
Node sidecar = sidecars.iterator().next(); Defensive patterns
Strategy: retry
Validate before calling
Set<InternalNode> sidecars = nodeManager.getCoordinatorSidecars();
if (sidecars.isEmpty()) {
throw new IllegalStateException("No coordinator sidecar registered; check sidecar deployment");
} Try / catch
try {
return pluginNodeManager.getSidecarNode();
} catch (PrestoException e) {
if (e.getErrorCode().getName().equals("NO_CPP_SIDECARS")) {
// retry after delay (sidecar may still be registering) or fall back to local execution
}
throw e;
} Prevention
- Monitor /v1/node on the coordinator for sidecar registration health
- Alert when sidecar processes are down on coordinators
- Pin coordinator and sidecar versions to compatible releases
- Delay sidecar-dependent queries until nodes are registered after startup
When it happens
Trigger: Calling getSidecarNode (directly or via operators that offload to sidecars) on a cluster where no coordinator sidecar is registered — e.g. native sidecars not started or not yet registered with the coordinator.
Common situations: Java-only deployment queried by code expecting C++ sidecars; sidecar process crashed or failed to register; misconfigured node properties (sidecar port/discovery); query run immediately after coordinator start before registration completes.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/88d608f29fe03ba0.
Report an issue: GitHub.