Hdfs dfs -ls command not working in hortonworks HDP_2.5
The issue can happen in the below scenarios:-
1) hdfs binaries are not installed properly
2) The location of the hdfs execuatble script is not present in $PATH of the user who is executing the command. To verify the same, try the below steps:-
A) Please clarify if the hdfs binaries is installed by navigating to the location "/usr/hdp/<version>/hadoop-hdfs/bin" directory.
B) Please check if /usr/bin directory and HADOOP_HOME is present in the $PATH environment variable? (echo $PATH)
C) Output of the command ls -ltr /usr/bin/hdfs
By default a softlink is created for hdfs script in usr/bin directory.
I am using Hortonwork sandbox 2.5 in Oracle virtual box.i am not compiling anything . So it should be there by default.
I have the same issue. I noticed /usr/hdp is missing and root's .bash_profile is not pre-configured properly with HADOOP_HOME environment valuable missing, and ambari_server start command is not working and recognizable neither.
Please confirm with JPS command whether hadoop services running in your sandbox,and also set hadoop paths in your bash_profile or bashrc and retry hdfs dfs -ls /
Let me know how it went.