{"record":{"id":"e8855bdcab77f8ca","repo":"apache/hadoop","slug":"problem-starting-http-server","errorCode":null,"errorMessage":"Problem starting http server","messagePattern":"Problem starting http server","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java","lineNumber":1494,"sourceCode":"              \"Problem in starting http server. Server handlers failed\");\n        }\n      }\n      // Make sure there are no errors initializing the context.\n      Throwable unavailableException = webAppContext.getUnavailableException();\n      if (unavailableException != null) {\n        // Have to stop the webserver, or else its non-daemon threads\n        // will hang forever.\n        webServer.stop();\n        throw new IOException(\"Unable to initialize WebAppContext\",\n            unavailableException);\n      }\n    } catch (IOException e) {\n      throw e;\n    } catch (InterruptedException e) {\n      throw (IOException) new InterruptedIOException(\n          \"Interrupted while starting HTTP server\").initCause(e);\n    } catch (Exception e) {\n      throw new IOException(\"Problem starting http server\", e);\n    }\n  }\n\n  private void loadListeners() {\n    for (Connector c : listeners) {\n      webServer.addConnector(c);\n    }\n  }\n\n  /**\n   * Bind listener by closing and opening the listener.\n   * @param listener\n   * @throws Exception\n   */\n  private static void bindListener(ServerConnector listener) throws Exception {\n    // jetty has a bug where you can't reopen a listener that previously\n    // failed to open w/o issuing a close first, even if the port is changed\n    listener.close();","sourceCodeStart":1476,"sourceCodeEnd":1512,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java#L1476-L1512","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect getCause() of the IOException in the stack trace - fix that, not this message","If the cause points at the SSL connector, validate the keystore with keytool -list and re-check ssl-server.xml","Check for jetty jar version conflicts on the classpath (mvn dependency:tree or ls of the lib dir)","Revert recent web UI / SSL configuration changes one at a time until startup succeeds"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  httpServer.start();\n} catch (IOException e) {\n  Throwable root = e.getCause() != null ? e.getCause() : e;\n  // 'Problem starting http server' is generic: diagnose root, not the wrapper\n  LOG.error(\"http server failed: \", root);\n}","preventionTips":["Always log and inspect the cause chain on startup failures","Validate keystores (keytool -list) before enabling HTTPS connectors","Pin Jetty versions consistently; avoid mixing jetty jars from different Hadoop releases"],"tags":["hadoop","http-server","jetty","startup","configuration"],"backgroundTag":"http-server-start-failure","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}