Nik
Nik

Reputation: 31

Cannot see hdfs, Hadoop shell command hadoop fs -ls giving error cannot access

I am facing a strange issue, where i am not able to see files in my hdfs. Whenever i do a hadoop fs -ls i get below error:

hadoop fs -ls
Warning: $HADOOP_HOME is deprecated.

ls: Cannot access .: No such file or directory.

I can use commands like copyfromlocal etc but still can't see them in hdfs also not able to run pig scripts due to this issue. If i do a hadoop fs -ls /* i get below error:

hadoop fs -ls /*
Warning: $HADOOP_HOME is deprecated.

Found 1 items
drwxr-xr-x   - hduser hadoop          0 2014-02-14 16:49 /app/hadoop
ls: Cannot access /bin: No such file or directory.
ls: Cannot access /boot: No such file or directory.
ls: Cannot access /Data: No such file or directory.
ls: Cannot access /dev: No such file or directory.
ls: Cannot access /etc: No such file or directory.
Found 1 items
drwxr-xr-x   - hduser hadoop          0 2014-02-19 13:02 /home/hduser
ls: Cannot access /lib: No such file or directory.
ls: Cannot access /lib64: No such file or directory.
ls: Cannot access /lost+found: No such file or directory.
ls: Cannot access /media: No such file or directory.
ls: Cannot access /misc: No such file or directory.
ls: Cannot access /mnt: No such file or directory.
ls: Cannot access /net: No such file or directory.
ls: Cannot access /opt: No such file or directory.
ls: Cannot access /proc: No such file or directory.
ls: Cannot access /root: No such file or directory.
ls: Cannot access /sbin: No such file or directory.
ls: Cannot access /selinux: No such file or directory.
ls: Cannot access /srv: No such file or directory.
ls: Cannot access /sys: No such file or directory.
ls: Cannot access /tftpboot: No such file or directory.
ls: Cannot access /usr: No such file or directory.
ls: Cannot access /var: No such file or directory.
ls: Cannot access /zookeeper.out: No such file or directory.
ls: Cannot access /zookeeper_server.pid: No such file or directory.

Can anyone please let me know what could be the issue here? I have a 7 node hadoop cluster which was working fine. I encountered this issue around 2 days back only. have tried restarting cluster, restarting nodes etc but still facing same issue.

Thanks,

Upvotes: 2

Views: 6867

Answers (2)

Vikas Hardia
Vikas Hardia

Reputation: 2695

there is no issue with your hadoop

hadoop fs -ls 

is not showing any output because there is no directory or files in home directory of the current user (from which you are executing command)

please run the second command as

hadoop fs -ls /

instead of

hadoop fs -ls /*

this will work fine and will give you correct output.

Upvotes: 8

Simmant
Simmant

Reputation: 1513

well its shows that you dont set the all the variable properly with the your path .. 1st you need to configure your java home before you hadoop

flow this article for configuration of hadoop

http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/

and also give the user permission of the user in which you wish to install the hadoop.

Upvotes: 0

Related Questions