Article directory
1. Error content
An error is reported when Spark starts:
hadoop104: JAVA_HOME is not set
2. Solution
Solution:
Open the launch configuration file
cd /opt/module/spark-standalone/sbin/
vim spark-config.sh
Configure Java environment variables
#JAVA_HOME
export JAVA_HOME=/usr/local/java/jdk1.8.0_181
export PATH=$JAVA_HOME/bin:$PATH
3. Start the Spark cluster again
Start the Spark cluster
./sbin/start-all.sh