!connect jdbc:hive2://localhost:10000 Connecting to jdbc:hive2://localhost:10000Enter usern..."/>
您好,登錄后才能下訂單哦!
啟動(dòng)hive server2服務(wù)之后使用beeline鏈接報(bào)一下錯(cuò)誤
beeline> !connect jdbc:hive2://localhost:10000
Connecting to jdbc:hive2://localhost:10000
Enter username for jdbc:hive2://localhost:10000: hadoop
Enter password for jdbc:hive2://localhost:10000: **
19/03/01 22:01:59 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: hadoop is not allowed to impersonate hadoop (state=08S01,code=0)
問題定位:
原因:hiveserver2增加了權(quán)限控制,需要在hadoop的配置文件中配置
解決方法:
在hadoop的core-site.xml配置文件中添加一下配置內(nèi)容
<property>
<name>hadoop.proxyuser.hadoop.hosts</name>
<value></value>
</property>
<property>
<name>hadoop.proxyuser.hadoop.groups</name>
<value></value>
</property>
之后重啟hadoop即可
官網(wǎng)說明鏈接:
https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Superusers.html
來自官方的截圖
登錄測試:
可見登錄成功
測試已存在的庫
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。