apache/druid · error
Failed to get storage slot due to error
Error message
Failed to get storage slot due to error [%s]
What it means
The Overlord's ForkingTaskRunner could not obtain a storage slot from the TaskStorageSlotTracker when starting a task locally. The task is immediately marked failed with this message instead of being scheduled, and the underlying RuntimeException is logged as a warning.
Solutions
- Inspect the Overlord/middleManager logs for the chained RuntimeException to find the root cause
- Verify druid.indexer.storage type and directory settings (taskDir, storage slots) are correct and writable
- Free disk space or clean stale task directories in the worker task storage location
- Restart the middle manager/worker to rebuild the slot tracker if its state is inconsistent
Defensive patterns
Strategy: try-catch
Validate before calling
// Before scheduling, ensure the runner reports the task as runnable and disk is healthy
if (!taskRunner.getRunnerTaskWork().isEmpty() && taskDir.getParentFile().canWrite()) {
taskRunner.run(task);
} Type guard
boolean canSchedule = java.util.Optional.ofNullable(taskRunner.getRunnerTaskWork()).isPresent();
Try / catch
try { taskRunner.run(task); } catch (TaskStatus status) { /* inspect status.getErrorMsg() for 'Failed to get storage slot' and inspect worker storage config */ } Prevention
- Keep druid.indexer.storage directory writable and sized for max concurrent tasks
- Monitor worker free disk space before task submission
- Clean stale task directories regularly
When it happens
Trigger: Calling taskRunner.run(task) (via TaskRunnerUtils/call) when pickStorageSlot(taskId) throws, e.g. no storage slot is available for the task or tracker lookup fails.
Common situations: Overlord running tasks in local/remote mode with exhausted or misconfigured storage slots; disk configuration issues (druid.indexer.storage) on middle managers; corrupted task state preventing slot pick.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Access-Check-Result
- Action [ ] failed for worker [ ] with status ( )
- At least one task runner must be enabled
- authResult.getErrorMessage()
- Batched segment allocation is disabled
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/e5ea2b9995f3b7a0.
Report an issue: GitHub.
Appendix: source
Thrown at indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:187
synchronized (tasks) {
tasks.computeIfAbsent(
task.getId(), k ->
new ForkingTaskRunnerWorkItem(
task,
exec.submit(
new Callable<>() {
@Override
public TaskStatus call()
{
final TaskStorageDirTracker.StorageSlot storageSlot;
try {
storageSlot = getTracker().pickStorageSlot(task.getId());
}
catch (RuntimeException e) {
LOG.warn(e, "Failed to get storage slot for task [%s], cannot schedule.", task.getId());
return TaskStatus.failure(
task.getId(),
StringUtils.format("Failed to get storage slot due to error [%s]", e.getMessage())
);
}
final File taskDir = new File(storageSlot.getDirectory(), task.getId());
final String attemptId = String.valueOf(getNextAttemptID(taskDir));
final File attemptDir = Paths.get(taskDir.getAbsolutePath(), "attempt", attemptId).toFile();
final ProcessHolder processHolder;
final String childHost = node.getHost();
int childPort = -1;
int tlsChildPort = -1;
if (node.isEnablePlaintextPort()) {
childPort = portFinder.findUnusedPort();
}
if (node.isEnableTlsPort()) {
tlsChildPort = portFinder.findUnusedPort();View on GitHub (pinned to 9b90983fd2)