Support Questions
Find answers, ask questions, and share your expertise

problem executing ls with hdfs 3.1

Highlighted

problem executing ls with hdfs 3.1

Contributor

Hi,

I installed a cluster HDP-3.1.0.0 (3.1.0.0-78) with HDFS 3.1.1

And I can't execute even an hdfs dfs -ls /

Did any one encountred the same problems , please ?

Here the errors :

/usr/hdp/3.1.0.0-78//hadoop-hdfs/bin/hdfs.distro: line 239: hadoop_abs: command not found

/usr/hdp/3.1.0.0-78//hadoop-hdfs/bin/hdfs.distro: line 248: hadoop_need_reexec: command not found

/usr/hdp/3.1.0.0-78//hadoop-hdfs/bin/hdfs.distro: line 256: hadoop_verify_user_perm: command not found

/usr/hdp/3.1.0.0-78//hadoop-hdfs/bin/hdfs.distro: line 267: hadoop_add_client_opts: command not found

/usr/hdp/3.1.0.0-78//hadoop-hdfs/bin/hdfs.distro: line 274: hadoop_subcommand_opts: command not found

/usr/hdp/3.1.0.0-78//hadoop-hdfs/bin/hdfs.distro: line 277: hadoop_generic_java_subcmd_handler: command not found

Best,

Helmi KHALIFA

6 REPLIES 6
Highlighted

Re: problem executing ls with hdfs 3.1

Mentor

@Helmi KHALIFA

That looks a problem with your hadoop environment settings! These variables in /etc/hadoop/conf/hadoop-env.sh file.

Its hould look like the attached pdf.


hadoop-env.pdf

Re: problem executing ls with hdfs 3.1

Contributor

Hi Geoffrey,


Thank you for your answer.


I checked the pdf but there are manu differences between yours and mine as it is hdp 2.6.5 Vs hdp 3.1.0.0-78


Thanks,

Helmi

Highlighted

Re: problem executing ls with hdfs 3.1

Mentor

@Helmi KHALIFA

Okay let me spin up a HDP 3.1 and share my hadoop-env.sh shortly

Highlighted

Re: problem executing ls with hdfs 3.1

Super Mentor

@Helmi KHALIFA

Are you using "Bash" Shell? What is the version of your bash?

# head -n 1 /usr/hdp/3.1.0.0-78//hadoop-hdfs/bin/hdfs.distro
#!/usr/bin/env bash

.

Please check if you are using correct shell while running the "hdfs" commands. Whet do you see when you run the below command?

# echo $0
-bash

# echo $SHELL
/bin/bash

#  env | grep -i shell
SHELL=/bin/bash

.


Highlighted

Re: problem executing ls with hdfs 3.1

Super Mentor

@Helmi KHALIFA

Are you using "Bash" Shell? What is the version of your bash?

Please check if you are using correct shell while running the "hdfs" commands. Whet do you see when you run the below command?

# echo $0
-bash

# echo $SHELL
/bin/bash

#  env | grep -i shell
SHELL=/bin/bash

.

Highlighted

Re: problem executing ls with hdfs 3.1

Hi @jsensharma 

I have all correct shell and outputs of all commands look exactly same as you have mentioned.