大数据

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

时间:2017-5-9 13:29:40  作者:solgle  来源:solgle.com  查看:872  评论:0
内容摘要:WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable该错误在nameNod...
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
该错误在nameNode启动失败,所有dataNode都正常启动。
 
[hodp@nameNode bin]$ /u01/hadoop-3.0.0-alpha2/sbin/start-dfs.sh 
Starting namenodes on [nameNode]
Starting datanodes
dataNode2: datanode is running as process 2368.  Stop it first.
dataNode1: datanode is running as process 2394.  Stop it first.
2017-05-04 05:05:13,370 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
---按照网上有些所谓的权威资料,hadoop native是32位和64位的问题,并不能够解决该问题。因为我查了我的系统和hadoop native都是64位的
 
。可能是彼此的环境不同而已。
 
---还是查看日志,日志中记载了下列信息。
2017-05-04 04:54:55,910 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode.
java.io.IOException: NameNode is not formatted.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:221)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:1028)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:677)
 
 
--停掉集群 stop-all.sh,删除问题节点的data目录下的所有内容
[hodp@nameNode bin]$ ./hdfs namenode -format
2017-05-04 05:04:24,064 INFO namenode.NameNode: STARTUP_MSG: 
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   user = hodp
STARTUP_MSG:   host = nameNode/129.16.10.23
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 3.0.0-alpha2
STARTUP_MSG:   classpath = /u01/hadoop-3.0.0-alpha2//etc/hadoop:/u01/hadoop-3.0.0-alpha2//share/hadoop/common/lib/gson-2.2.4.jar:/u01/hado
 
--同时在hadoop-env.sh中加了条错误输出语句:export HADOOP_ROOT_LOGGER=DEBUG.console
--再次启动环境,居然没有报错了。
 
[hodp@nameNode hadoop]$ /u01/hadoop-3.0.0-alpha2/sbin/start-dfs.sh
Starting namenodes on [nameNode]
Starting datanodes
[hodp@nameNode hadoop]$ jps
6277 Jps
6057 NameNode
[hodp@nameNode hadoop]$ /u01/hadoop-3.0.0-alpha2/sbin/start-yarn..sh
-bash: /u01/hadoop-3.0.0-alpha2/sbin/start-yarn..sh: No such file or directory
[hodp@nameNode hadoop]$ /u01/hadoop-3.0.0-alpha2/sbin/start-yarn.sh
Starting resourcemanager
Starting nodemanagers
[hodp@nameNode hadoop]$ jps
6386 ResourceManager
6661 Jps
6057 NameNode
[hodp@nameNode hadoop]$ 
 
--通过测试取消错误输出也能启动成功了,但是好景不长,这个报错还是在反复重启后存在,应该是因编译的版本不一嗦造成的
在/u01/hadoop-3.0.0-alpha2/etc/hadoop/log4j.properties文件中添加
log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR
 
 

solgle.com 版权所有,欢迎分享!!!

相关评论
   Copyright © 2013-2020 solgle.com,All rights reserved.[solgle.com] 公安机关备案号:51010802000219
Email:solgle@solgle.com; weixin:cd1008610000 ICP:蜀ICP备14011070号-1