目录
一、错误现象
二、?解决方案
三、其他解决方式
背景:ranger 整合cdh后登陆HiveServer2测试
一、错误现象
后台日志
Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop105:10000: Failed to open new session: java.lang.IllegalArgumentException: Cannot modify hive.query.redaction.rules at runtime. It? is not in list of params that are allowed to be modified at runtime (state=08S01,code=0)
?HiveServer2日志
[HiveServer2-Handler-Pool: Thread-55]: Error opening session:
org.apache.hive.service.cli.HiveSQLException: Failed to open new session: java.lang.IllegalArgumentException: Cannot modify hive.query.redaction.rules at runtime. It is not in list of params that are allowed to be modified at runtime
at org.apache.hive.service.cli.session.SessionManager.createSession(SessionManager.java:420) ~[hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
二、?解决方案
修改/opt/cloudera/parcels/CDH/lib/hive/conf/ 目录下的hive 环境变量文件hive-env.sh ,注释export HIVE_OPTS 配置(集群所有机器都要修改)
vim /opt/cloudera/parcels/CDH/lib/hive/conf/hive-env.sh
不需要重启
beeline -u jdbc:hive2://hadoop105:10000/test -n test?
成功登陆
三、其他解决方式
在?hadoop ?文件?core-site.xml ?中配置信息如下,重启Hadoop,再次启动?hiveserver2 ?和?beeline ?即可
把下面的root替换成自己的用户名
?? ?<property>
?? ??? ?<name>hadoop.proxyuser.root.hosts</name>
?? ??? ?<value>*</value>
?? ?</property>
?? ?<property>
?? ??? ?<name>hadoop.proxyuser.root.groups</name>
?? ??? ?<value>*</value>
?? ?</property>
|