{"record":{"id":"75bf12bff81c4660","repo":"apache/druid","slug":"cannot-find-any-supervisor-with-id-s","errorCode":null,"errorMessage":"Cannot find any supervisor with id: [%s]","messagePattern":"Cannot find any supervisor with id: \\[(.+?)\\]","errorType":"http","errorClass":"WebApplicationException","httpStatus":404,"severity":"error","filePath":"indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/security/SupervisorResourceFilter.java","lineNumber":81,"sourceCode":"        request.getPathSegments()\n               .get(\n                   Iterables.indexOf(\n                       request.getPathSegments(),\n                       new Predicate<>()\n                       {\n                         @Override\n                         public boolean apply(PathSegment input)\n                         {\n                           return \"supervisor\".equals(input.getPath());\n                         }\n                       }\n                   ) + 1\n               ).getPath()\n    );\n\n    Optional<SupervisorSpec> supervisorSpecOptional = supervisorManager.getSupervisorSpec(supervisorId);\n    if (!supervisorSpecOptional.isPresent()) {\n      throw new WebApplicationException(\n          Response.status(Response.Status.NOT_FOUND)\n                  .type(MediaType.TEXT_PLAIN)\n                  .entity(StringUtils.format(\"Cannot find any supervisor with id: [%s]\", supervisorId))\n                  .build()\n      );\n    }\n\n\n    final SupervisorSpec spec = supervisorSpecOptional.get();\n    Preconditions.checkArgument(\n        spec.getDataSources() != null && spec.getDataSources().size() > 0,\n        \"No dataSources found to perform authorization checks\"\n    );\n\n    Function<String, ResourceAction> resourceActionFunction = getAction(request) == Action.READ ?\n                                                              AuthorizationUtils.DATASOURCE_READ_RA_GENERATOR :\n                                                              AuthorizationUtils.DATASOURCE_WRITE_RA_GENERATOR;\n","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/security/SupervisorResourceFilter.java#L63-L99","documentation":"SupervisorResourceFilter throws this 404 when no supervisor spec exists for the id extracted from the request path. It guards supervisor management endpoints: without a spec there is nothing to authorize, so the request is rejected before reaching the resource. This is the standard 'unknown supervisor id' response of the overlord.","triggerScenarios":"Any supervisor REST call (e.g. GET /druid/indexer/v1/supervisor/<id>, /status, /shutdown) where <id> does not match a currently registered supervisor in SupervisorManager.","commonSituations":"Typo in the supervisor name; supervisor was shut down or removed earlier; query against the wrong cluster/overlord; supervisor failed to submit so it was never registered.","solutions":["List existing supervisors via GET /druid/indexer/v1/supervisor and use an exact id","Check the supervisor was actually submitted (POST the spec) and is registered on this cluster","If you intend to create it, POST the supervisor spec first","Recover the correct supervisor name from ingestion specs in external config storage"],"exampleFix":"// before\ncurl http://overlord:8081/druid/indexer/v1/supervisor/wik-ticker/status\n// after (verify id first)\ncurl http://overlord:8081/druid/indexer/v1/supervisor | jq '.[].id'\ncurl http://overlord:8081/druid/indexer/v1/supervisor/wikipedia/status","handlingStrategy":"validation","validationCode":"const sups = await (await fetch(`${overlord}/druid/indexer/v1/supervisor`)).json();\nif (!sups.some(s => s.id === supervisorId)) throw new Error(`unknown supervisor: ${supervisorId}`);","typeGuard":"function supervisorExists(list, id) { return Array.isArray(list) && list.some(s => s.id === id); }","tryCatchPattern":"try { ... } catch (e) { if (e.status === 404) { /* refresh supervisor list and re-check id */ } else throw e; }","preventionTips":["Fetch the supervisor list before referencing a specific id","Track supervisor lifecycle (submit/suspend/shutdown) to avoid stale references","Confirm you are targeting the correct cluster/overlord"],"tags":["http","rest-api","druid-overlord","supervisor"],"backgroundTag":"entity-not-found","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}