apache/druid · error · ISE
File does not exist : %s
Error message
File does not exist : %s
What it means
DurableStorageTaskOutputChannelFactory.openChannel throws this ISE in the OutputChannel's cleanup/close path when the just-written frame file is not visible via storageConnector.pathExists. The producer wrote its output to durable storage but a verification read of the file path failed, indicating the write did not land or is not yet visible in deep storage.
Source
Thrown at multi-stage-query/src/main/java/org/apache/druid/msq/shuffle/output/DurableStorageTaskOutputChannelFactory.java:124
{
final String fileName = getFileNameWithPathForPartition(partitionNumber);
final WritableFrameFileChannel writableChannel =
new WritableFrameFileChannel(
FrameFileWriter.open(
Channels.newChannel(storageConnector.write(fileName)),
null,
ByteTracker.unboundedTracker(),
wireTransferableContext
)
);
return OutputChannel.pair(
writableChannel,
ArenaMemoryAllocator.createOnHeap(frameSize),
() -> {
try {
if (!storageConnector.pathExists(fileName)) {
throw new ISE("File does not exist : %s", fileName);
}
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
try {
return ReadableInputStreamFrameChannel.open(
storageConnector.read(fileName),
fileName,
remoteInputStreamPool,
false,
wireTransferableContext
);
}
catch (IOException e) {
throw new UncheckedIOException(StringUtils.format("Unable to read file : %s", fileName), e);
}
},View on GitHub (pinned to 9b90983fd2)
Solutions
- Check the producer task logs for the underlying wrapped exception (RuntimeException(exception)) showing the actual storage error.
- Verify the file exists in deep storage at the expected location and compare with the configured durableStorage path/prefix.
- Retry the query/task; if it recurs, investigate the storage connector's upload reliability and consistency behavior.
- Ensure sufficient deep-storage client retry/timeout settings.
Example fix
null
Defensive patterns
Strategy: try-catch
Validate before calling
// after write, before consuming
if (!storageConnector.pathExists(expectedOutputFile)) {
throw new IllegalStateException("Written frame file not visible in deep storage: " + expectedOutputFile);
} Try / catch
try {
runQuery();
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().startsWith("File does not exist")) {
inspectTaskLogsForUploadFailure(); // the cause chain holds the storage error
}
throw e;
} Prevention
- Watch task logs for wrapped storage exceptions; fix upload reliability first.
- Verify durableStorage path/prefix settings on all task types.
- Enable storage-client retry policies for transient object-store failures.
When it happens
Trigger: openChannel wraps the writable channel with a close/verify hook: on channel completion it checks pathExists(fileName) and throws ISE when the file cannot be found — caused by failed upload, wrong configured path/prefix, or eventual-consistency lag in the storage backend.
Common situations: Transient deep-storage upload failures (S3 5xx/network) silently swallowed by wrapping in RuntimeException; mismatched druid.storage durableStorage path configuration; eventual-consistency lag on some object stores.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Unable to read file : %s
- Could not find remote outputs of stage [%d] partition [%d] f
- Encountered error while reading the output of stage [%d], pa
- No file present at the location [%s]. Unable to read the out
- Unable to read the task id from the file: [%s]
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/4d39307162687729.
Report an issue: GitHub.