Hadoop启动常见问题-name is in an inconsistent state: storage directory does not exist or is

Error message:

Directory /tmp/hadoop-root/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.

问题:

Linux系统每次重新启动后,hadoop不能正常启动namenode,需要重新格式化namenode才可启动

原因:

hadoop默认将namenode格式化在/tmp下,而这个目录当在重启时会被清空,所以报错。

解决方案:

vim /usr/local/hadoop/etc/hadoop/core-site.xml
#add code
<property>
          <name>hadoop.tmp.dir</name>
          <value>/var/hadoop</value>
</property>

猜你喜欢

转载自blog.csdn.net/hu_lichao/article/details/109539268
今日推荐