Saurabh Rana
Saurabh Rana

Reputation: 167

"Internal Server Error: Session is in state starting" error while running sample Spark Livy job

"Internal Server Error: Session is in state starting" error while running sample Spark Livy job.

I installed Livy for accessing apache-spark using REST API and started the Livy server. On running a sample spark Pi App(as giving on https://github.com/cloudera/livy ), I am getting error message "Caused by: java.io.IOException: Internal Server Error: "java.lang.IllegalStateException: Session is in state starting".

Exception in thread "main" java.util.concurrent.ExecutionException: java.io.IOException: Internal Server Error: "java.lang.IllegalStateException: Session is in state starting" at com.cloudera.livy.client.http.JobHandleImpl.get(JobHandleImpl.java:201) at com.cloudera.livy.client.http.JobHandleImpl.get(JobHandleImpl.java:91) at PiApp.main(PiApp.java:96) Caused by: java.io.IOException: Internal Server Error: "java.lang.IllegalStateException: Session is in state starting" at com.cloudera.livy.client.http.LivyConnection.sendRequest(LivyConnection.java:197) at com.cloudera.livy.client.http.LivyConnection.sendJSONRequest(LivyConnection.java:173) at com.cloudera.livy.client.http.LivyConnection.post(LivyConnection.java:149) at com.cloudera.livy.client.http.JobHandleImpl$1.run(JobHandleImpl.java:145) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Upvotes: 0

Views: 1407

Answers (1)

Anshul Gupta
Anshul Gupta

Reputation: 520

Even I got the same error while running the PiApp.java from my Eclipse and connecting to remote Livy server. But when I ran the very same PiApp jar directly at the remote server where Livy and Spark are installed then it ran fine...

java -cp /home/Anshul/livy/spark-core_2.10-1.6.0.jar:/home/Anshul/livy/livy-api-0.3.0.jar:/home/Anshul/livy/livy-client-http-0.3.0.jar:/home/Anshul/livy/LivyApp-0.0.1-SNAPSHOT.jar com.cloudera.livy.examples.PiApp http://sandbox.hortonworks.com:8998 2

Upvotes: 0

Related Questions