运行示例 Spark Livy 作业时出现“内部服务器错误:会话处于启动状态”错误。
我安装了 Livy 以使用 REST API 访问 apache-spark 并启动了 Livy 服务器。在运行示例 spark Pi 应用程序(如在https://github.com/cloudera/livy上提供)时,我收到错误消息“Caused by: java.io.IOException: Internal Server Error:”java.lang.IllegalStateException:会话处于启动状态”。
线程“主”java.util.concurrent.ExecutionException 中的异常:java.io.IOException:内部服务器错误:com.cloudera.livy.client.http.JobHandleImpl 处的“java.lang.IllegalStateException:会话处于启动状态”。 get(JobHandleImpl.java:201) at com.cloudera.livy.client.http.JobHandleImpl.get(JobHandleImpl.java:91) at PiApp.main(PiApp.java:96) 原因:java.io.IOException:内部服务器错误:com.cloudera.livy.client.http.LivyConnection 的 com.cloudera.livy.client.http.LivyConnection.sendRequest(LivyConnection.java:197) 处的“java.lang.IllegalStateException:会话处于启动状态”。在 com.cloudera.livy.client.http.LivyConnection.post(LivyConnection.java:149) 在 com.cloudera.livy.client.http.JobHandleImpl$1 处发送 JSONRequest(LivyConnection.java:173)。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)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)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 ) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)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 ) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 在 java.lang.Thread.run(Thread.java:745)在 java.lang.Thread.run(Thread.java:745) 处运行(ThreadPoolExecutor.java:617)在 java.lang.Thread.run(Thread.java:745) 处运行(ThreadPoolExecutor.java:617)