0

I am trying to install hadoop 2.9.1 on ubuntu 19.10 and I did all steps explained in this video https://www.youtube.com/watch?v=Y6oit3rCsZo

The problem is that when I triyed to start single node cluster using this command :

hduser@-ubuntu:~$ start-dfs.sh

I get this error :

localhost: chown: modification of the owner of '/usr/local/hadoop-2.9.1/logs': Operation not allowed

I searched and I find some solutions given in "Permission denied" errors whe starting a single node cluster in Hadoop

and in namenode not running... i have already tried sudo chown -R username /usr/local/hadoop/ please help

So I tried to solve the problem using :

1- hduser@-ubuntu:~$ chown -R hduser /usr/local/hadoop/hadoop-2.9.1/

which return

chown: modification du propriétaire de '/usr/local/hadoop/hadoop-2.9.1/logs/yarn-imed-resourcemanager-imed-bigdata-ubuntu.out': Opération non permise chown: modification du propriétaire de '/usr/local/hadoop/hadoop-2.9.1/logs/SecurityAuth-imed.audit': Opération non permise chown: modification du propriétaire de '/usr/local/hadoop/hadoop-2.9.1/logs/userlogs': Opération non permise chown: modification du propriétaire de '/usr/local/hadoop/hadoop-2.9.1/logs/yarn-imed-resourcemanager-imed-bigdata-ubuntu.log': Opération non permise

chown: modification of the owner of '/usr/local/hadoop/hadoop-2.9.1/logs/yarn-imed-resourcemanager-imed-bigdata-ubuntu.out': Operation not allowed chown: modification of the owner of '/usr/local/hadoop/hadoop-2.9.1/logs/SecurityAuth-imed.audit': Operation not allowed chown: modification of the owner of '/usr/local/hadoop/hadoop-2.9.1/logs/userlogs': Operation not allowed chown: modification of the owner of '/usr/local/hadoop/hadoop-2.9.1/logs/yarn-imed-resourcemanager-imed-bigdata-ubuntu.log': Operation not allowed

2- I tried this command :

hduser@-ubuntu:~$ chmod 777 /usr/local/hadoop/hadoop-2.9.1/ 

And I get

chmod: modification of the rights of '/usr/local/hadoop/hadoop-2.9.1/': Operation not allowed

3- I added sudo in each time like sudo chmod 777 /usr/local/hadoop/hadoop-2.9.1/ and I get :

[sudo] Mot de passe de hduser : 

chmod: modification of dhduser does not appear in the sudoers file. This event will be reported. roits de '/usr/local/hadoop/hadoop-2.9.1/': Operation not allowed

4-Finally, I run the cluster node using /usr/local/hadoop/hadoop-2.9.1/sbin/start-dfs.sh instead. But, I got the same error !

Starting namenodes on [localhost] localhost: chown: modification of the owner of '/usr/local/hadoop-2.9.1/logs': Operation not allowed

Note that my start-dfs.sh file is :

 <configuration>
    <property>
    <name>dfs.replication</name>
    <value>1</value>
    </property>

    <property>
    <name>dfs.name.dir</name>
    <value>file:/usr/local/hadoop/hadoopdata/hdfs/namenode</value>
    </property>

    <property>
    <name>dfs.data.dir</name>
    <value>file:/usr/local/hadoop/hadoopdata/hdfs/datanode</value>
    </property>
    </configuration>

And ./.bashrc file contiens these parameters :

export HADOOP_PREFIX=/usr/local/hadoop/hadoop-2.9.1
export HADOOP_HOME=/usr/local/hadoop/hadoop-2.9.1
export HADOOP_MAPRED_HOME=${HADOOP_HOME}
export HADOOP_COMMON_HOME=${HADOOP_HOME}
export HADOOP_HDFS_HOME=${HADOOP_HOME}
export YARN_HOME=${HADOOP_HOME}
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop

#Native path
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_PREFIX/lib/native"

#Java path
export JAVA_HOME="/usr/lib/jvm/jdk1.8.0_251"

PLease, how can I resolve this issue ?

1 Answers1

0

Well, the solution was that I should include the hduser in the hadoopgroup to have permission on the folder /usr/local/hadoop/hadoop-2.9.1/logs using the command :

sudo chown -R hduser:hadoopgroup /usr/local/hadoop/hadoop-2.9.1/logs

That resolve my problem !