Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to start NameNode

Tags:

java

hadoop

I've successfully installed hadoop on local by following these steps Step by step hadoop installation on windows 10

Java installed version: 1.8.0_231 Hadoop installed version: Hadoop 3.2.1

But after running command hdfs namenode -format I'm getting following error

Re-format filesystem in Storage Directory root= C:\hadoop-3.2.1\data\namenode; location= null ? (Y or N) y
2019-10-19 12:34:58,809 INFO namenode.FSImage: Allocated new BlockPoolId: BP-1445655329-172.18.148.177-1571468698797
2019-10-19 12:34:58,809 INFO common.Storage: Will remove files: []
2019-10-19 12:34:58,812 ERROR namenode.NameNode: Failed to start namenode.java.lang.UnsupportedOperationException
    at java.nio.file.Files.setPosixFilePermissions(Files.java:2044)
    at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:452)
    at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:591)
    at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:613)
    at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:188)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1206)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1649)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1759)
2019-10-19 12:34:58,819 INFO util.ExitUtil: Exiting with status 1: java.lang.UnsupportedOperationException
2019-10-19 12:34:58,823 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at CWT-DST-0051/***.**.***.***

I'm totally new to this, what can be the issue? Thanks in advance

like image 912
Shreyas Pednekar Avatar asked Oct 19 '19 07:10

Shreyas Pednekar


Video Answer


2 Answers

I resolved the issue by installing Hadoop 2.9.1, there was namenode issue in Hadoop 3.2.1 version hdfs namenode issue in 3.2.1

like image 95
Shreyas Pednekar Avatar answered Oct 13 '22 00:10

Shreyas Pednekar


  1. If you have installed 32-bit Java version in your windows, uou have to set environtment variables JAVA_HOME path set as C:\Progra~2\Java\<JDK version> but it seems to not working.
  • Therefor you have to try 64-bit java version by setting you JAVA_HOME as C:\Progra~1\Java\<JDK version>.

After setting 64-bit Java version as JAVA_HOME you have to run start-all.cmd again in cmd. Then except namenode, all other deamons were worked. To run namenode you have to follow these steps.

  1. Open cmd as administrator.
  2. Type and run stop-all.cmd
  3. Then run hadoop namenode –format
  4. Finally run start-all.cmd

Hope it will work for you.

Edit-:

Go to your config files of hdfs with following codes (enter it in cmd or powershell)

vim %HADOOP_HOME%\etc\hadoop\hdfs-site.xml

In your config files, you need to use forward slashes and a protocol for the file URI

For example, change

 C:\BigData\hadoop-2.9.1\data\namenode

to

file:/C:/BigData/hadoop-2.9.1/data/namenode
like image 36
Kalana Avatar answered Oct 13 '22 02:10

Kalana