`
lalaeye
  • 浏览: 15438 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Hadoop practice: WARN util.NativeCodeLoader

 
阅读更多

When start the hadoop by "./start-all.sh" after configured which followed suggestion of other's bolgs.

the warning was occured when do the step of start, see the log:

[hadoop@Test-01 sbin]$ ./start-all.sh 
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
14/06/10 15:20:46 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [Test-01]
...

 

1. Not familar with hadoop, then go around the blogs from net and try to find out the solution that can help me to resolv this issue, thanks to jiedushi and find a way to locate the warnning cause which provided at his blog: http://blog.csdn.net/jiedushi/article/details/7496327

Then set the env as 

 export HADOOP_ROOT_LOGGER=DEBUG,console

 this can output the detail log of debug level to the console, and find the issue cause easily.

 

2. Then do the same demo and get the output log from console as following:

[hadoop@Test-01 bin]$ export HADOOP_ROOT_LOGGER=DEBUG,console
[hadoop@Test-01 bin]$ ./hadoop fs -text /home/hadoop/ant1.8.tar 
14/06/10 15:44:58 DEBUG util.Shell: setsid exited with exit code 0
14/06/10 15:44:58 DEBUG conf.Configuration: parsing URL jar:file:/home/hadoop/hadoop-2.4.0/share/hadoop/common/hadoop-common-2.4.0.jar!/core-default.xml
14/06/10 15:44:58 DEBUG conf.Configuration: parsing input stream sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@531d2a
14/06/10 15:44:58 DEBUG conf.Configuration: parsing URL file:/home/hadoop/hadoop-2.4.0/etc/hadoop/core-site.xml
14/06/10 15:44:58 DEBUG conf.Configuration: parsing input stream java.io.BufferedInputStream@7d611f
14/06/10 15:44:58 DEBUG lib.MutableMetricsFactory: field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginSuccess with annotation @org.apache.hadoop.metrics2.annotation.Metric(valueName=Time, value=[Rate of successful kerberos logins and latency (milliseconds)], about=, type=DEFAULT, always=false, sampleName=Ops)
14/06/10 15:44:58 DEBUG lib.MutableMetricsFactory: field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.loginFailure with annotation @org.apache.hadoop.metrics2.annotation.Metric(valueName=Time, value=[Rate of failed kerberos logins and latency (milliseconds)], about=, type=DEFAULT, always=false, sampleName=Ops)
14/06/10 15:44:58 DEBUG lib.MutableMetricsFactory: field org.apache.hadoop.metrics2.lib.MutableRate org.apache.hadoop.security.UserGroupInformation$UgiMetrics.getGroups with annotation @org.apache.hadoop.metrics2.annotation.Metric(valueName=Time, value=[GetGroups], about=, type=DEFAULT, always=false, sampleName=Ops)
14/06/10 15:44:58 DEBUG impl.MetricsSystemImpl: UgiMetrics, User and group related metrics
14/06/10 15:44:58 DEBUG security.Groups:  Creating new Groups object
14/06/10 15:44:58 DEBUG util.NativeCodeLoader: Trying to load the custom-built native-hadoop library...
14/06/10 15:44:58 DEBUG util.NativeCodeLoader: Failed to load native-hadoop with error: java.lang.UnsatisfiedLinkError: /home/hadoop/hadoop-2.4.0/lib/native/libhadoop.so.1.0.0: /lib/libc.so.6: version `GLIBC_2.6' not found (required by /home/hadoop/hadoop-2.4.0/lib/native/libhadoop.so.1.0.0)
14/06/10 15:44:58 DEBUG util.NativeCodeLoader: java.library.path=/home/hadoop/hadoop-2.4.0/lib/native
14/06/10 15:44:58 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/06/10 15:44:58 DEBUG security.JniBasedUnixGroupsMappingWithFallback: Falling back to shell based
14/06/10 15:44:58 DEBUG security.JniBasedUnixGroupsMappingWithFallback: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping
14/06/10 15:44:58 DEBUG security.Groups: Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback; cacheTimeout=300000; warningDeltaMs=5000
14/06/10 15:44:58 DEBUG security.UserGroupInformation: hadoop login
14/06/10 15:44:58 DEBUG security.UserGroupInformation: hadoop login commit
14/06/10 15:44:58 DEBUG security.UserGroupInformation: using local user:UnixPrincipal: hadoop
14/06/10 15:44:58 DEBUG security.UserGroupInformation: UGI loginUser:hadoop (auth:SIMPLE)
14/06/10 15:44:58 DEBUG hdfs.BlockReaderLocal: dfs.client.use.legacy.blockreader.local = false
14/06/10 15:44:58 DEBUG hdfs.BlockReaderLocal: dfs.client.read.shortcircuit = false
14/06/10 15:44:58 DEBUG hdfs.BlockReaderLocal: dfs.client.domain.socket.data.traffic = false
14/06/10 15:44:58 DEBUG hdfs.BlockReaderLocal: dfs.domain.socket.path = 
14/06/10 15:44:58 DEBUG retry.RetryUtils: multipleLinearRandomRetry = null
14/06/10 15:44:58 DEBUG ipc.Server: rpcKind=RPC_PROTOCOL_BUFFER, rpcRequestWrapperClass=class org.apache.hadoop.ipc.ProtobufRpcEngine$RpcRequestWrapper, rpcInvoker=org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker@273cef
14/06/10 15:44:59 DEBUG ipc.Client: getting client out of cache: org.apache.hadoop.ipc.Client@102ae46
14/06/10 15:44:59 DEBUG hdfs.BlockReaderLocal: Both short-circuit local reads and UNIX domain socket are disabled.
14/06/10 15:44:59 DEBUG ipc.Client: The ping interval is 60000 ms.
14/06/10 15:44:59 DEBUG ipc.Client: Connecting to /127.0.0.1:9000
14/06/10 15:44:59 DEBUG ipc.Client: IPC Client (31620548) connection to /127.0.0.1:9000 from hadoop: starting, having connections 1
14/06/10 15:44:59 DEBUG ipc.Client: IPC Client (31620548) connection to /127.0.0.1:9000 from hadoop sending #0
14/06/10 15:44:59 DEBUG ipc.Client: IPC Client (31620548) connection to /127.0.0.1:9000 from hadoop got value #0
14/06/10 15:44:59 DEBUG ipc.ProtobufRpcEngine: Call: getFileInfo took 272ms
text: `/home/hadoop/ant1.8.tar': No such file or directory
14/06/10 15:44:59 DEBUG ipc.Client: stopping client from cache: org.apache.hadoop.ipc.Client@102ae46
14/06/10 15:44:59 DEBUG ipc.Client: removing client from cache: org.apache.hadoop.ipc.Client@102ae46
14/06/10 15:44:59 DEBUG ipc.Client: stopping actual client because no more references remain: org.apache.hadoop.ipc.Client@102ae46
14/06/10 15:44:59 DEBUG ipc.Client: Stopping client
14/06/10 15:44:59 DEBUG ipc.Client: IPC Client (31620548) connection to /127.0.0.1:9000 from hadoop: closed
14/06/10 15:44:59 DEBUG ipc.Client: IPC Client (31620548) connection to /127.0.0.1:9000 from hadoop: stopped, remaining connections 0

 check the log at line13~17, it given the detail casue of "NativeCodeLoader" exception, this can make me to resolve this problem quickly.

 

---------------------------------------------------glibc split line---------------------------------------------------------

As the log prompt me to provide the not founded glic " version `GLIBC_2.6' " at the log.

