apache/druid · info
datasource[ ] not found
Error message
datasource[%s] not found
What it means
DataSourcesResource's coordinator HTTP API returns HTTP 204 (no content) for requests naming a datasource that does not exist, after logging this warning. Callers of queryable-datasource, intervals, segments, or load-status endpoints hit it when the dataSourceName path parameter matches no known datasource. It is an informational 'not found' signal, not a crash.
Solutions
- Verify the exact datasource name with `GET /druid/coordinator/v1/datasources` and correct the caller
- Handle HTTP 204 in the client as 'datasource not found' rather than an error to retry
- If the datasource should exist, check coordinator logs and metadata store connectivity for ingestion/segment publishing failures
Example fix
// before curl http://coordinator:8081/druid/coordinator/v1/datasources/wikipeda // after curl http://coordinator:8081/druid/coordinator/v1/datasources/wikipedia
Defensive patterns
Strategy: validation
Validate before calling
final Set<String> existing = listDatasources(coordinatorUrl); if (!existing.contains(dsName)) { throw new IllegalArgumentException("unknown datasource: " + dsName); } Type guard
boolean datasourceExists(String ds, Set<String> known) { return ds != null && known.contains(ds); } Try / catch
final Response r = client.target(url).request().get(); if (r.getStatus() == 204) { LOG.info("datasource {} not found; skipping", dsName); return Optional.empty(); } Prevention
- Fetch the datasource list before calling per-datasource endpoints
- Treat 204 as not-found, not as a transient error to retry
- Standardize datasource names (case, spelling) via shared constants
When it happens
Trigger: GET/DELETE on /druid/coordinator/v1/datasources/{dataSourceName} (or its sub-resources: intervals, segments, loadstatus) where the datasource name is misspelled, dropped, or the metadata store has no such datasource.
Common situations: Typo in datasource name; datasource fully killed/removed from metadata but automation still polls it; race after datasource deletion; case-sensitivity mismatch.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Cannot find any supervisor with id
- Cannot find any task with id
- Got an unexpected response status
- No task information found for task with id
- Segment id [ ] is unknown
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/30526bd5e0d0b31a.
Report an issue: GitHub.
Appendix: source
Thrown at server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java:267
final SegmentsToUpdateFilter payload,
@Context final HttpServletRequest req
)
{
if (payload == null || !payload.isValid()) {
return Response
.status(Response.Status.BAD_REQUEST)
.entity(SegmentsToUpdateFilter.INVALID_PAYLOAD_ERROR_MESSAGE)
.build();
} else {
RemoteSegmentUpdateOperation remoteOperation
= () -> overlordClient.markSegmentsAsUnused(dataSourceName, payload);
return updateSegmentsViaOverlord(dataSourceName, remoteOperation);
}
}
private static Response logAndCreateDataSourceNotFoundResponse(String dataSourceName)
{
log.warn("datasource[%s] not found", dataSourceName);
return Response.noContent().build();
}
private static Response updateSegmentsViaOverlord(
String dataSourceName,
RemoteSegmentUpdateOperation operation
)
{
try {
SegmentUpdateResponse response = FutureUtils.getUnchecked(operation.perform(), true);
return Response.ok(response).build();
}
catch (DruidException e) {
return ServletResourceUtils.buildErrorResponseFrom(e);
}
catch (Exception e) {
final Throwable rootCause = Throwables.getRootCause(e);
if (rootCause instanceof HttpResponseException) {View on GitHub (pinned to 9b90983fd2)