Apache ranger整合hive报错记录
版本信息如下:
hadoop2.9.2
hive 2.x
ranger 最新版2.1.0
在hive端部署完ranger 插件以后,在使用beeline连接查询数据库时报错,报错信息如下:
verbose: on
: jdbc:hive2://192.168.0.9:10000> show databases;
Getting log thread is interrupted, since query is done!
Error: Error running query: java.lang.NoSuchFieldError: REPLLOAD (state=,code=)
org.apache.hive.service.cli.HiveSQLException: Error running query: java.lang.NoSuchFieldError: REPLLOAD
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:)
at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:)
at org.apache.hive.beeline.Commands.executeInternal(Commands.java:)
at org.apache.hive.beeline.Commands.execute(Commands.java:)
at org.apache.hive.beeline.Commands.sql(Commands.java:)
at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:)
at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:)
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:)
at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:)
at org.apache.hive.beeline.BeeLine.main(BeeLine.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.hadoop.util.RunJar.run(RunJar.java:)
at org.apache.hadoop.util.RunJar.main(RunJar.java:)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error running query: java.lang.NoSuchFieldError: REPLLOAD
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:)
at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:)
at org.apache.hive.service.cli.operation.Operation.run(Operation.java:)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:)
at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:)
at org.apache.hive.service.cli.session.HiveSessionProxy.access$(HiveSessionProxy.java:)
at org.apache.hive.service.cli.session.HiveSessionProxy$.run(HiveSessionProxy.java:)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:)
at com.sun.proxy.$Proxy52.executeStatementAsync(Unknown Source)
at org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:)
at org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:)
at org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: java.lang.NoSuchFieldError: REPLLOAD
at org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizer.checkPrivileges(RangerHiveAuthorizer.java:)
at org.apache.hadoop.hive.ql.Driver.doAuthorizationV2(Driver.java:)
at org.apache.hadoop.hive.ql.Driver.doAuthorization(Driver.java:)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:)
at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:)
... more
出现这种错误绝大部分是由于版本冲突导致或者版本不匹配导致的,
去ranger-admin的软件包下,查看ranger2.1.0支持的hive版本:
我的ranger-admin目录
#cd /data/ranger/ranger-2.1.-SNAPSHOT-admin/ews/webapp/WEB-INF/classes/ranger-plugins/hive
查看hive包信息:
#ll
total
-rw-r--r-- ranger ranger Nov : hive-common-3.1..jar
-rw-r--r-- ranger ranger Nov : hive-exec-3.1..jar
-rw-r--r-- ranger ranger Nov : hive-jdbc-3.1..jar
-rw-r--r-- ranger ranger Nov : hive-metastore-3.1..jar
-rw-r--r-- ranger ranger Nov : hive-service-3.1..jar
-rw-r--r-- ranger ranger Nov : libfb303-0.9..jar
-rw-r--r-- ranger ranger Nov : libthrift-0.12..jar
-rw-r--r-- ranger ranger Nov : ranger-hive-plugin-2.1.-SNAPSHOT.jar
发现支持的hive版本是3.x,而我当前使用的版本是2.x,导致使用beeline出错,
解决办法1:升级hive的版本到3.x,
[hduser@yjt ~]$ beeline -u jdbc:hive2://192.168.0.230:10000 -n hduser
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data1/hadoop/hive_3.1.2/lib/log4j-slf4j-impl-2.10..jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data1/hadoop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7..jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://192.168.0.230:10000
Connected to: Apache Hive (version 3.1.)
Driver: Hive JDBC (version 3.1.)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 3.1. by Apache Hive
: jdbc:hive2://192.168.0.230:10000> show databases;
INFO : Compiling command(queryId=hduser_20191108203220_9ae51d7b-38f0-4f3a-af96-c4ddb91ee9ad): show databases
INFO : Concurrency mode is disabled, not creating a lock manager
INFO : Semantic Analysis Completed (retrial = false)
INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database_name, type:string, comment:from deserializer)], properties:null)
INFO : Completed compiling command(queryId=hduser_20191108203220_9ae51d7b-38f0-4f3a-af96-c4ddb91ee9ad); Time taken: 1.348 seconds
INFO : Concurrency mode is disabled, not creating a lock manager
INFO : Executing command(queryId=hduser_20191108203220_9ae51d7b-38f0-4f3a-af96-c4ddb91ee9ad): show databases
INFO : Starting task [Stage-:DDL] in serial mode
INFO : Completed executing command(queryId=hduser_20191108203220_9ae51d7b-38f0-4f3a-af96-c4ddb91ee9ad); Time taken: 0.039 seconds
INFO : OK
INFO : Concurrency mode is disabled, not creating a lock manager
+----------------+
| database_name |
+----------------+
| default |
+----------------+
row selected (1.878 seconds)
: jdbc:hive2://192.168.0.230:10000> !q
Closing: : jdbc:hive2://192.168.0.230:10000
[hduser@yjt ~]$ hive --version
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data1/hadoop/hive_3.1.2/lib/log4j-slf4j-impl-2.10..jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data1/hadoop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7..jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Hive 3.1.
Git git://HW13934/Users/gates/tmp/hive-branch-3.1/hive -r 8190d2be7b7165effa62bd21b7d60ef81fb0e4af
Compiled by gates on Thu Aug :: PDT
From source with checksum 0492c08f784b188c349f6afb1d8d9847
[hduser@yjt ~]$
解决办法2:把ranger-admin hive下的包删除,然后从hive客户端拷贝相应的包到该目录下(我没有测试)
借鉴:
https://m.cppentry.com/bencandy.php?fid=117&id=186236
Apache ranger整合hive报错记录的更多相关文章
- hive报错( Non-Partition column appears in the partition specification)
在写及测的过程中发现的,有一些可能需要进一步验证.有时候hive报错位置不一定正确需要多确认 1 FAILED: NullPointerException null 不能用视图作为left outer ...
- spring+hibernate整合:报错org.hibernate.HibernateException: No Session found for current thread
spring+hibernate整合:报错信息如下 org.hibernate.HibernateException: No Session found for current thread at o ...
- hive报错:Caused by: ERROR XBM0H: Directory /var/lib/hive/metastore/metastore_db cannot be created.
在cdh集群中,删除之前的hive服务,然后将hive添加到其他节点,然后再通过hive客户端连接hive报错: Caused by: ERROR XJ041: Failed to create da ...
- Sqoop- sqoop将mysql数据表导入到hive报错
sqoop将mysql数据表导入到hive报错 [root@ip---- lib]# sqoop import --connect jdbc:mysql://54.223.175.12:3308/gx ...
- Hive 报错Class path contains multiple SLF4J bindings.
进入hive报错信息如下 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/ ...
- apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104))
apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104)) 今天用apache 自带的ab工具测试,当并发量达到1000多的时 ...
- weblogic 整合cxf 报错:cannot create a secure XmlInputFactory
weblogic 整合cxf 报错:cannot create a secure XmlInputFactory ================================ ©Copyright ...
- apache ab压力测试报错apr_socket_recv
apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104)) apache 自带的ab工具测试,当并发量达到1000多的时候报错如下 ...
- 启动Tomcat服务时,出现org.apache.catalina.startup.VersionLoggerListener报错
启动Tomcat服务时,出现org.apache.catalina.startup.VersionLoggerListener报错解决办法:打开Tomcat安装后目录,进入conf文件夹,找到配置文件 ...
随机推荐
- Java自学-类和对象 构造方法
怎么使用 Java 构造方法? 通过一个类创建一个对象,这个过程叫做实例化 实例化是通过调用构造方法(又叫做构造器)实现的 步骤 1 : 什么是构造方法 方法名和类名一样(包括大小写) 没有返回类型 ...
- Flutter Platform Channels
Flutter Platform Channels(一) https://www.jianshu.com/p/33ac774f99b1 https://www.jianshu.com/p/c1e206 ...
- SpringBoot之多Profile配置
近来在利用闲暇时间巩固下SpringBoot的基本知识,然后自己也做一些笔记,整理下当时所学知识,后面就干脆写到这里来了. 多Profile配置文件 在SpringBoot主配置文件编写的时候,文件名 ...
- CSS-2D动画笔记
概念: 2D 动画要是使用 transform 属性来实现文字或图像的的各种变形效果,如位移.缩放.旋转.倾斜等 transform属性变形方法: translate():位移 将元素沿着水平方向(X ...
- ifup/ifdown
这两个程序其实是script而已,它会直接到 /etc/ sysconfig/network-scripts目录下搜索对应的配置文件,例如ifup eth0,它会找出ifcfg-eth0这个文件的内容 ...
- FFmpeg--如何同步音视频的解决方案
如何同步视频 PTS和DTS 幸运的是,音频和视频流都有一些关于以多快速度和什么时间来播放它们的信息在里面.音频流有采样,视频流有每秒的帧率.然而,如果我们只是简单的通过数帧和乘以帧率的方式来同步视频 ...
- Java文件流下载并提示文件不存在
做文件下载功能的时候,一般使用流的形式下载文件, 如果源文件不存在,下载页面可能就会没有提示,或者一片空白 用户操作之后可能一头雾水,那如何友好提示呢? 想到的有两种 1.可以尝试下载一个名称为:文件 ...
- centos7 docker安装nginx
1.查询nginx最新镜像 docker search nginx 2.下载镜像 docker pull nginx 3.创建目录 mkdir -p /software/nginx/html mkdi ...
- SQL注入原理-手工联合注入查询技术
实验报告记录 得到实验结果
- Python并发编程-并发解决方案概述
Python并发编程-并发解决方案概述 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.并发和并行区别 1>.并行(parallel) 同时做某些事,可以互不干扰的同一个时 ...