Github user steveloughran commented on the pull request:
https://github.com/apache/spark/pull/6033#issuecomment-100917262
update: OK, with a jetty error handler set up right, exceptions are turned
into 500 errors with a `<pre>` formatted stack trace;
```
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /. Reason:
<pre> Server Error</pre></p><h3>Caused
by:</h3><pre>java.net.NoRouteToHostException: No-route-to-host
at
org.apache.spark.deploy.history.yarn.failures.FailingTimelineQueryClient.innerExecAction(FailingTimelineQueryClient.scala:37)
at
org.apache.spark.deploy.history.yarn.rest.TimelineQueryClient.exec(TimelineQueryClient.scala:125)
at
org.apache.spark.deploy.history.yarn.rest.TimelineQueryClient.get(TimelineQueryClient.scala:111)
at
org.apache.spark.deploy.history.yarn.rest.TimelineQueryClient.listEntities(TimelineQueryClient.scala:223)
at
org.apache.spark.deploy.history.yarn.YarnHistoryProvider.getListing(YarnHistoryProvider.scala:137)
at
org.apache.spark.deploy.history.yarn.YarnHistoryProvider.getListing(YarnHistoryProvider.scala:51)
at
org.apache.spark.deploy.history.HistoryServer.getApplicationList(HistoryServer.scala:163)
at
org.apache.spark.deploy.history.HistoryPage.render(HistoryPage.scala:37)
at org.apache.spark.ui.WebUI$$anonfun$2.apply(WebUI.scala:79)
at org.apache.spark.ui.WebUI$$anonfun$2.apply(WebUI.scala:79)
at org.apache.spark.ui.JettyUtils$$anon$1.doGet(JettyUtils.scala:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at
org.spark-project.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at
org.spark-project.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
at
org.spark-project.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at
org.spark-project.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at
org.spark-project.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at
org.spark-project.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.spark-project.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at
org.spark-project.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.spark-project.jetty.server.Server.handle(Server.java:370)
at
org.spark-project.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at
org.spark-project.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
at
org.spark-project.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
at
org.spark-project.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at
org.spark-project.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at
org.spark-project.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at
org.spark-project.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
at
org.spark-project.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at
org.spark-project.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.spark-project.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)
</pre>
<hr /><i><small>Powered by Jetty://</small></i><br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</body>
</html>
```
I'm changing the patch here to log & rethrow in the existing servlet
handler; set up an error handler when creating the jetty server. No tests in
this patch, but will arise in '1537.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]