apache/druid · error · RE

Task Runner does not support enable/disable worker actions

Error message

Task Runner does not support enable/disable worker actions

What it means

The Overlord's enable/disable worker HTTP endpoints require the underlying TaskRunner to be a WorkerTaskRunner (e.g. remote workers). If the resolved runner does not implement WorkerTaskRunner (getWorkerTaskRunner() returns null), the adapter throws RequestException because enable/disable actions are not supported by that runner.

Solutions

  1. Deploy/run with a TaskRunner that supports workers (e.g. RemoteTaskRunner / HttpRemoteTaskRunner).
  2. Do not call enable/disable worker endpoints when using a local or unsupported runner.
  3. If using a delegating runner, ensure getWorkerTaskRunner() can unwrap to the WorkerTaskRunner.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  workerResource.enableWorker(host);
} catch (RequestException e) {
  if (e.getMessage().contains("does not support enable/disable")) {
    // runner is not a WorkerTaskRunner; skip worker management
  }
}

Prevention

When it happens

Trigger: POSTing to /druid/indexer/v1/worker (enable/disable) when the cluster runs a local or otherwise non-worker TaskRunner, or when delegation wrappers hide the WorkerTaskRunner interface.

Common situations: Running middle management in local mode and calling worker management APIs meant for remote-HA setups; calling the endpoint on an Overlord configured without worker nodes.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at indexing-service/src/main/java/org/apache/druid/indexing/overlord/WorkerTaskRunnerQueryAdapter.java:70

    this.httpClient = httpClient;
  }

  public void enableWorker(String host)
  {
    sendRequestToWorker(host, WorkerTaskRunner.ActionType.ENABLE);
  }

  public void disableWorker(String host)
  {
    sendRequestToWorker(host, WorkerTaskRunner.ActionType.DISABLE);
  }

  private void sendRequestToWorker(String workerHost, WorkerTaskRunner.ActionType action)
  {
    WorkerTaskRunner workerTaskRunner = getWorkerTaskRunner();

    if (workerTaskRunner == null) {
      throw new RE("Task Runner does not support enable/disable worker actions");
    }

    Optional<ImmutableWorkerInfo> workerInfo = Iterables.tryFind(
        workerTaskRunner.getWorkers(),
        entry -> entry.getWorker()
                      .getHost()
                      .equals(workerHost)
    );

    if (!workerInfo.isPresent()) {
      throw new RE(
          "Worker on host %s does not exists",
          workerHost
      );
    }

    String actionName = WorkerTaskRunner.ActionType.ENABLE.equals(action) ? "enable" : "disable";
    final URL workerUrl = TaskRunnerUtils.makeWorkerURL(

View on GitHub (pinned to 9b90983fd2)