apache/druid · warning
Exception while getting active tasks from Overlord. Will ret
Error message
Exception while getting active tasks from Overlord. Will retry on next scheduled run.
What it means
WorkerTaskManager.doCompletedTasksCleanup calls the Overlord API to fetch active tasks before cleaning up completed tasks locally. If that HTTP call fails (apiCallResult.isError()), the manager logs a warning and returns, deferring cleanup to the next scheduled run. No tasks are removed in this cycle; cleanup is idempotent and retried periodically.
Source
Thrown at indexing-service/src/main/java/org/apache/druid/indexing/worker/WorkerTaskManager.java:648
}
catch (ExecutionException e) {
if (e.getCause() instanceof HttpResponseException) {
final HttpResponseStatus status = ((HttpResponseException) e.getCause()).getResponse().getStatus();
if (status.getCode() == 404) {
// NOTE: this is to support backward compatibility, when overlord doesn't have "activeTasks" endpoint.
// this if clause should be removed in a future release.
log.debug("Deleting all completed tasks. Overlord appears to be running on older version.");
apiCallResult = Either.value(ImmutableMap.of());
} else {
apiCallResult = Either.error(e.getCause());
}
} else {
apiCallResult = Either.error(e.getCause());
}
}
if (apiCallResult.isError()) {
log.warn(
apiCallResult.error(),
"Exception while getting active tasks from Overlord. Will retry on next scheduled run."
);
return;
}
for (String taskId : taskIds) {
TaskStatus status = apiCallResult.valueOrThrow().get(taskId);
if (status == null || status.isComplete()) {
log.debug(
"Deleting completed task[%s] information, Overlord task status[%s].",
taskId,
status == null ? "unknown" : status.getStatusCode()
);
completedTasks.remove(taskId);
File taskFile = new File(getCompletedTaskDir(), taskId);View on GitHub (pinned to 9b90983fd2)
Solutions
- Check the attached exception in the worker logs to see whether the failure is connection-refused, timeout, or auth-related.
- Verify the Overlord is reachable from the worker: confirm druid.host, discovery config, and any proxy/firewall rules.
- Inspect Overlord health; restarts during leader election commonly cause transient failures that self-heal on the next scheduled run.
Defensive patterns
Strategy: retry
Try / catch
try {
workerTaskManager.cleanupCompletedTasks();
} catch (Exception e) {
log.warn(e, "Overlord unreachable; completed-tasks cleanup will retry on next scheduled run");
} Prevention
- Monitor Overlord availability and leader-election events; cleanup retries are transient-safe.
- Verify druid.host and discovery configuration on workers so the Overlord API is reachable.
- Watch for network/firewall changes between middleManager workers and the Overlord.
When it happens
Trigger: The periodic completed-tasks cleanup job calls the Overlord's active-task endpoint and the request fails: Overlord is down/restarting, the HTTP request times out, TLS or auth fails, or the network path between the worker and Overlord is broken.
Common situations: Transient Overlord restarts or leader elections, network partitions between middleManager workers and the Overlord, or misconfigured druid.host / overlord discovery causing connection failures.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Action [%s] failed for worker [%s] with status %s(%s)
- Worker on host %s does not exists
- Batched segment allocation is disabled
- Cannot allocate segment if not leader.
- Batched segment allocation is disabled.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/4b8d92a7ff07b260.
Report an issue: GitHub.