How to do this, if ur professional of linux, it is so easy to fix the issue.

How to Upgrade the gilbc, please refer to "CsuBoy 'Blog": http://blog.csuboy.com/glibc-update-to-2-6/

 

Beofre upgrade the glibc, check the link for the lib, do this can help you to resolve issues by yourself:

[hadoop@Test-01 sbin]$ ll /home/hadoop/hadoop-2.4.0/lib/native/libhadoop.so.1.0.0
-rwxr-xr-x 1 hadoop hadoop 488873 Mar 31 16:49 /home/hadoop/hadoop-2.4.0/lib/native/libhadoop.so.1.0.0
[hadoop@Test-01 sbin]$ cd /home/hadoop/hadoop-2.4.0/lib/native/
[hadoop@Test-01 native]$ ll
total 2288
-rw-r--r-- 1 hadoop hadoop 687184 Mar 31 16:49 libhadoop.a
-rw-r--r-- 1 hadoop hadoop 534024 Mar 31 16:49 libhadooppipes.a
lrwxrwxrwx 1 hadoop hadoop     18 May 28 15:42 libhadoop.so -> libhadoop.so.1.0.0
-rwxr-xr-x 1 hadoop hadoop 488873 Mar 31 16:49 libhadoop.so.1.0.0
-rw-r--r-- 1 hadoop hadoop 226360 Mar 31 16:49 libhadooputils.a
-rw-r--r-- 1 hadoop hadoop 204586 Mar 31 16:49 libhdfs.a
lrwxrwxrwx 1 hadoop hadoop     16 May 28 15:42 libhdfs.so -> libhdfs.so.0.0.0
-rwxr-xr-x 1 hadoop hadoop 167760 Mar 31 16:49 libhdfs.so.0.0.0
[hadoop@Test-01 native]$ file libhadoop.so.1.0.0
libhadoop.so.1.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
[hadoop@Test-01 native]$ ldd libhadoop.so.1.0.0
./libhadoop.so.1.0.0: /lib/libc.so.6: version `GLIBC_2.6' not found (required by ./libhadoop.so.1.0.0)
./libhadoop.so.1.0.0: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./libhadoop.so.1.0.0)
        linux-gate.so.1 =>  (0x00a6c000)
        libdl.so.2 => /lib/libdl.so.2 (0x00dd1000)
        libjvm.so => not found
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        /lib/ld-linux.so.2 (0x004e7000)
[hadoop@Test-01 native]$ rpm -qa glibc
glibc-2.5-81.el5_8.7
[root @Test-03 native]/lib/libc.so.6
GNU C Library stable release version 2.5, by Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-54).
Compiled on a Linux 2.6.9 system on 2013-10-08.
Available extensions:
        The C stubs add-on version 2.1.2.
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        GNU libio by Per Bothner
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
        RT using linux kernel aio
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
[root @Test-03 native]

After this, you would know more beyond the problem itself. 

 

---------------------------------------------------32-x64 split line---------------------------------------------------------

If you use the x64 os, it will need you to compile the source;

you can follows as the blog: iloveyin :http://blog.csdn.net/iloveyin/article/details/28909771

 

--------------------------------------------------- lib link split line---------------------------------------------------------

After recompile, still have issue as:

 

14/06/13 13:19:56 DEBUG util.NativeCodeLoader: Trying to load the custom-built native-hadoop library...
14/06/13 13:19:56 DEBUG util.NativeCodeLoader: Failed to load native-hadoop with error: java.lang.UnsatisfiedLinkError: no hadoop in java.library.path
14/06/13 13:19:56 DEBUG util.NativeCodeLoader: java.library.path=/data/bigdata/.hadoop/hadoop-2.4.0/lib
14/06/13 13:19:56 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

 Just add the env variable:

 

export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native

 

--------------------------------------------------- dev split line---------------------------------------------------------

 

分享到:
评论

相关推荐

    Hadoop 启动WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using

    搭建hadoop 环境时遇到启动异常告警问题 “WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable” 上来不多说,百度收集些相关...

    hadoop.dll包括winutils.exe

    hadoop2.6版本的dll,网上比较多的是2.2的dll,如果2.6版本用2.2的dll,会报hadoop 2.6 UnsatisfiedLinkError: org.apache.hadoop.util.NativeCrc32.nativeComputeChunkedSumsByteArra 错误,因为2.2的dll中...

    hadoop-core-1.1.1.jar

    原错误提示为:12/04/24 15:32:44 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 12/04/24 15:32:44 ERROR security....

    hadoop-2.6.0-hadoop.dll-winutils.exe

    log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See ...

    window 本地执行 hadoop 缺失的hadoop.dll 和 winutils.exe 文件

    at org.apache.hadoop.util.Shell.checkHadoopHomeInner(Shell.java:468) at org.apache.hadoop.util.Shell.checkHadoopHome(Shell.java:439) at org.apache.hadoop.util.Shell.(Shell.java:516) Exception ...

    hadoop-2.4.1 64位 libhadoop.so.1.0.0

    WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Starting namenodes on [Java HotSpot(TM) Client VM warning: You have ...

    hadoop java.lang.UnsatisfiedLinkError

    解决方案:Exceptionin thread "main" java.lang.UnsatisfiedLinkError:org.apache.hadoop.util.NativeCrc32.nativeCo

    hadoop-lzo-0.4.20.jar

    &lt;value&gt;org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,com.hadoop.compression.lzo.LzoCodec,org.apache.hadoop.io.compress.BZip2Codec &lt;name&gt;io.compression.codec....

    大数据安全-kerberos技术-hadoop安装包,hadoop版本:hadoop-3.3.4.tar.gz

    本资源提供的是Hadoop的大数据安全组件——Kerberos的集成安装包,具体版本为hadoop-3.3.4.tar.gz,这是一款针对Hadoop进行安全配置的重要工具。 Hadoop是一个开源的分布式计算框架,它允许在大规模集群上存储和...

    hadoop.dll & winutils.exe For hadoop-2.8.0

    这个压缩包文件包含的是"Hadoop.dll"和"winutils.exe"两个关键组件,它们对于在Windows环境下配置和运行Hadoop生态系统至关重要。 首先,我们来详细了解这两个文件: 1. **Hadoop.dll**:这是一个动态链接库(DLL...

    hadoop2.8.1 native for macOS10

    WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Found 2 items 解决方法是下载hadoop源代码重新编译, 但中间需要下载安装...

    CDH集群大数据hadoop报错解决办法及思路整理-绝对干货

    CDH集群大数据hadoop报错解决办法及思路整理,主要解决大数据在运行过程中所遇到的问题,相关解决办法都是实践验证过。

    jdk7+ubuntu14.04_32位下编译的hadoop2.6.0的libhadoop.so.1.0.0

    jdk7+ubuntu14.04_32位下编译的hadoop2.6.0的libhadoop....14/10/10 08:35:56 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

    hadoop-3.1.4.tar.gz

    Hadoop是Apache软件基金会开发的一个开源分布式计算框架,主要用于处理和存储海量数据。这个压缩包“hadoop-3.1.4.tar.gz”是Hadoop 3.1.4版本的Linux 64位编译安装包,适用于CentOS 6操作系统。在大数据领域,...

    hadoop-3.1.3-src.tar.gz

    Hadoop是Apache软件基金会开发的一个开源分布式计算框架,它的核心设计思想是“大规模数据分布式处理”。这个名为“hadoop-3.1.3-src.tar.gz”的压缩包包含了Hadoop 3.1.3版本的源代码,对于开发者来说,这是一个...

    hadoop winutils合集,org.apache.hadoop.util.NativeCrc32

    该wintuils合集包含hadoop2.6.0、2.6.3、2.6.4、2.7.1、2.8.0、2.8.3、3.0.0版本,请需要的小伙伴们前来下载,用以解决本地测试报错...(将bin文件放到/hadoop/下,hadoop.dll和wintuils.exe放到/windows/system32/下)

    Hadoop下载 hadoop-3.3.3.tar.gz

    Hadoop是一个由Apache基金会所开发的分布式系统基础架构。用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进 Hadoop是一个由Apache基金会所开发的分布式系统基础架构。用户可以在不...

    hadoop-2.7.1.tar.gz.zip

    Hadoop是一个开源的分布式计算框架,由Apache基金会开发,它主要设计用于处理和存储大量数据。这个名为“hadoop-2.7.1.tar.gz.zip”的文件包含了Hadoop的2.7.1版本,这是一个非常重要的里程碑,因为它包含了对Hadoop...

    hadoop-2.7.3.tar.gz 下载 hadoop tar 包下载

    Hadoop是Apache软件基金会开发的一个开源分布式计算框架,它允许在廉价硬件上处理大量数据,是大数据处理领域的重要工具。2.7.3是Hadoop的一个稳定版本,提供了可靠的分布式存储系统HDFS(Hadoop Distributed File ...

Global site tag (gtag.js) - Google Analytics