{"record":{"id":"1e262078587a0553","repo":"apache/hadoop","slug":"invalid-host-specified-1e2620","errorCode":null,"errorMessage":"Invalid host specified","messagePattern":"Invalid host specified","errorType":"validation","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java","lineNumber":104,"sourceCode":"  public static final String E_FAILED_GETHOME = \"Failed to get home directory\";\n  public static final String E_FAILED_DISCONNECT = \"Failed to disconnect\";\n  public static final String E_FS_CLOSED = \"FileSystem is closed!\";\n\n  /**\n   * Set configuration from UI.\n   *\n   * @param uri\n   * @param conf\n   * @throws IOException\n   */\n  private void setConfigurationFromURI(URI uriInfo, Configuration conf)\n      throws IOException {\n\n    // get host information from URI\n    String host = uriInfo.getHost();\n    host = (host == null) ? conf.get(FS_SFTP_HOST, null) : host;\n    if (host == null) {\n      throw new IOException(E_HOST_NULL);\n    }\n    conf.set(FS_SFTP_HOST, host);\n\n    int port = uriInfo.getPort();\n    port = (port == -1)\n      ? conf.getInt(FS_SFTP_HOST_PORT, DEFAULT_SFTP_PORT)\n      : port;\n    conf.setInt(FS_SFTP_HOST_PORT, port);\n\n    // get user/password information from URI\n    String userAndPwdFromUri = uriInfo.getUserInfo();\n    if (userAndPwdFromUri != null) {\n      String[] userPasswdInfo = userAndPwdFromUri.split(\":\");\n      String user = userPasswdInfo[0];\n      user = URLDecoder.decode(user, \"UTF-8\");\n      conf.set(FS_SFTP_USER_PREFIX + host, user);\n      if (userPasswdInfo.length > 1) {\n        conf.set(FS_SFTP_PASSWORD_PREFIX + host + \".\" +","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/sftp/SFTPFileSystem.java#L86-L122","documentation":"Error \"Invalid host specified\" thrown in apache/hadoop.","triggerScenarios":"Thrown when an sftp:// URI is used without a host component, so SFTPFileSystem.initialize cannot determine which server to connect to.","commonSituations":"See trigger scenarios.","solutions":["Specify a valid host in the SFTP URI (sftp://user@host:port/path).","Fix the fs.sftp.host configuration or the URI authority component."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}