Spark启动时报错localhost: failed to launch: nice -n 0 /home/chan/spark/spark-2.4.3-bin-hadoop2.7/bin/spar

Posted 东耳听风

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spark启动时报错localhost: failed to launch: nice -n 0 /home/chan/spark/spark-2.4.3-bin-hadoop2.7/bin/spar相关的知识,希望对你有一定的参考价值。

启动报错提示如图:

localhost: failed to launch: nice -n 0 /home/chan/spark/spark-2.4.3-bin-hadoop2.7/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://Hadoop:7077
localhost: JAVA_HOME is not set
localhost: full log in /home/chan/spark/spark-2.4.3-bin-hadoop2.7/logs/spark-chan-org.apache.spark.deploy.worker.Worker-1-hadoop.out

意思是说work启动失败,没有找到java。

解决办法:

在spark安装目录中sbin下的spark-config.sh中添加JAVA_HOME=jdk地址,具体操作如图所示

启动成功:

 

 

以上是关于Spark启动时报错localhost: failed to launch: nice -n 0 /home/chan/spark/spark-2.4.3-bin-hadoop2.7/bin/spar的主要内容,如果未能解决你的问题,请参考以下文章

Tomcat启动时报错,Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardCont

YarnClientSchedulerBackend: Yarn application has already exited with state FAILED

ifup em2启动网卡时报错:connection activation failed

docker jetty启动时报错 failed setting default capabilities.

pyspark 下 Spark Streaming 启动监听文件流 时报错及解决方法。

项目启动时报错Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError