localhost: ERROR: Cannot set priority of datanode process 32156

Shubham Hupare picture Shubham Hupare · Sep 18, 2017 · Viewed 30.6k times · Source

I am trying to install hadoop on ubuntu 16.04 but while starting the hadoop it will give me following error

localhost: ERROR: Cannot set priority of datanode process 32156.
Starting secondary namenodes [it-OptiPlex-3020]
2017-09-18 21:13:48,343 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting resourcemanager
Starting nodemanagers

Please someone tell me why i am getting this error ? Thanks in advance.

Answer

ahajib picture ahajib · Jul 22, 2019

I had to deal with the same issue and kept getting the following exception:

Starting namenodes on [localhost]
Starting datanodes
localhost: ERROR: Cannot set priority of datanode process 8944
Starting secondary namenodes [MBPRO-0100.local]
2019-07-22 09:56:53,020 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

As others have mentioned, you need to first make sure that all path parameters are set correctly which is what I checked first. Then followed these steps to solve the issue:

1- Stop dfs service and format hdfs:

sbin/stop-dfs.sh
sudo bin/hdfs namenode -format

2- Change permissions for the hadoop temp directory:

sudo chmod -R 777 /usr/local/Cellar/hadoop/hdfs/tmp

3- Start service again:

sbin/start-dfs.sh

Good luck