apache/hadoop · critical · ServerException

S13

S13

Error message

Missing system property [{0}]

What it means

ServerWebApp.resolveAuthority() builds the listen address from two system properties, '<name>.http.hostname' and '<name>.http.port' (for the default server: httpfs.http.hostname / httpfs.http.port). Error S13 ('Missing system property') is thrown during webapp initialization when the hostname property is null, and deployment aborts.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/servlet/ServerWebApp.java:186

   * <p>
   * This implementation looks for the following 2 properties:
   * <ul>
   *   <li>#SERVER_NAME#.http.hostname</li>
   *   <li>#SERVER_NAME#.http.port</li>
   * </ul>
   *
   * @return the host and port InetSocketAddress the
   *         web server is listening to.
   * @throws ServerException thrown
   *         if any of the above 2 properties is not defined.
   */
  protected InetSocketAddress resolveAuthority() throws ServerException {
    String hostnameKey = getName() + HTTP_HOSTNAME;
    String portKey = getName() + HTTP_PORT;
    String host = System.getProperty(hostnameKey);
    String port = System.getProperty(portKey);
    if (host == null) {
      throw new ServerException(ServerException.ERROR.S13, hostnameKey);
    }
    if (port == null) {
      throw new ServerException(ServerException.ERROR.S13, portKey);
    }
    try {
      InetAddress add = InetAddress.getByName(host);
      int portNum = Integer.parseInt(port);
      return new InetSocketAddress(add, portNum);
    } catch (UnknownHostException ex) {
      throw new ServerException(ServerException.ERROR.S14, ex.toString(), ex);
    }
  }

  /**
   * Destroys the <code>ServletContextListener</code> which destroys
   * the Server.
   *
   * @param event servelt context event.

View on GitHub (pinned to 2add963021)

Solutions

  1. Start httpfs through its bundled launcher (httpfs.sh), which sets httpfs.http.hostname and httpfs.http.port
  2. Or add the JVM properties manually, e.g. -Dhttpfs.http.hostname=0.0.0.0 and -Dhttpfs.http.port=14000 (0.0.0.0 binds all interfaces)
  3. Verify the other bootstrap properties (httpfs.home.dir, config/log/temp dirs) are present too, they fail with related errors next
  4. Restart the container after adding the properties

Example fix

# before
export CATALINA_OPTS="$CATALINA_OPTS"   # no httpfs properties -> S13

# after
export CATALINA_OPTS="$CATALINA_OPTS -Dhttpfs.http.hostname=0.0.0.0 -Dhttpfs.http.port=14000"
Defensive patterns

Strategy: validation

Validate before calling

if (System.getProperty("httpfs.http.hostname") == null) {
  throw new IllegalStateException("set -Dhttpfs.http.hostname=<host|0.0.0.0> before starting httpfs");
}

Try / catch

try {
  serverWebApp.contextInitialized(event);
} catch (ServerException ex) {
  if (ex.getError() == ServerException.ERROR.S13) {
    String missing = ex.getParams()[0].toString(); // the exact property name
    log.error("missing bootstrap property: {}", missing);
  }
  throw ex;
}

Prevention

When it happens

Trigger: ServerWebApp.contextInitialized -> resolveAuthority() finds System.getProperty('httpfs.http.hostname') == null; the JVM was started without the httpfs.* bootstrap properties, e.g. launching the war directly in an unbundled container or a test harness that skips them.

Common situations: Deploying httpfs.war into a standalone Tomcat that does not pass the -Dhttpfs.http.hostname/-Dhttpfs.http.port options the bundled scripts set; upgrade or custom launcher dropping the properties; misconfigured test setup.

Related errors


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