{"record":{"id":"fc875cf12cc8c52c","repo":"prestodb/presto","slug":"pinot-unable-to-find-instance","errorCode":"PINOT_UNABLE_TO_FIND_INSTANCE","errorMessage":"Error when fetching instance configs for %s","messagePattern":"Error when fetching instance configs for (.+?)","errorType":"error_code","errorClass":"PinotException","httpStatus":null,"severity":"error","filePath":"presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotClusterInfoFetcher.java","lineNumber":607,"sourceCode":"        {\n            return tags;\n        }\n\n        @JsonProperty\n        public List<String> getPools()\n        {\n            return pools;\n        }\n    }\n\n    public Instance getInstance(String instanceName)\n    {\n        try {\n            String responseBody = sendHttpGetToController(String.format(INSTANCE_API_TEMPLATE, instanceName));\n            return instanceJsonCodec.fromJson(responseBody);\n        }\n        catch (Exception throwable) {\n            throw new PinotException(PINOT_UNABLE_TO_FIND_INSTANCE, Optional.empty(), \"Error when fetching instance configs for \" + instanceName, throwable);\n        }\n    }\n\n    // Fetch grpc port from Pinot instance config.\n    public int getGrpcPort(String serverInstance)\n    {\n        try {\n            return instanceConfigCache.get(serverInstance).getGrpcPort();\n        }\n        catch (ExecutionException e) {\n            Throwable cause = e.getCause();\n            if (cause instanceof PinotException) {\n                throw (PinotException) cause;\n            }\n            throw new PinotException(\n                    PINOT_UNABLE_TO_FIND_INSTANCE,\n                    Optional.empty(),\n                    \"Error when getting instance config for \" + serverInstance,","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotClusterInfoFetcher.java#L589-L625","documentation":"Thrown when fetching a Pinot instance's configuration JSON from the controller (GET on the instance API) fails for any reason. The connector needs the instance config (e.g. server ports) to talk to a Pinot server, so any HTTP/parse failure becomes PINOT_UNABLE_TO_FIND_INSTANCE.","triggerScenarios":"sendHttpGetToController(INSTANCE_API_TEMPLATE) throws — 404 for unknown instance, controller unreachable, timeout, or non-parseable instance JSON — inside getInstance.","commonSituations":"Stale routing table referencing a server instance that was decommissioned; controller restarted with different instance IDs; network/firewall blocking controller access; typo in instance name when using grpc config lookups.","solutions":["Check the cause in logs: 404 means the instance no longer exists in Pinot — refresh routing/instance caches or restart the query","Verify the controller is reachable with curl http://<controller>/v2/instances","Confirm the instance still exists in ZooKeeper (Helix) and Pinot cluster is healthy","Clear stale Presto caches (instance config cache) by restarting the connector/coordinator"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Verify the instance exists on the controller\ncurl -sf http://<controller>:9000/v2/instances | jq '.instances'","typeGuard":null,"tryCatchPattern":"try {\n    Table result = session.execute(...);\n} catch (PinotException e) {\n    if (e.getMessage().startsWith(\"Error when fetching instance configs\")) {\n        // retry after controller recovery; check cause for 404 vs network\n    }\n    throw e;\n}","preventionTips":["Keep Pinot cluster membership stable; avoid dropping instances mid-query","Monitor controller availability and HTTP error rates","Refresh routing/instance caches after Pinot scale-in events","Check ZooKeeper (Helix) consistency when instances are reported missing"],"tags":["pinot","controller","instance-config"],"backgroundTag":"pinot-instance-not-found","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"}