1. 程式人生 > >hadoop啟動報錯:localhost: ssh: Could not resolve hostname localhost

hadoop啟動報錯:localhost: ssh: Could not resolve hostname localhost

hadoop啟動journalnode時報錯:localhost: ssh: Could not resolve hostname localhost: Temporary failure in name resolution

解決辦法:將高亮部分補充到/etc/profile中,然後source生效

export JAVA_HOME=/opt/module/jdk1.8.0_144 export HADOOP_HOME=/opt/ha/hadoop-2.7.4

export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native

export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"

export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin