当前位置:   article > 正文

HiveMetaStore: Not authorized to make the get_current_notificationEventId call._hive.metastore.event.db.notification.api.auth

hive.metastore.event.db.notification.api.auth

最近遇到hiveserver2启动不起来的一个异常,因为详细异常信息没保存,所以这里简单记录分享一下原因和解决办法。

1、异常信息

HiveMetaStore: Not authorized to make the get_current_notificationEventId call.You can try to disable metastore.metastore.event.db.notification.api.auth
MetaException: User work is not allowed to perform this API call.

.............

org.apache.thrift.transport.TTransportException: Cannot write to null outputStream
java.lang.RuntimeException: Error initializing notification event poll
Caused by: java.io.IOException: org.apache.thrift.TApplicationException: Internal error processing get_current_notificationEventId

2、原因

因为hive-site.xml添加了如下配置,开启了hive事务

<property>
    <name>hive.txn.manager</name>
    <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
</property>

3、解决方式(两步)

1)修改hive-site.xml配置文件

<property>
    <name>hive.metastore.event.db.notification.api.auth</name>
    <value>false</value>
</property> 

<property>
    <name>hive.server2.active.passive.ha.enable</name>
    <value>true</value>
</property>

首先根据异常的提示添加了hive.metastore.event.db.notification.api.auth配置,该配置跟元数据授权有关,启动时又报错NoClassDefFoundError:/org/apache/tez/dag/api/SessionNotRunning,于是又加了hive.server2.active.passive.ha.enable配置,至于为什么这么配置不大清楚,主要是参考了大家的解决方案。

2)修改hadoop的core-site.xml 配置用户代理

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

因为我访问用的work用户,该用户查询时报错User: work is not allowed to impersonate work (state=08S01,code=0)。所以添加上面代理配置

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/429533
推荐阅读
相关标签
  

闽ICP备14008679号