Spark启动时报错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: 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地址,具体操作如图所示

启动成功:

 

 

posted @ 2020-03-18 19:58  东耳听风  阅读(3967)  评论(0编辑  收藏  举报