{"record":{"id":"7000adebbbc188ad","repo":"apache/druid","slug":"unable-to-create-storage-connector-s-for-base-p","errorCode":null,"errorMessage":"Unable to create storage connector [%s] for base path [%s]","messagePattern":"Unable to create storage connector \\[(.+?)\\] for base path \\[(.+?)\\]","errorType":"exception","errorClass":"org.apache.druid.java.util.common.IAE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/storage/local/LocalFileExportStorageProvider.java","lineNumber":64,"sourceCode":"\n  @JsonProperty\n  private final String exportPath;\n\n  @JsonCreator\n  public LocalFileExportStorageProvider(@JsonProperty(value = \"exportPath\", required = true) String exportPath)\n  {\n    this.exportPath = exportPath;\n  }\n\n  @Override\n  public StorageConnector createStorageConnector(File taskTempDir)\n  {\n    final File exportDestination = validateAndGetPath(storageConfig.getBaseDir(), exportPath);\n    try {\n      return new LocalFileStorageConnector(exportDestination);\n    }\n    catch (IOException e) {\n      throw new IAE(\n          e,\n          \"Unable to create storage connector [%s] for base path [%s]\",\n          LocalFileStorageConnector.class.getSimpleName(),\n          exportDestination.toPath()\n      );\n    }\n  }\n\n  @Override\n  @JsonIgnore\n  public String getResourceType()\n  {\n    return TYPE_NAME;\n  }\n\n  @Override\n  @JsonIgnore\n  public String getBasePath()","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/storage/local/LocalFileExportStorageProvider.java#L46-L82","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nFile dir = new File(\"/mnt/export\"); // read-only mount\n// after\nFile dir = new File(\"/mnt/export\");\nif (!dir.isDirectory() || !dir.canWrite()) {\n  throw new IOException(\"export base dir not writable: \" + dir);\n}\ndir.setWritable(true);","handlingStrategy":"validation","validationCode":"File dir = new File(baseDir);\nif (!dir.isDirectory() || !dir.canWrite()) throw new IOException(\"export base dir invalid or unwritable: \" + dir);","typeGuard":null,"tryCatchPattern":"try { connector = provider.createStorageConnector(config); } catch (IllegalArgumentException e) { throw new RuntimeException(\"check export baseDir permissions/path: \" + e.getMessage(), e); }","preventionTips":["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."],"tags":["export","storage-connector","local-storage"],"backgroundTag":"file-write-permission-denied","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}