apache/druid · error · org.apache.druid.java.util.common.IAE
Unable to create storage connector
Error message
Unable to create storage connector [%s] for base path [%s]
What it means
LocalFileExportStorageProvider.createStorageConnector builds a LocalFileStorageConnector for the validated export destination; if constructing it (creating directories/paths) raises IOException, it is rethrown as IAE stating the connector class and base path. It means the local export directory could not be initialized.
Solutions
- Verify druid.export.storage.baseDir exists, is a directory, and is writable by the Druid process (mkdir/chown as needed).
- Ensure the export path does not collide with an existing regular file.
- Check container/mount permissions and SELinux policies for the export directory.
- Retry the export after fixing permissions; inspect the chained IOException cause for the exact filesystem error.
Example fix
// before
File dir = new File("/mnt/export"); // read-only mount
// after
File dir = new File("/mnt/export");
if (!dir.isDirectory() || !dir.canWrite()) {
throw new IOException("export base dir not writable: " + dir);
}
dir.setWritable(true); Defensive patterns
Strategy: validation
Validate before calling
File dir = new File(baseDir);
if (!dir.isDirectory() || !dir.canWrite()) throw new IOException("export base dir invalid or unwritable: " + dir); Try / catch
try { connector = provider.createStorageConnector(config); } catch (IllegalArgumentException e) { throw new RuntimeException("check export baseDir permissions/path: " + e.getMessage(), e); } Prevention
- Verify druid.export.storage.baseDir is writable by the druid user at startup.
- Avoid pointing baseDir at read-only or autofs-unmounted paths.
- Ensure export paths are directories, not existing files.
- Test export configuration in staging with the same mount/permissions.
When it happens
Trigger: Export query with destination whose validated base path cannot be turned into a connector: unable to create the directory, permission denied, path is an existing non-writable file, invalid path characters.
Common situations: druid.export.storage.baseDir pointing to a read-only mount; export path overlapping a file instead of a directory; container without write access to configured export dir; NFS permission issues.
Understand the failure class
Background: "Permission denied" / "Failed to write" file errors: why a library can't write its files to disk (EACCES, EPERM, ENOSPC) and how to fix them — this error's family across 43 libraries.
Related errors
- Found a directory on path
- Invalid arguments for reading
- No directory exists on path
- Unable to find file for reading
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/7000adebbbc188ad.
Report an issue: GitHub.
Appendix: source
Thrown at processing/src/main/java/org/apache/druid/storage/local/LocalFileExportStorageProvider.java:64
@JsonProperty
private final String exportPath;
@JsonCreator
public LocalFileExportStorageProvider(@JsonProperty(value = "exportPath", required = true) String exportPath)
{
this.exportPath = exportPath;
}
@Override
public StorageConnector createStorageConnector(File taskTempDir)
{
final File exportDestination = validateAndGetPath(storageConfig.getBaseDir(), exportPath);
try {
return new LocalFileStorageConnector(exportDestination);
}
catch (IOException e) {
throw new IAE(
e,
"Unable to create storage connector [%s] for base path [%s]",
LocalFileStorageConnector.class.getSimpleName(),
exportDestination.toPath()
);
}
}
@Override
@JsonIgnore
public String getResourceType()
{
return TYPE_NAME;
}
@Override
@JsonIgnore
public String getBasePath()View on GitHub (pinned to 9b90983fd2)