簡體   English   中英

spark submit java.lang.NullPointerException錯誤

[英]spark submit java.lang.NullPointerException error

我試圖通過windows上的spark提交我的spark-mongo代碼jar。我在獨立模式下使用spark。 我在同一台機器上配置了spark master和兩個worker。 我想用一個主人和兩個工人執行我的jar。我正在嘗試執行以下命令: spark-submit --master spark://localhost:7077 --deploy-mode cluster --executor-memory 5G --class spark.mongohadoop.testing3 G:\\sparkmon1.jar

我正面臨以下錯誤:

Running Spark using the REST application submission protocol.
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
17/02/28 17:09:13 INFO RestSubmissionClient: Submitting a request to launch an application in spark://192.168.242.1:7077.
17/02/28 17:09:24 WARN RestSubmissionClient: Unable to connect to server spark://192.168.242.1:7077.
Warning: Master endpoint spark://192.168.242.1:7077 was not a REST server. Falling back to legacy submission gateway instead.
17/02/28 17:09:25 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
17/02/28 17:09:32 ERROR ClientEndpoint: Exception from cluster was: java.lang.NullPointerException
java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:482)
        at org.apache.hadoop.util.Shell.run(Shell.java:455)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
        at org.apache.hadoop.fs.FileUtil.chmod(FileUtil.java:873)
        at org.apache.hadoop.fs.FileUtil.chmod(FileUtil.java:853)
        at org.apache.spark.util.Utils$.fetchFile(Utils.scala:474)
        at org.apache.spark.deploy.worker.DriverRunner.org$apache$spark$deploy$worker$DriverRunner$$downloadUserJar(DriverRunner.scala:154)
        at org.apache.spark.deploy.worker.DriverRunner$$anon$1.run(DriverRunner.scala:83

我已經在env中設置了winutil路徑。 為什么我得到這個錯誤,解決方案是什么?

我在Linux上遇到了同樣的錯誤,但是當我的驅動程序從我的集群中的特定機器啟動時,如果啟動驅動程序的請求發送到集群中的任何其他計算機,那么它就會正常運行。 因此,我的套裝似乎是一個環境問題。 然后我檢查了org.apache.hadoop.util.Shell $ ShellCommandExecutor類中的代碼並得到它正在嘗試運行命令但在此之前它嘗試運行該機器的“bash”。 我觀察到我的bash響應緩慢。在bashrc中做了一些更改並重新啟動了我的集群。 現在它的工作正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM