hive使用報錯解決方法

z597011036發表於2019-03-18

1.使用hiveserver2報錯

beeline> !connect jdbc:hive2://node1:10000/tong

Connecting to jdbc:hive2://node1:10000/tong

Enter username for jdbc:hive2://node1:10000/tong: hive       --mysql使用者名稱

Enter password for jdbc:hive2://node1:10000/tong: ******     --mysql密碼

19/03/18 20:07:07 [main]: WARN jdbc.HiveConnection: Failed to connect to node1:10000

Error: Could not open client transport with JDBC Uri: jdbc:hive2://node1:10000/tong: 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 hive (state=08S01,code=0)


解決方法:

[root@node1 conf]# vim /opt/hadoop-2.8.5/etc/hadoop/core-site.xml    

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

[root@node1 conf]# stop-dfs.sh 

[root@node1 conf]#  start-dfs.sh 


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25854343/viewspace-2638705/,如需轉載,請註明出處,否則將追究法律責任。

相關文章