各位网友,我今天在配置hadoop时碰到了如下的一个问题:
http://
root@ubuntu:/home/HadoopInstall/hadoop-0.20.2# bin/start-all.sh
starting namenode, logging to /home/HadoopInstall/hadoop-0.20.2/bin/../logs/hadoop-root-namenode-ubuntu.out
localhost: starting datanode, logging to /home/HadoopInstall/hadoop-0.20.2/bin/../logs/hadoop-root-datanode-ubuntu.out
localhost: Error: JAVA_HOME is not set.
localhost: starting secondarynamenode, logging to /home/HadoopInstall/hadoop-0.20.2/bin/../logs/hadoop-root-secondarynamenode-ubuntu.out
localhost: Error: JAVA_HOME is not set.
starting jobtracker, logging to /home/HadoopInstall/hadoop-0.20.2/bin/../logs/hadoop-root-jobtracker-ubuntu.out
localhost: starting tasktracker, logging to /home/HadoopInstall/hadoop-0.20.2/bin/../logs/hadoop-root-tasktracker-ubuntu.out
localhost: Error: JAVA_HOME is not set.
我的硬件环境:pc1:root账户登入,用作master;pc2:root账户登入,用作slave。java1.7.0_07、Hadoop-0.20.2。
两台电脑里的java sdk位置都一致,配置均正确,均为:
root@ubuntu:~# java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)
在两台电脑里的pc2中的hadoop是由pc1中拷贝过来的,都一样,并且都在hadoop-0.20.2/conf 中的hadoop-env.sh文件中添加了export JAVA_HOME=/usr/lib/jvm/java1.7.0_07
我搜了好久还是没有解决问题,希望懂的朋友能够指点指点,不胜感激。
|
|