报错:Error: Could not open client transport with JDBC Uri: jdbc:hive2://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: atguigu is not allowed to impersonate atguigu (state=08S01,code=0)

解决方案:

xxx是你使用的用户名字,“*”表示可通过超级代理“xxx”操作hadoop的用户、用户组和主机。

步骤:

1. 在hadoop中/etc/hadoop/core-site.xml(这是我的路径:/opt/module/hadoop-3.1.3/etc/hadoop/core-site.xml)增加如下配置

2. 用xsync命令分发core-site.xml

3.把metastore和hiveserver2停了,然后关闭再开启hadoop集群

4.开启metastore和hiveserver2,继续报错前的操作


    hadoop.proxyuser.xxx.hosts
    *


    hadoop.proxyuser.xxx.groups
    *

如果开启metastore报端口被占用的错误,可能是因为重复开启服务,使用jps命令,查看进程,把除hadoop集群正常启动的进程和Jps,其他都kill

[atguigu@Hadoop102 hadoop-3.1.3]$ jps
24064 NodeManager
24883 Jps
21942 RunJar
23703 DataNode
24471 RunJar
21336 RunJar
20313 RunJar
18970 RunJar
23582 NameNode
24639 RunJar
[atguigu@Hadoop102 hadoop-3.1.3]$ kill -9 24471
[atguigu@Hadoop102 hadoop-3.1.3]$ kill -9 21336
[atguigu@Hadoop102 hadoop-3.1.3]$ kill -9 20313
[atguigu@Hadoop102 hadoop-3.1.3]$ kill -9 18970
[atguigu@Hadoop102 hadoop-3.1.3]$ kill -9 24639
[atguigu@Hadoop102 hadoop-3.1.3]$ jps
24064 NodeManager
21942 RunJar
23703 DataNode
24906 Jps
23582 NameNode
 

参考:https://blog.csdn.net/u011495642/article/details/84305944

你可能感兴趣的:(Hive,hadoop,hdfs,java)