{"record":{"id":"213c3f823294d5ed","repo":"apache/druid","slug":"unable-to-create-storage-connector-s-for-base-p-213c3f","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/LocalFileStorageConnectorProvider.java","lineNumber":54,"sourceCode":"  public static final String TYPE_NAME = \"local\";\n\n  @JsonProperty\n  final File basePath;\n\n  @JsonCreator\n  public LocalFileStorageConnectorProvider(@JsonProperty(value = \"basePath\", required = true) File basePath)\n  {\n    this.basePath = basePath;\n  }\n\n  @Override\n  public StorageConnector createStorageConnector(File defaultTempDir)\n  {\n    try {\n      return new LocalFileStorageConnector(basePath);\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          basePath\n      );\n    }\n  }\n\n  @Override\n  public boolean equals(Object o)\n  {\n    if (this == o) {\n      return true;\n    }\n    if (o == null || getClass() != o.getClass()) {\n      return false;\n    }\n    LocalFileStorageConnectorProvider that = (LocalFileStorageConnectorProvider) o;","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/storage/local/LocalFileStorageConnectorProvider.java#L36-L72","documentation":"LocalFileStorageConnectorProvider.createStorageConnector catches the IOException thrown by the LocalFileStorageConnector constructor (it tries to create the base path directory on init) and rethrows it as an IllegalArgumentException. The provider cannot hand back a working connector when the base directory cannot be created.","triggerScenarios":"Requesting a storage connector via StorageConnectorProvider/get when basePath is invalid — e.g. path is not creatable because a parent does not exist and is not creatable, a file already occupies the path, or the process lacks write permission on the parent directory.","commonSituations":"Misconfigured druid.storage.basePath (typo, root-owned path); running Druid in a read-only container filesystem; a regular file already exists where the base directory is expected; segment/log dir mount not mounted at startup.","solutions":["Check the configured basePath and ensure the Druid user can create it (mkdir/chown)","Remove or rename any regular file sitting at the basePath","Mount the expected volume before Druid starts; verify in container entrypoint"],"exampleFix":"// before (druid config)\ndruid.storage.basePath=/root/var/druid\n// after\ndruid.storage.basePath=/var/druid  # owned by the druid service user","handlingStrategy":"validation","validationCode":"File base = new File(basePath);\nif (!base.exists() && !base.mkdirs()) {\n  throw new IllegalStateException(\"cannot create base path \" + basePath);\n}\nif (!base.isDirectory() || !base.canWrite()) {\n  throw new IllegalStateException(\"base path not writable: \" + basePath);\n}","typeGuard":null,"tryCatchPattern":"try { provider.get(); } catch (IllegalArgumentException e) { // check base path perms/exists, inspect cause IOException }","preventionTips":["Verify basePath exists and is writable by the Druid user at startup","Do not point basePath at a read-only container layer","Ensure volumes are mounted before the Druid process starts"],"tags":["filesystem","configuration"],"backgroundTag":"mkdir-permission-denied","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}