Change permissions on the container-executor file.
chown -R root:hadoop /usr/hdp/current/hadoop-yarn/bin/container-executor chmod -R 650 /usr/hdp/current/hadoop-yarn/bin/container-executor
Note If these permissions are not set, the healthcheck script will return an error stating that the DataNode is UNHEALTHY.
Execute these commands from the JobHistory server to set up directories on HDFS:
su <HDFS_USER> hdfs dfs -mkdir -p /mr-history/tmp hdfs dfs -chmod -R 1777 /mr-history/tmp hdfs dfs -mkdir -p /mr-history/done hdfs dfs -chmod -R 1777 /mr-history/done hdfs dfs -chown -R $MAPRED_USER:$HDFS_USER /mr-history hdfs dfs -mkdir -p /app-logs hdfs dfs -chmod -R 1777 /app-logs hdfs dfs -chown <YARN_USER> /app-logs
Run the following command from the JobHistory server:
su -l yarn -c "/usr/hdp/current/hadoop-mapreduce-historyserver/sbin/mr-jobhistory-daemon.sh --config $HADOOP_CONF_DIR start historyserver"
$HADOOP_CONF_DIR is the directory for storing the Hadoop configuration files. For example, /etc/hadoop/conf.