我按照link
中的步骤在Ubuntu 17.10中安装Hadoop 3执行脚本/usr/local/hadoop/sbin/start-all.sh时,我收到以下错误。
/usr/local/hadoop/sbin/start-all.sh WARNING: Attempting to start all Apache Hadoop daemons as hduser1 in 10 seconds. WARNING: This is not a recommended production deployment configuration. WARNING: Use CTRL-C to abort. Starting namenodes on [localhost] localhost: ERROR: JAVA_HOME is not set and could not be found. pdsh@vinoth-ubuntu: localhost: ssh exited with exit code 1 Starting datanodes localhost: ERROR: JAVA_HOME is not set and could not be found. pdsh@vinoth-ubuntu: localhost: ssh exited with exit code 1 Starting secondary namenodes [vinoth-ubuntu] vinoth-ubuntu: ERROR: JAVA_HOME is not set and could not be found. pdsh@vinoth-ubuntu: vinoth-ubuntu: ssh exited with exit code 1 Starting resourcemanager resourcemanager is running as process 22791. Stop it first. Starting nodemanagers localhost: ERROR: JAVA_HOME is not set and could not be found. pdsh@vinoth-ubuntu: localhost: ssh exited with exit code 1
但是当我执行echo "$JAVA_HOME"
时,我的输出低于输出
hduser1@vinoth-ubuntu:~$ echo "$JAVA_HOME"
/usr/lib/jvm/java-8-openjdk-amd64/
我还在.bashrc
,.profile
和httpfs-env.sh
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
export JAVA_HOME