hadoop:/bin/bash: /bin/java: No such file or directory
阿新 • • 發佈:2018-11-11
Stack trace: ExitCodeException exitCode=127
In HADOOP_HOME/libexec/hadoop-config.sh
look for the if condition below # Attempt to set JAVA_HOME if it is not set
Remove extra parentheses in the export JAVA_HOME lines as below. Change this
if [ -x /usr/libexec/java_home ]; then export JAVA_HOME=($(/usr/libexec/java_home)) else export JAVA_HOME=(/Library/Java/Home) fi
to
if [ -x /usr/libexec/java_home ]; then
// note that the extra parentheses are removed
export JAVA_HOME=$(/usr/libexec/java_home)
else
export JAVA_HOME=/Library/Java/Home
fi
Restart yarn after you have made this change.
More detailed info can be found here https://issues.apache.org/jira/browse/HADOOP-8717