Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

cloudera 5.5 : Spark REST API shows error Error 503 Service Unavailable

cloudera 5.5 : Spark REST API shows error Error 503 Service Unavailable

 

Hi

 

I am trying to access Spark Using REST API but got below error :


Command :

 

curl http://<IP_ADDRESS>:18088/api/v1/applications

 

Response:


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 503 Service Unavailable</title>
</head>
<body><h2>HTTP ERROR 503</h2>
<p>Problem accessing /api/v1/applications. Reason:
<pre> Service Unavailable</pre></p><h3>Caused by:</h3><pre>org.spark-project.jetty.servlet.ServletHolder$1: java.lang.reflect.InvocationTargetException
at org.spark-project.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:496)
at org.spark-project.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:543)
at org.spark-project.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:415)
at org.spark-project.jetty.servlet.ServletHolder.handle(ServletHolder.java:657)
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.GzipHandler.handle(GzipHandler.java:264)
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)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:728)
at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:678)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at org.spark-project.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:532)

3 REPLIES 3

Re: cloudera 5.5 : Spark REST API shows error Error 503 Service Unavailable

Is  i need to change some configuration or this issue exist in cloudera 5.5.0  . as i know spark 1.5.0 have REST API functionality to fetch JSON data of applications . and cloudera 5.5.0 comes with spark 1.5.0 so this functionality should exist in this version.

 

Re: cloudera 5.5 : Spark REST API shows error Error 503 Service Unavailable

Master Guru
There is a minor bug with the way the classpath is setup for the Spark HistoryServer in 5.5.0 which causes the observed error when using the REST API (as a result of bad jersey versions (1.9) being included).

This will be fixed in CDH and CM 5.5.2 (yet to be released) onwards.

Re: cloudera 5.5 : Spark REST API shows error Error 503 Service Unavailable

New Contributor
when will the 5.5.2 release?