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

后端 未结 5 1533
温柔的废话
温柔的废话 2020-12-30 07:28

I ran namenode -format.This is my output. I tried changing the file permissions chmod 777 hadoop.

I believe this line is the error ERROR namenode.NameNode: java.io

相关标签:
5条回答
  • 2020-12-30 08:03

    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"

    0 讨论(0)
  • 2020-12-30 08:05

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

    0 讨论(0)
  • 2020-12-30 08:12

    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).

    0 讨论(0)
  • 2020-12-30 08:14

    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

    0 讨论(0)
  • 2020-12-30 08:15

    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.

    0 讨论(0)
提交回复
热议问题