{"record":{"id":"b3680817bd71a0f7","repo":"apache/druid","slug":"no-task-information-found-for-task-with-id-s","errorCode":null,"errorMessage":"No task information found for task with id: [%s]","messagePattern":"No task information found for task with id: \\[(.+?)\\]","errorType":"http","errorClass":"WebApplicationException","httpStatus":500,"severity":"error","filePath":"indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java","lineNumber":864,"sourceCode":"    java.util.Optional<Resource> destinationResource = task.getDestinationResource();\n    destinationResource.ifPresent(resource -> resourceActions.add(new ResourceAction(resource, Action.WRITE)));\n    if (authConfig.isEnableInputSourceSecurity()) {\n      resourceActions.addAll(task.getInputSourceResources());\n    }\n    return resourceActions;\n  }\n\n  private List<TaskStatusPlus> securedTaskStatusPlus(\n      List<TaskStatusPlus> collectionToFilter,\n      @Nullable String dataSource,\n      HttpServletRequest req\n  )\n  {\n    Function<TaskStatusPlus, Iterable<ResourceAction>> raGenerator = taskStatusPlus -> {\n      final String taskId = taskStatusPlus.getId();\n      final String taskDatasource = taskStatusPlus.getDataSource();\n      if (taskDatasource == null) {\n        throw new WebApplicationException(\n            Response.serverError().entity(\n                StringUtils.format(\"No task information found for task with id: [%s]\", taskId)\n            ).build()\n        );\n      }\n      return Collections.singletonList(\n          new ResourceAction(new Resource(taskDatasource, ResourceType.DATASOURCE), Action.READ)\n      );\n    };\n    if (dataSource != null) {\n      //skip auth check here, as it's already done in getTasks\n      return collectionToFilter;\n    }\n    return Lists.newArrayList(\n        AuthorizationUtils.filterAuthorizedResources(\n            req,\n            collectionToFilter,\n            raGenerator,","sourceCodeStart":846,"sourceCodeEnd":882,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java#L846-L882","documentation":"OverlordResource throws this 500 error while listing task status entries when a TaskStatusPlus record has no datasource information. Tasks always carry a datasource, so a null value means the task record is incomplete or corrupted in the task storage metadata store. The resource aborts the whole listing rather than return entries with unknown authorization semantics.","triggerScenarios":"Calling GET on the overlord's task-listing endpoints (e.g. /druid/indexer/v1/tasks) via authorizedList/securedTaskStatusPlus when any task row retrieved from the task storage (metadata store) has getDataSource() == null.","commonSituations":"Corrupted or manually edited metadata store rows; tasks written by a buggy or downgraded indexer version that omitted the datasource; partial writes during metadata store failures.","solutions":["Inspect the metadata store task table and find the row whose data_source column is NULL for the reported task id","Delete the orphaned/corrupted task record or set its datasource (after stopping writes) so listing can proceed","Check for indexer versions known to write tasks without datasource and upgrade","If the record comes from a failed task-store migration, restore from backup and re-run the migration"],"exampleFix":"// before: whole listing fails on one bad record\nthrow new WebApplicationException(Response.serverError().entity(\n    StringUtils.format(\"No task information found for task with id: [%s]\", taskId)).build());\n// after: skip records lacking datasource (they cannot be authorized)\nif (taskDatasource == null) {\n  LOG.warn(\"Skipping task [%s] with no datasource information\", taskId);\n  return Collections.emptyList();\n}","handlingStrategy":"validation","validationCode":"const resp = await fetch(`${overlord}/druid/indexer/v1/tasks`);\nconst tasks = await resp.json();\nconst bad = tasks.filter(t => !t.dataSource);\nif (bad.length) console.warn('tasks missing datasource:', bad.map(t => t.id));","typeGuard":"function hasDataSource(t) { return t != null && typeof t.dataSource === 'string' && t.dataSource.length > 0; }","tryCatchPattern":null,"preventionTips":["Monitor the metadata store for task rows with NULL data_source","Avoid manual edits to the task metadata table","Keep indexer and overlord versions aligned"],"tags":["http","rest-api","metadata","druid-overlord"],"backgroundTag":"empty-required-field","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}