apache/druid · error · WebApplicationException

Cannot find any supervisor with id: [%s]

Error message

Cannot find any supervisor with id: [%s]

What it means

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.

Source

Thrown at indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/security/SupervisorResourceFilter.java:81

        request.getPathSegments()
               .get(
                   Iterables.indexOf(
                       request.getPathSegments(),
                       new Predicate<>()
                       {
                         @Override
                         public boolean apply(PathSegment input)
                         {
                           return "supervisor".equals(input.getPath());
                         }
                       }
                   ) + 1
               ).getPath()
    );

    Optional<SupervisorSpec> supervisorSpecOptional = supervisorManager.getSupervisorSpec(supervisorId);
    if (!supervisorSpecOptional.isPresent()) {
      throw new WebApplicationException(
          Response.status(Response.Status.NOT_FOUND)
                  .type(MediaType.TEXT_PLAIN)
                  .entity(StringUtils.format("Cannot find any supervisor with id: [%s]", supervisorId))
                  .build()
      );
    }


    final SupervisorSpec spec = supervisorSpecOptional.get();
    Preconditions.checkArgument(
        spec.getDataSources() != null && spec.getDataSources().size() > 0,
        "No dataSources found to perform authorization checks"
    );

    Function<String, ResourceAction> resourceActionFunction = getAction(request) == Action.READ ?
                                                              AuthorizationUtils.DATASOURCE_READ_RA_GENERATOR :
                                                              AuthorizationUtils.DATASOURCE_WRITE_RA_GENERATOR;

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. List existing supervisors via GET /druid/indexer/v1/supervisor and use an exact id
  2. Check the supervisor was actually submitted (POST the spec) and is registered on this cluster
  3. If you intend to create it, POST the supervisor spec first
  4. Recover the correct supervisor name from ingestion specs in external config storage

Example fix

// before
curl http://overlord:8081/druid/indexer/v1/supervisor/wik-ticker/status
// after (verify id first)
curl http://overlord:8081/druid/indexer/v1/supervisor | jq '.[].id'
curl http://overlord:8081/druid/indexer/v1/supervisor/wikipedia/status
Defensive patterns

Strategy: validation

Validate before calling

const sups = await (await fetch(`${overlord}/druid/indexer/v1/supervisor`)).json();
if (!sups.some(s => s.id === supervisorId)) throw new Error(`unknown supervisor: ${supervisorId}`);

Type guard

function supervisorExists(list, id) { return Array.isArray(list) && list.some(s => s.id === id); }

Try / catch

try { ... } catch (e) { if (e.status === 404) { /* refresh supervisor list and re-check id */ } else throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/75bf12bff81c4660. Report an issue: GitHub.