apache/hadoop · error · IOException
Problem in starting http server. Server handlers failed
Error message
Problem in starting http server. Server handlers failed
What it means
After Jetty's webServer.start() returns, HttpServer2 iterates all registered Handlers and fails the startup with IOException if any handler reports isFailed(). Jetty marks a handler failed when its doStart() threw; the original exception appears earlier in the log under Jetty's own warning lines, so this IOException is the late, aggregate signal.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java:1475
acceptorThreads += connector.getAcceptors();
selectorThreads += connector.getSelectorManager().getSelectorCount();
}
metrics = HttpServer2Metrics.create(statsHandler, port,
(QueuedThreadPool) webServer.getThreadPool(),
acceptorThreads, selectorThreads);
}
} catch (IOException ex) {
LOG.info("HttpServer.start() threw a non Bind IOException", ex);
throw ex;
} catch (MultiException ex) {
LOG.info("HttpServer.start() threw a MultiException", ex);
throw ex;
}
// Make sure there is no handler failures.
Handler[] hs = webServer.getHandlers();
for (Handler handler : hs) {
if (handler.isFailed()) {
throw new IOException(
"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) {View on GitHub (pinned to 2add963021)
Solutions
- Scroll up in the log to the first WARN/ERROR from org.eclipse.jetty around startup - it carries the root cause (this IOException has no cause chain)
- Verify filter configuration (hadoop.http.filter.configuration, hadoop.http.authentication.*) and keytab readability
- Check for duplicate context handlers/servlet names added via the builder
- Fix the underlying handler init error and restart the daemon
Defensive patterns
Strategy: try-catch
Try / catch
try {
httpServer.start();
} catch (IOException e) {
if ("Problem in starting http server. Server handlers failed".equals(e.getMessage())) {
// no cause chain: root cause is in earlier Jetty WARN/ERROR lines - grep the startup log
}
} Prevention
- Always capture full startup logs; the handler root cause precedes this IOException
- Test filter classes and auth configurations in a staging daemon before rollout
- Validate keytabs/principals for SPNEGO filters before enabling them on web UIs
When it happens
Trigger: A servlet filter initializer or context handler throwing during doStart: bad hadoop.http.filter.configuration classes, authentication filter misconfiguration (spnego/keytab problems at filter init), or a duplicate context path colliding with another handler.
Common situations: Enabling Kerberos SPNEGO for the web UI with a missing keytab/principal; deploying custom filters whose init() fails; port/context conflicts in embedded use.
Related errors
- Unable to initialize WebAppContext
- Problem starting http server
- unknown scheme for endpoint:{}
- Property %s not specified
- Mailformed URL while finding the web resource dir:{}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/869e6874629b20b6.
Report an issue: GitHub.