apache/druid · error · RE

Action [%s] failed for worker [%s] with status %s(%s)

Error message

Action [%s] failed for worker [%s] with status %s(%s)

What it means

After sending the enable/disable HTTP request to the worker, the adapter checks the response status. Any non-200 response is converted into a RequestException reporting the action, worker host, and HTTP status code/reason, so callers see worker-side failure details.

Source

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

        actionName
    );

    try {
      final StatusResponseHolder response = httpClient.go(
          new Request(HttpMethod.POST, workerUrl),
          StatusResponseHandler.getInstance()
      ).get();

      log.info(
          "Sent %s action request to worker: %s, status: %s, response: %s",
          action,
          workerHost,
          response.getStatus(),
          response.getContent()
      );

      if (!HttpResponseStatus.OK.equals(response.getStatus())) {
        throw new RE(
            "Action [%s] failed for worker [%s] with status %s(%s)",
            action,
            workerHost,
            response.getStatus().getCode(),
            response.getStatus().getReasonPhrase()
        );
      }
    }
    catch (ExecutionException | InterruptedException | TimeoutException e) {
      Throwables.propagate(e);
    }
  }

  private WorkerTaskRunner getWorkerTaskRunner()
  {
    Optional<TaskRunner> taskRunnerOpt = taskMaster.getTaskRunner();
    if (taskRunnerOpt.isPresent() && taskRunnerOpt.get() instanceof WorkerTaskRunner) {
      return (WorkerTaskRunner) taskRunnerOpt.get();

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Check the worker's logs for the error matching the returned HTTP status.
  2. Verify worker endpoint URL, ports, and proxy/TLS configuration.
  3. If security is enabled, grant the caller permission to the worker enable/disable endpoints.
  4. Ensure worker and Overlord versions are compatible.
Defensive patterns

Strategy: retry

Try / catch

try {
  adapter.enableWorker(host);
} catch (RequestException e) {
  if (e.getMessage().contains("failed for worker")) {
    // inspect status in message; retry transient 5xx, fix auth/config for 4xx
  }
}

Prevention

When it happens

Trigger: The worker returns a non-OK status for the disable/enable worker HTTP call — 404 because the worker path is unavailable, 403 due to auth, 5xx from worker-side errors, or a proxy intercepting the call.

Common situations: Worker running an incompatible version; TLS/proxy misconfiguration returning error pages; security enabled and the caller lacking worker endpoint permissions; worker node down behind a load balancer.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


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