apache/druid · warning
Log streaming not supported by
Error message
Log streaming not supported by [%s]
What it means
WorkerResource.doGetLog returns HTTP 501 with body "Log streaming not supported by [%s]" when the configured TaskRunner does not implement TaskLogStreamer, so log streaming for tasks is unavailable. This is a capability check, not a data error; the runner class is named in the response.
Solutions
- Use a TaskRunner implementation that implements TaskLogStreamer (e.g. local runners) if streaming is required.
- Fetch task logs from deep storage or the overlord's log endpoint instead of the worker.
- Check the runner class in the 501 body and consult its documentation for log access options.
Defensive patterns
Strategy: fallback
Validate before calling
if (!(taskRunner instanceof TaskLogStreamer)) { // use deep storage / overlord log API instead }
Type guard
if (taskRunner instanceof TaskLogStreamer streamer) { /* safe to request logs */ } Try / catch
Response r = workerResource.doGetLog(taskId, offset);
if (r.getStatus() == 501) { /* fall back to overlord /druid/indexer/v1/task/{id}/log */ } Prevention
- Know your Middle Manager's TaskRunner type before building log-access tooling.
- Prefer deep-storage log retrieval for remote runners.
- Handle 501 explicitly in automation rather than treating it as failure.
When it happens
Trigger: GET /druid/indexer/v1/worker/{taskId}/log on a Middle Manager whose TaskRunner (e.g. some remote/custom runners) does not implement TaskLogStreamer.
Common situations: Querying task logs through an intermediary/proxy that hits a worker with an unsupported runner type; custom TaskRunner deployments; expecting log streaming while using a runner that only supports other log access.
Related errors
- Action [ ] failed for worker [ ] with status ( )
- An external HTTP table with a URI must also provide the…
- An external HTTP table with a URI must also provide the…
- AuthenticationToken ignored:
- <authResult.getErrorMessage()>
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/b30687e9dd54eb1d.
Report an issue: GitHub.
Appendix: source
Thrown at indexing-service/src/main/java/org/apache/druid/indexing/worker/http/WorkerResource.java:176
catch (Exception e) {
log.error(e, "Failed to issue shutdown for task: %s", taskid);
return Response.serverError().build();
}
return Response.ok(ImmutableMap.of("task", taskid)).build();
}
@GET
@Path("/task/{taskid}/log")
@Produces(HttpMediaType.TEXT_PLAIN_UTF8)
@ResourceFilters(StateResourceFilter.class)
public Response doGetLog(
@PathParam("taskid") String taskId,
@QueryParam("offset") @DefaultValue("0") long offset
)
{
IdUtils.validateId("taskId", taskId);
if (!(taskRunner instanceof TaskLogStreamer)) {
return Response.status(501)
.type(MediaType.TEXT_PLAIN)
.entity(StringUtils.format(
"Log streaming not supported by [%s]",
taskRunner.getClass().getName()
))
.build();
}
try {
final Optional<InputStream> stream = ((TaskLogStreamer) taskRunner).streamTaskLog(taskId, offset);
if (stream.isPresent()) {
return Response.ok(stream.get()).build();
} else {
return Response.status(Response.Status.NOT_FOUND).build();
}
}
catch (IOException e) {
log.warn(e, "Failed to read log for task: %s", taskId);View on GitHub (pinned to 9b90983fd2)