apache/hadoop · error · IOException

Incomplete HDFS URI, no host:

Error message

Incomplete HDFS URI, no host: 

What it means

Error "Incomplete HDFS URI, no host: " thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java:192

   *
   * @return <code>hdfs</code>
   */
  @Override
  public String getScheme() {
    return HdfsConstants.HDFS_URI_SCHEME;
  }

  @Override
  public URI getUri() { return uri; }

  @Override
  public void initialize(URI uri, Configuration conf) throws IOException {
    super.initialize(uri, conf);
    setConf(conf);

    String host = uri.getHost();
    if (host == null) {
      throw new IOException("Incomplete HDFS URI, no host: "+ uri);
    }

    initDFSClient(uri, conf);
    this.uri = URI.create(uri.getScheme()+"://"+uri.getAuthority());
    this.workingDir = getHomeDirectory();

    storageStatistics = (DFSOpsCountStatistics) GlobalStorageStatistics.INSTANCE
        .put(DFSOpsCountStatistics.NAME,
          new StorageStatisticsProvider() {
            @Override
            public StorageStatistics provide() {
              return new DFSOpsCountStatistics();
            }
          });
  }

  void initDFSClient(URI theUri, Configuration conf) throws IOException {
    this.dfs =  new DFSClient(theUri, conf, statistics);

View on GitHub (pinned to 2add963021)

Solutions

  1. Provide a complete HDFS URI including host, e.g. hdfs://namenode:8020/path instead of hdfs:///path without configured default.
  2. Set fs.defaultFS in core-site.xml so relative paths resolve to a valid NameNode.

When it happens

Trigger: DistributedFileSystem is initialized with an HDFS URI that has no host authority, so the NameNode address cannot be determined.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/6a963dbca646ec79. Report an issue: GitHub.