Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.ap

晏富
2023-12-01

这是hive想使用hiveserver2的服务时报错信息(首先要开启元数据服务,再开启hiveserver2服务,然后bin/beeline -u jdbc:hive2://hadoop102:10000 -n ding报错信息如下)

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: ding is not allowed to impersonate ding (state=08S01,code=0)

解决办法:

在hadoop的core-site.xml文件中添加如下信息

<property>
    <name>hadoop.proxyuser.ding.hosts</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.ding.groups</name>
    <value>*</value>
</property>

然后重启Hadoop集群

注意!hadoop.proxyuser.ding.hosts这里的ding是根据自己的报错信息User: ding is not allowed to impersonate ding对应的

 类似资料: