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文件夹,找到配置文件 ...
随机推荐
- sense chrome扩展工具安装问题
下载一个chrome的插件,只能在国内下了.有个什么插件网 .下载完之后是 .crx 格式的.直接拖到 chrome的扩展工具里,显示,插件有问题.无语 参考了一个网上的教程. 1.先将扩展名 .c ...
- pandas-01 Series()的几种创建方法
pandas-01 Series()的几种创建方法 pandas.Series()的几种创建方法. import numpy as np import pandas as pd # 使用一个列表生成一 ...
- 【面试突击】-缓存击穿(布隆过滤器 Bloom Filter)
原文地址:https://blog.csdn.net/fouy_yun/article/details/81075432 前面的文章介绍了缓存的分类和使用的场景.通常情况下,缓存是加速系统响应的一种途 ...
- Koa2 和 Express 中间件对比
koa2 中间件 koa2的中间件是通过 async await 实现的,中间件执行顺序是"洋葱圈"模型. 中间件之间通过next函数联系,当一个中间件调用 next() 后,会将 ...
- appium 设备信息字典(desired_caps)
操作系统类型.操作系统版本.设备名称.要操作的APP应用的包名.activity名称desired_caps = { "platformName":"Android&qu ...
- filter-mutate过滤插件
之前的nginx日志使用grok匹配,但是后来发现nginx的日志中每个值之间都使用了分隔符"|",这下就可以使用mutate来分隔出每个字段的含义,同时还减少了运算. 描述 mu ...
- golang面向对象实现
面向对象编程三大特点:封装.继承.多态. 1. 构造函数 Go不支持构造器.如果某类型的零值不可用,需要提供NewT(parameters)函数,用来初始化T类型的变量.按照Go的惯例,应该把创建T类 ...
- 【HCIA Gauss】学习汇总-数据库管理(SQL语法 数据类型 函数)-4
DDL data definition language 数据库定义语言 定义修改等DML data manipulation language 数据库操控语言 增删改 DCL data crontr ...
- Linux操作系统的进程管理和作业管理
Linux操作系统的进程管理和信号 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.lsof命令详解 1>.lsof概述 list open files查看当前系统文件的工 ...
- 一些替代Xshell的软件推荐
FinalShell: 面附上一些截图和官方连接: 官网:http://www.hostbuf.com/ FinalShell是一体化的的服务器,网络管理软件,不仅是ssh客户端,还是功能强大的开发, ...