NameNode: Failed to start namenode in windows 7

ε祈祈猫儿з 提交于 2021-01-28 09:01:06

问题


I am trying to install Hadoop in windows machine, in middle I got the below error.

Logs

 17/11/28 16:31:48 ERROR namenode.NameNode: Failed to start namenode.
 java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
    at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:609)
    at org.apache.hadoop.fs.FileUtil.canWrite(FileUtil.java:996)
    at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.analyze 
 Storage(Storage.java:490)
    at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:369)
    at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:225)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:978)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:685)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:585)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:645)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:819)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:803)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1500)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1566)

回答1:


Looks like you didn't install Hadoop winutils or build Hadoop with Native Libraries

Native IO is mandatory on Windows and without it you will not be able to get your installation working. You must follow all the instructions from BUILDING.txt to ensure that Native IO support is built correctly

Hadoop2 on Windows




回答2:


I also have the similar issue. I am using Hadoop-2.8.1. These steps solved the error for me.

download the winutils of your version from GitHub

Copy paste winutils at <HADOOP_HOME>/bin/

Also. double check JAVA_HOME environment is correctly set and reference in hadoop-env.cmd file



来源:https://stackoverflow.com/questions/47530162/namenode-failed-to-start-namenode-in-windows-7

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