Spark启动时报JAVA_HOME is not set异常
程序员文章站
2022-07-14 15:20:35
...
Spark启动时报JAVA_HOME is not set异常
报错提示:
starting org.apache.spark.deploy.master.Master, logging to /opt/wdp/spark/logs/spark-hadoop-org.apache.spark.deploy.master.Master-1-hrbu30.out
hrbu32: starting org.apache.spark.deploy.worker.Worker, logging to /opt/wdp/spark/logs/spark-hadoop-org.apache.spark.deploy.worker.Worker-1-hrbu32.out
hrbu31: starting org.apache.spark.deploy.worker.Worker, logging to /opt/wdp/spark/logs/spark-hadoop-org.apache.spark.deploy.worker.Worker-1-hrbu31.out
hrbu30: starting org.apache.spark.deploy.worker.Worker, logging to /opt/wdp/spark/logs/spark-hadoop-org.apache.spark.deploy.worker.Worker-1-hrbu30.out
hrbu32: failed to launch: nice -n 0 /opt/wdp/spark/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://hrbu30:7077
hrbu32: JAVA_HOME is not set
hrbu32: full log in /opt/wdp/spark/logs/spark-hadoop-org.apache.spark.deploy.worker.Worker-1-hrbu32.out
hrbu31: failed to launch: nice -n 0 /opt/wdp/spark/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://hrbu30:7077
hrbu31: JAVA_HOME is not set
hrbu31: full log in /opt/wdp/spark/logs/spark-hadoop-org.apache.spark.deploy.worker.Worker-1-hrbu31.out
hrbu30: failed to launch: nice -n 0 /opt/wdp/spark/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 spark://hrbu30:7077
hrbu30: JAVA_HOME is not set
hrbu30: full log in /opt/wdp/spark/logs/spark-hadoop-org.apache.spark.deploy.worker.Worker-1-hrbu30.out
报错原因:
Spark找不到jdk,所以应在Spark中配置jdk的路径
解决方法:
修改sbin目录下的spark-config.sh,添加jdk的环境变量,再次启动spark就正常了
上一篇: hadoop完全分布式文件系统的搭建
下一篇: 读取Hadoop分布式文件系统中的内容
推荐阅读
-
Spark异常:A master URL must be set in your configuration处理记录
-
Spark启动时报JAVA_HOME is not set异常
-
启动hadoop,报错Error JAVA_HOME is not set and could not be found
-
spark 异常解决:A master URL must be set in your configuration
-
Spark异常:A master URL must be set in your configuration处理记录
-
Zookeeper安装 Zookeeper启动 报错Error: JAVA_HOME is not set and java could not be found in PATH
-
解决WebLogic启动时BEA-171522异常(启动时报classcast exception)
-
如何处理Tomcat首次启动时报错(启动异常:FileNotFoundException)
-
如何处理Tomcat首次启动时报错(启动异常:FileNotFoundException)
-
hadoop启动时 localhost: Error: JAVA_HOME is not set.