首页 > 代码库 > HADOOP报错,随笔

HADOOP报错,随笔

1、新版本2.4.1中,profile/hadoop-env.sh中均己设置 JAVA_HOME,  java -version也正常。

启动时报错:

[root@nn ~]# 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


问题得己解决、

本文出自 “Linux_蚂蚁” 博客,请务必保留此出处http://onlyoulinux.blog.51cto.com/7941460/1546526

HADOOP报错,随笔