{"record":{"id":"7941cd3070e3bafc","repo":"apache/hadoop","slug":"s14","errorCode":"S14","errorMessage":"Could not initialize server, {0}","messagePattern":"Could not initialize server, (.+?)","errorType":"exception","errorClass":"ServerException","httpStatus":null,"severity":"critical","filePath":"hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/servlet/ServerWebApp.java","lineNumber":196,"sourceCode":"   *         if any of the above 2 properties is not defined.\n   */\n  protected InetSocketAddress resolveAuthority() throws ServerException {\n    String hostnameKey = getName() + HTTP_HOSTNAME;\n    String portKey = getName() + HTTP_PORT;\n    String host = System.getProperty(hostnameKey);\n    String port = System.getProperty(portKey);\n    if (host == null) {\n      throw new ServerException(ServerException.ERROR.S13, hostnameKey);\n    }\n    if (port == null) {\n      throw new ServerException(ServerException.ERROR.S13, portKey);\n    }\n    try {\n      InetAddress add = InetAddress.getByName(host);\n      int portNum = Integer.parseInt(port);\n      return new InetSocketAddress(add, portNum);\n    } catch (UnknownHostException ex) {\n      throw new ServerException(ServerException.ERROR.S14, ex.toString(), ex);\n    }\n  }\n\n  /**\n   * Destroys the <code>ServletContextListener</code> which destroys\n   * the Server.\n   *\n   * @param event servelt context event.\n   */\n  @Override\n  public void contextDestroyed(ServletContextEvent event) {\n    destroy();\n  }\n\n  /**\n   * Returns the hostname:port InetSocketAddress the webserver is listening to.\n   *\n   * @return the hostname:port InetSocketAddress the webserver is listening to.","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/servlet/ServerWebApp.java#L178-L214","documentation":"After both bootstrap properties are present, ServerWebApp.resolveAuthority() resolves the hostname with InetAddress.getByName(host). Error S14 ('Could not initialize server') is thrown when that throws UnknownHostException - the configured httpfs.http.hostname value cannot be resolved to an address - and webapp startup aborts with ex.toString() as parameter {0}.","triggerScenarios":"httpfs.http.hostname set to a hostname that DNS/hosts cannot resolve (typo, stale name, hostname only resolvable inside another network zone); InetAddress.getByName throws UnknownHostException during contextInitialized.","commonSituations":"Setting httpfs.http.hostname to a fully qualified cluster name that the httpfs host's resolver does not know; /etc/hosts or DNS changed after configuration; running in a container/network namespace where the configured name is unresolvable.","solutions":["Verify resolution on the httpfs host: getent hosts <configured-hostname>","Fix DNS or add the hostname to /etc/hosts, or change httpfs.http.hostname to a resolvable name or a literal IP","Use 0.0.0.0 to bind all interfaces when you do not need a specific address","Restart the servlet container after the change"],"exampleFix":"# before\n-Dhttpfs.http.hostname=htpfs.example.com   # typo, unresolvable -> S14\n\n# after\n-Dhttpfs.http.hostname=httpfs.example.com   # resolvable, or use 0.0.0.0","handlingStrategy":"validation","validationCode":"String host = System.getProperty(\"httpfs.http.hostname\", \"0.0.0.0\");\ntry {\n  java.net.InetAddress.getByName(host); // UnknownHostException here, before server start\n} catch (java.net.UnknownHostException ex) {\n  throw new IllegalStateException(\"httpfs.http.hostname unresolvable: \" + host, ex);\n}","typeGuard":null,"tryCatchPattern":"try {\n  serverWebApp.contextInitialized(event);\n} catch (ServerException ex) {\n  if (ex.getError() == ServerException.ERROR.S14) {\n    // UnknownHostException chained: hostname cannot be resolved on this host\n    log.error(\"cannot resolve httpfs.http.hostname: {}\", ex.getCause());\n  }\n  throw ex;\n}","preventionTips":["Resolve-test the configured hostname on the httpfs host before restart (getent hosts <name>)","Prefer 0.0.0.0 or a literal IP unless a specific interface is required","Keep DNS/hosts entries for the httpfs host stable and monitored"],"tags":["httpfs","dns","startup","network","hostname-resolution"],"backgroundTag":"unknown-host","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}