启动hive server2服务之后使用beeline链接报一下错误
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增加了权限控制,需要在hadoop的配置文件中配置
解决方法:
在hadoop的core-site.xml配置文件中添加一下配置内容
<property>
<name>hadoop.proxyuser.hadoop.hosts</name>
<value></value>
</property>
<property>
<name>hadoop.proxyuser.hadoop.groups</name>
<value></value>
</property>
之后重启hadoop即可
官网说明链接:
https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Superusers.html
来自官方的截图
登录测试:
可见登录成功
测试已存在的库
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。