kestra-io/kestra · error · RuntimeException
Unable to create the file: {}
Error message
Unable to create the file: {} What it means
Error "Unable to create the file: {}" thrown in kestra-io/kestra.
Source
Thrown at core/src/main/java/io/kestra/core/runners/FilesService.java:50
runContext,
additionalVars,
inputs
)
);
inputFiles
.forEach(throwBiConsumer((fileName, input) ->
{
var file = runContext.workingDir().resolve(Path.of(runContext.render(fileName, additionalVars))).toFile();
if (!file.getParentFile().exists()) {
//noinspection ResultOfMethodCallIgnored
file.getParentFile().mkdirs();
}
if (input == null) {
if (!file.createNewFile()) {
throw new RuntimeException("Unable to create the file: " + file.getName());
}
} else {
if (URIFetcher.supports(input)) {
var uri = URIFetcher.of(input);
try (
var is = new BufferedInputStream(uri.fetch(runContext), FileSerde.BUFFER_SIZE);
var out = new FileOutputStream(file)
) {
IOUtils.copyLarge(is, out);
}
} else {
Files.write(file.toPath(), input.getBytes());
}
}
}));
if (logger.isTraceEnabled()) {
logger.trace("Provided {} input(s).", inputFiles.size());View on GitHub (pinned to 823fada927)
Solutions
- Check that the target path's parent directory exists and the process has write permission on it.
- Verify the path is valid and not conflicting with an existing directory or read-only file.
When it happens
Trigger: Thrown at core/src/main/java/io/kestra/core/runners/FilesService.java:50 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kestra-io/kestra@823fada927 (2026-08-14).
Data as JSON: /api/errors/55925e6b40f9763f.
Report an issue: GitHub.