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文件夹,找到配置文件 ...
随机推荐
- Cascader 级联选择器hover选择效果
官网例子 <div class="block"> <span class="demonstration">hover 触发子菜单< ...
- 换个语言学一下 Golang (7)——使用函数
什么是函数 函数,简单来讲就是一段将输入数据转换为输出数据的公用代码块.当然有的时候函数的返回值为空,那么就是说输出数据为空.而真正的处理过程在函数内部已经完成了. 想一想我们为什么需要函数,最直接的 ...
- head 与 tail
head head [-n] 数字『文件』 显示前面n行 例如 head -n 3 test 显示 test 文件的前 3 行,也可以写作 head -3 test 比较有趣的是 -n 后面的数字,可 ...
- FIneUICore 版本的 AppBoxMvcCore
http://www.51aspx.com/code/codename/64088 CORE版本的APPBOXMVC欢迎下载
- vue echarts中绑定的click函数无法引用vue实例data里面的数据
在使用echarts的时候,需要在触发click事件之后去修改实例data里面的数据,可是发现用this引用后总是出现undefined, 解决办法: myChart.on('click', (par ...
- Gitlab创建一个项目
1.安装git yum install git 2.生成密钥文件:使用ssh-keygen生成密钥文件.ssh/id_rsa.pub ssh-keygen 执行过程中输入密码,以及确认密码,并可设置密 ...
- MySQL Percona Toolkit--pt-osc执行SQL命令
pt-osc执行日志 在对数据量为100000的表tb004做DROP COLUMN操作,pt-osc工具日志为: Operation, tries, wait: analyze_table, , c ...
- 整型 字符串方法 for循环
整型 # 整型 -- 数字 (int) # 用于比较和运算的 # 32位 -2 ** 31 ~ 2 ** 31 -1 # 64位 -2 ** 63 ~ 2 ** 63 -1 # + - * / // ...
- geopy 在python中的使用
https://blog.csdn.net/learn_tech/article/details/80756788 2018年06月21日 10:35:52 learn_tech 阅读数:1182 ...
- JS数组扁平化(flat)
需求:多维数组=>一维数组 let ary = [1, [2, [3, [4, 5]]], 6]; let str = JSON.stringify(ary); 第0种处理:直接的调用 arr_ ...