HiveMetaStore: Not authorized to make the get_current_notificationEventId call.

最近遇到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)。所以添加上面代理配置

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值