hadoop java.io.IOException: while running namenode -format

回眸只為那壹抹淺笑 提交于 2019-11-30 06:59:05

try with sudo (I realize you changed permissions) but I would still try sudo and check if that resolves the problem.

Following steps resolved my problem -

1- sudo su

Enter your password.

2-/usr/local/hadoop/bin/hdfs namenode -format.

This has been done for hadoop2.5 in which "hadoop namenode -format" has beendeprecated hence using "hdfs namenode -format"

Check hdfs-site.xml configuration, it may has a wrong path for properties dfs.namenode.name.dir and dfs.datanode.data.dir In my case it was the cause of the problem (directory was situated in other then current user's home folder).

This is a permissions issue. Either you can use 1. sudo 2. login as root

But the best solution is

sudo chown $HADOOP_HOME

hadoop namenode -format

Where HADOOP_HOME is your hadoop installation directory

sudo is broken in this situation, but pkexec (the command-line frontend to PolicyKit) still works, so you can fix it with a single command. No rebooting is necessary.

pkexec chmod 0440 /etc/sudoers

This assumes PolicyKit is installed. If this is a desktop system (rather than a server with no GUI), it is.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!