转载

Hive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)

本文链接地址: http://www.mannyisbusy.com/hive%e5%90%af%e5%8a%a8%e5%bc%82%e5%b8%b8-unsatisfiedlinkerrorunsatisfiedlinkerror-nativeioposix-chmodimplnative-method/

背景描述:

所使用软件是以下版本:

Hive 1.2.1  原生

Hadoop 2.5.2 原生

之前使用一直正常,今天临时在机器上进行Impala性能测试后(Impala是临时安装的),发现Hive无法启动,报出下面的错误。

16/04/26 15:43:29 WARN conf.HiveConf: DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.

16/04/26 15:43:29 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist  Logging initialized using configuration in jar:file:/homepk/hiveb/hive-common-1.0.1.jar!/hive-log4j.propertiesSLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/homepk/hadoopHive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)/hadoop/commonHive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)b/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/homeHive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)pk/hbaseHive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)b/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/homeHive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)pk/hiveHive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)b/hive-jdbc-1.0.1-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See Hive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.  at org.apache.hadoop.io.nativeio.NativeIO$POSIX.chmodImpl(Native Method)  at org.apache.hadoop.io.nativeio.NativeIO$POSIX.chmod(NativeIO.java:226)  at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSys  at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.jav  at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:28  at org.apache.hadoop.hive.ql.session.SessionState.createPath(SessionStat  at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(Sess  at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.jav  at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:626)  at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:570)  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces  at java.lang.reflect.Method.invoke(Method.java:606)  at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

故障分析:

Impala是Cloudera开发的实时查询引擎,底层还是使用HDFS,但是如果使用原生Hadoop,需要更改很多配置,如果使用Cloudera Manager进行安装,则会更改现在Hadoop的一些配置,如果不注意就掉坑里了。安装Impala后,Hadoop的native库有一些改变,直接上图:

修改前:

Hive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)

修改后:

Hive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)

lib下native文件修改后,hive在打开shell客户端的时候,需要使用这个文件夹下的一些文件,因为文件改动,导致无法读取,抛出异常。

解决方法:

(1)不要随意在安装原生的Apache hadoop的节点上安装Impala

(2)从别的节点复制lib/native下的文件到hive节点上,替原先Hadoop的相关文件,重启Hadoop搞定。

原创文章,转载请注明:转载自Manny很忙

本文标题: Hive启动异常 UnsatisfiedLinkError:UnsatisfiedLinkError:…NativeIO$POSIX.chmodImpl(Native Method)

原文  http://www.mannyisbusy.com/hive启动异常-unsatisfiedlinkerrorunsatisfiedlinkerror-nativeioposix-chmodimplnative-method/
正文到此结束
Loading...