1、新版本2.4.1中,profile/hadoop-env.sh中均己设置 JAVA_HOME, java -version也正常。
启动时报错:
[[email protected] ~]# start-all.sh
Starting namenodes on []
localhost: Error: JAVA_HOME is not set and could not be found.
localhost: Error: JAVA_HOME is not set and could not be found.
...
starting yarn daemons
starting resourcemanager, logging to /home/lihanhui/open-source/hadoop-2.1.0-beta/logs/yarn-admin-resourcemanager-localhost.out
localhost: Error: JAVA_HOME is not set and could not be found
直接命令行执行export JAVA_HOME=/PATH/TO/JDK也无法解决问题:
最终在 hadoop-2.4.1/etc/hadoop/libexec/hadoop-config.sh 这个配置文件中搜到报错信息“JAVA_HOME is not set and could not be found”
于是在这个配置文件中, export JAVA_HOME=/PATH/JDK
问题得己解决、
时间: 2024-11-06 17:49:40