项目场景:

        Hadoop启动NameNode报错::ERROR: Cannot set priority of namenode process 
 



问题描述:

        Hadoop启动NameNode报错ERROR: Cannot set priority of namenode process 2639

[atguigu@localhost333 logs]$ tail -100  hadoop-localhost -namenode-hadoop333.log 

 

@Override public void run() { bytes = mmInStream.read(buffer); mHandler.obtainMessage(READ_DATA, bytes, -1, buffer).sendToTarget(); } 


原因分析:

首先查看日志:hadoop-localhost -namenode-hadoop103.log

命令如下:
[localhost @hadoop333 logs]$ tail -100  hadoop-localhost -namenode-hadoop103.log 

2021-09-17 16:41:25,656 INFO org.apache.localhost.util.ExitUtil: 
Exiting with status 1: org.apache.localhost.hdfs.server.common.InconsistentFSStateException: 
Directory /opt/ha/hadoop-3.1.3/data/name is in an inconsistent state: 
storage directory does not exist or is not accessible.
2021-09-17 16:41:25,663 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: 
SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at hadoop333/192.168.1.103


解决方案:

尝试将CentOS7重启,之后重新将hadoop中的data和logs 还有系统根目录的tmp中的文件都删除,对Hadoop重新进行初始化问题解决。

rm -rf /opt/ha/hadoop-3.1.3/data /opt/ha/hadoop-3.1.3/logs

sudo rm -rf /tmp/*

hdfs namenode -format

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