在hive目錄下使用beeline命令:
bin/beeline -u jdbc:hive2://hadoop102:10000 -n fei
?具體的報錯信息如下所示:
22/04/10 01:13:24 [main]: WARN jdbc.HiveConnection: Failed to connect to hadoop102:10000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop102:10000: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: fei is not allowed to impersonate fei (state=08S01,code=0)
?
解決辦法:在hadoop的core-site.xml文件中修改內(nèi)容:將root用戶名改成自己的用戶名,比如我這里的用戶名是fei,將其都替換為fei如下圖所示:
修改完記得保存,?注意,如果是運行在三臺虛擬機組成的集群上,還需要將core-site.xml分發(fā)到每一臺服務(wù)器上,之后,重新啟動hadoop,接著啟動mysql,metastore,hiveserver2和beeline
?到達(dá)綠框處成功!
?文章來源地址http://www.zghlxwxcb.cn/news/detail-505800.html文章來源:http://www.zghlxwxcb.cn/news/detail-505800.html
?
到了這里,關(guān)于Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop102:10000: Failed to open..的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!