apache/hadoop · error · IOException

Problem starting http server

Error message

Problem starting http server

What it means

This is the catch-all in HttpServer2.start(): any Exception other than IOException, InterruptedException, and Jetty's MultiException is wrapped as IOException('Problem starting http server', e). The message is deliberately generic; the nested cause is the real error. Bind failures are surfaced separately (as MultiException), so seeing this means something else in the startup lifecycle broke.

Source

Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java:1494

              "Problem in starting http server. Server handlers failed");
        }
      }
      // Make sure there are no errors initializing the context.
      Throwable unavailableException = webAppContext.getUnavailableException();
      if (unavailableException != null) {
        // Have to stop the webserver, or else its non-daemon threads
        // will hang forever.
        webServer.stop();
        throw new IOException("Unable to initialize WebAppContext",
            unavailableException);
      }
    } catch (IOException e) {
      throw e;
    } catch (InterruptedException e) {
      throw (IOException) new InterruptedIOException(
          "Interrupted while starting HTTP server").initCause(e);
    } catch (Exception e) {
      throw new IOException("Problem starting http server", e);
    }
  }

  private void loadListeners() {
    for (Connector c : listeners) {
      webServer.addConnector(c);
    }
  }

  /**
   * Bind listener by closing and opening the listener.
   * @param listener
   * @throws Exception
   */
  private static void bindListener(ServerConnector listener) throws Exception {
    // jetty has a bug where you can't reopen a listener that previously
    // failed to open w/o issuing a close first, even if the port is changed
    listener.close();

View on GitHub (pinned to 2add963021)

Solutions

  1. Inspect getCause() of the IOException in the stack trace - fix that, not this message
  2. If the cause points at the SSL connector, validate the keystore with keytool -list and re-check ssl-server.xml
  3. Check for jetty jar version conflicts on the classpath (mvn dependency:tree or ls of the lib dir)
  4. Revert recent web UI / SSL configuration changes one at a time until startup succeeds
Defensive patterns

Strategy: try-catch

Try / catch

try {
  httpServer.start();
} catch (IOException e) {
  Throwable root = e.getCause() != null ? e.getCause() : e;
  // 'Problem starting http server' is generic: diagnose root, not the wrapper
  LOG.error("http server failed: ", root);
}

Prevention

When it happens

Trigger: A runtime exception thrown by webServer.doStart() outside connector binding: SSL connector misconfiguration, an NPE from a misconfigured auth handler, or lifecycle bean failures in embedded deployments.

Common situations: TLS settings half-configured (keystore present but corrupt so the SSL connector start throws), custom connector/jetty XML, or version mismatches between jetty jars after dependency overrides.

Related errors


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