{"record":{"id":"9b2fc12521e3a539","repo":"apache/hadoop","slug":"abfs-endpoint-is-not-set-correctly-s-do-not-sp","errorCode":null,"errorMessage":"ABFS endpoint is not set correctly : %s, Do not specify scheme when using {IP}:{PORT}","messagePattern":"ABFS endpoint is not set correctly : (.+?), Do not specify scheme when using (.+?):(.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java","lineNumber":493,"sourceCode":"\n    final URIBuilder uriBuilder = new URIBuilder();\n    uriBuilder.setScheme(scheme);\n\n    // For testing purposes, an IP address and port may be provided to override\n    // the host specified in the FileSystem URI.  Also note that the format of\n    // the Azure Storage Service URI changes from\n    // http[s]://[account][domain-suffix]/[filesystem] to\n    // http[s]://[ip]:[port]/[account]/[filesystem].\n    String endPoint = abfsConfiguration.get(AZURE_ABFS_ENDPOINT);\n    if (endPoint == null || !endPoint.contains(AbfsHttpConstants.COLON)) {\n      uriBuilder.setHost(hostName);\n      return uriBuilder;\n    }\n\n    // Split ip and port\n    String[] data = endPoint.split(AbfsHttpConstants.COLON);\n    if (data.length != 2) {\n      throw new RuntimeException(String.format(\"ABFS endpoint is not set correctly : %s, \"\n              + \"Do not specify scheme when using {IP}:{PORT}\", endPoint));\n    }\n    uriBuilder.setHost(data[0].trim());\n    uriBuilder.setPort(Integer.parseInt(data[1].trim()));\n    uriBuilder.setPath(\"/\" + UriUtils.extractAccountNameFromHostName(hostName));\n\n    return uriBuilder;\n  }\n\n  public AbfsConfiguration getAbfsConfiguration() {\n    return this.abfsConfiguration;\n  }\n\n  public Hashtable<String, String> getFilesystemProperties(\n      TracingContext tracingContext) throws AzureBlobFileSystemException {\n    try (AbfsPerfInfo perfInfo = startTracking(\"getFilesystemProperties\",\n            \"getFilesystemProperties\")) {\n      LOG.debug(\"getFilesystemProperties for filesystem: {}\",","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java#L475-L511","documentation":"Thrown while building the ABFS service URI during filesystem initialization. When fs.azure.abfs.endpoint is set (used to target a raw IP endpoint such as a private endpoint, firewall appliance, or Azurite), the driver expects a bare {IP}:{PORT} value with no scheme: the string is split on ':' and must yield exactly two parts. Any value that splits into more (e.g. 'https://10.0.0.1:443' or an IPv6 literal with multiple colons) makes AzureBlobFileSystemStore throw this RuntimeException, so the FileSystem never comes up.","triggerScenarios":"Setting fs.azure.abfs.endpoint to a URL with a scheme ('http://20.0.0.1:5000' splits into ['http','//20.0.0.1','5000'] = 3 parts), to an IPv6 address ('fe80::1:443' yields 4+ parts), or to any value with more than one colon. Note: a value with no colon at all does NOT throw - it is ignored and the account hostname is used.","commonSituations":"Pointing ABFS at Azurite or a storage-emulator IP and pasting the https:// URL from documentation into core-site.xml; migrating wasb-era configs that carried schemes; using IPv6 literals for private endpoints.","solutions":["Remove the scheme: set fs.azure.abfs.endpoint to exactly IP:PORT, e.g. '20.0.0.1:5000'. The scheme is chosen by fs.defaultFS (abfs:// = http, abfss:// = https), not by this key.","For Azurite: fs.defaultFS=abfs://container@devstoreaccount1.dfs.core.windows.net, fs.azure.abfs.endpoint=127.0.0.1:10000, plus the well-known devstoreaccount1 key.","Avoid IPv6 literals in this property; use a DNS hostname that resolves to the IP instead.","Restart the JVM/service after editing core-site.xml so the store rebuilds the URI."],"exampleFix":"<!-- before -->\n<property><name>fs.azure.abfs.endpoint</name><value>https://20.0.0.1:5000</value></property>\n\n<!-- after -->\n<property><name>fs.azure.abfs.endpoint</name><value>20.0.0.1:5000</value></property>","handlingStrategy":"validation","validationCode":"// validate before building the FileSystem\nString ep = conf.get(\"fs.azure.abfs.endpoint\");\nif (ep != null && !ep.matches(\"^[^:/]+:[0-9]+$\")) {\n  throw new IllegalArgumentException(\n      \"fs.azure.abfs.endpoint must be bare IP:PORT (no scheme): \" + ep);\n}","typeGuard":null,"tryCatchPattern":"try { FileSystem fs = path.getFileSystem(conf); } catch (RuntimeException e) { if (e.getMessage().contains(\"ABFS endpoint\")) { /* fix fs.azure.abfs.endpoint to bare IP:PORT */ } throw e; }","preventionTips":["Treat fs.azure.abfs.endpoint as IP:PORT only; schemes belong in fs.defaultFS.","Add a config linter step for ABFS mounts in deployment scripts.","Never put IPv6 literals in this property."],"tags":["azure","abfs","configuration","endpoint","uri-builder","core-site"],"backgroundTag":"invalid-endpoint-configuration","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}