问题
在卸载amabri3.1.4.0后重装amabri3.1.5.0,出现如下报错
resource_management.core.exceptions.ExecutionFailed:
Execution of 'hdfs --config /usr/hdp/3.1.5.0-152/hadoop/conf namenode -format -nonInteractive' returned 1.
ERROR: Cannot execute /usr/hdp/3.1.4.0-315/hadoop//libexec/hdfs-config.sh.
stdout: /var/lib/ambari-agent/data/output-357.txt
解决
amabri3.1.4.0环境的HADOOP_HOME环境没有改成现在的
修改为现在的环境变量即可
[xxx@xxx ~]$ echo $HADOOP_HOME
/usr/hdp/3.1.4.0-315/hadoop/
[xxx@xxx~]$ cd /etc/profile.d
[xxx@xxx profile.d]$ ll
[xxx@xxx profile.d]$ vi hadoop.sh
[xxx@xxx profile.d]$ source /etc/profile