{"record":{"id":"88d608f29fe03ba0","repo":"prestodb/presto","slug":"no-cpp-sidecars-88d608","errorCode":"NO_CPP_SIDECARS","errorMessage":"Expected exactly one coordinator sidecar, but found none","messagePattern":"Expected exactly one coordinator sidecar, but found none","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/nodeManager/PluginNodeManager.java","lineNumber":83,"sourceCode":"    {\n        //Retrieves all active worker nodes, excluding coordinators, resource managers, and catalog servers.\n        return nodeManager.getAllNodes().getActiveNodes().stream()\n                .filter(node -> !node.isResourceManager() && !node.isCoordinator() && !node.isCatalogServer())\n                .collect(toImmutableSet());\n    }\n\n    @Override\n    public Node getCurrentNode()\n    {\n        return nodeManager.getCurrentNode();\n    }\n\n    @Override\n    public Node getSidecarNode()\n    {\n        Set<InternalNode> coordinatorSidecars = nodeManager.getCoordinatorSidecars();\n        if (coordinatorSidecars.isEmpty()) {\n            throw new PrestoException(NO_CPP_SIDECARS, \"Expected exactly one coordinator sidecar, but found none\");\n        }\n        return coordinatorSidecars.stream()\n                .skip(new Random().nextInt(coordinatorSidecars.size()))\n                .findFirst()\n                .get();\n    }\n\n    @Override\n    public String getEnvironment()\n    {\n        return environment;\n    }\n}\n","sourceCodeStart":65,"sourceCodeEnd":97,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/nodeManager/PluginNodeManager.java#L65-L97","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nNode sidecar = pluginNodeManager.getSidecarNode(); // throws if none\n// after\nSet<InternalNode> sidecars = nodeManager.getCoordinatorSidecars();\nif (sidecars.isEmpty()) { fallbackToLocalOrThrowWithContext(); }\nNode sidecar = sidecars.iterator().next();","handlingStrategy":"retry","validationCode":"Set<InternalNode> sidecars = nodeManager.getCoordinatorSidecars();\nif (sidecars.isEmpty()) {\n    throw new IllegalStateException(\"No coordinator sidecar registered; check sidecar deployment\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    return pluginNodeManager.getSidecarNode();\n} catch (PrestoException e) {\n    if (e.getErrorCode().getName().equals(\"NO_CPP_SIDECARS\")) {\n        // retry after delay (sidecar may still be registering) or fall back to local execution\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["presto","sidecar","node-manager","deployment"],"backgroundTag":"no-sidecar-registered","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}