Hi Sanjeev,

Below my host entry on one of the name node

[hdfs@sym-hdfsnn1 ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

10.175.6.10    sym-hdfsnn1.lvs.nimblestorage.com sym-hdfsnn1

Regards,
Kamaraj


From: संजीव (Sanjeev Tripurari)<mailto:sanjeevtripur...@gmail.com>
Sent: Monday, August 24, 2020 9:43 AM
To: Muthupandiyan, Kamaraj<mailto:kamaraj.muthupandi...@hpe.com>
Cc: user@hadoop.apache.org<mailto:user@hadoop.apache.org>
Subject: Re: Error while running "hdfs fs" commands

Hi,

looks like your hostname is hdfs,
can you share  your /etc/hosts file, you will have to enter ip and hostname, as 
it looks you command is doing host lookup..

Regards
-Sanjeev

On Fri, 21 Aug 2020 at 21:37, Muthupandiyan, Kamaraj 
<kamaraj.muthupandi...@hpe.com<mailto:kamaraj.muthupandi...@hpe.com>> wrote:
Hi Team,

Whenever I am executing the hdfs fs command and I am getting below error, 
please help me with this.

[hdfs@hdfsnn1 ~]$ hdfs dfs -ls /user
-ls: java.net.UnknownHostException: hdfs


[hdfs@sym-hdfsnn1 ~]$ hadoop fs -ls / file:///|hdfs:hdfsnn1:8020/
-bash: 
hdfs:sym-hdfsnn1.lvs.nimblestorage.com:8020/<http://sym-hdfsnn1.lvs.nimblestorage.com:8020/>:
 No such file or directory
-ls: java.net.UnknownHostException: hdfs
Usage: hadoop fs [generic options]
        [-appendToFile <localsrc> ... <dst>]
        [-cat [-ignoreCrc] <src> ...]
        [-checksum <src> ...]
        [-chgrp [-R] GROUP PATH...]
        [-chmod [-R] <MODE[,MODE]... | OCTALMODE> PATH...]
        [-chown [-R] [OWNER][:[GROUP]] PATH...]
        [-copyFromLocal [-f] [-p] [-l] [-d] <localsrc> ... <dst>]
        [-copyToLocal [-f] [-p] [-ignoreCrc] [-crc] <src> ... <localdst>]
        [-count [-q] [-h] [-v] [-t [<storage type>]] [-u] [-x] <path> ...]
        [-cp [-f] [-p | -p[topax]] [-d] <src> ... <dst>]
        [-createSnapshot <snapshotDir> [<snapshotName>]]
        [-deleteSnapshot <snapshotDir> <snapshotName>]
        [-df [-h] [<path> ...]]
        [-du [-s] [-h] [-x] <path> ...]
        [-expunge]
        [-find <path> ... <expression> ...]
        [-get [-f] [-p] [-ignoreCrc] [-crc] <src> ... <localdst>]
        [-getfacl [-R] <path>]
        [-getfattr [-R] {-n name | -d} [-e en] <path>]
        [-getmerge [-nl] [-skip-empty-file] <src> <localdst>]
        [-help [cmd ...]]
        [-ls [-C] [-d] [-h] [-q] [-R] [-t] [-S] [-r] [-u] [<path> ...]]
        [-mkdir [-p] <path> ...]
        [-moveFromLocal <localsrc> ... <dst>]



Regards,
Kamaraj
InfoSight - SRE


Reply via email to