在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文件中修改内容:将root用户名改成自己的用户名,比如我这里的用户名是fei,将其都替换为fei如下图所示:
修改完记得保存, 注意,如果是运行在三台虚拟机组成的集群上,还需要将core-site.xml分发到每一台服务器上,之后,重新启动hadoop,接着启动mysql,metastore,hiveserver2和beeline
到达绿框处成功!
文章来源地址https://www.toymoban.com/news/detail-505800.html文章来源:https://www.toymoban.com/news/detail-505800.html
到了这里,关于Error: Could not open client transport with JDBC Uri: jdbc:hive2://hadoop102:10000: Failed to open..的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!