liangsw  

HIVE问题:

10:39:55.200 [main] ERROR org.sw.hive.utils.HiveJdbcUtils - URL [jdbc:hive2://192.168.199.10:10001/default] has error, message is Could not open client transport with JDBC Uri: jdbc:hive2://192.168.199.10:10001/default: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate anonymous

10:39:55.200 [main] ERROR org.sw.hive.utils.HiveJdbcUtils - URL [jdbc:hive2://192.168.199.10:10001/default] has error, message is Could not open client transport with JDBC Uri: jdbc:hive2://192.168.199.10:10001/default: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate anonymous

 

解决方法:

首先需要开启rest接口,在hdfs-site.xml文件中加入:

<property>
  <name>dfs.webhdfs.enabled</name>  
  <value>true</value>  
</property>    

然后在core-site.xml文件中加入:

<property>
  <name>hadoop.proxyuser.root.hosts</name>
  <value>*</value>
</property>

<property>
  <name>hadoop.proxyuser.root.groups</name>
  <value>*</value>
</property>

 

posted on 2019-06-18 12:05  liangsw  阅读(54)  评论(0编辑  收藏  举报