赞
踩
最近遇到hiveserver2启动不起来的一个异常,因为详细异常信息没保存,所以这里简单记录分享一下原因和解决办法。
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
因为hive-site.xml添加了如下配置,开启了hive事务
<property>
<name>hive.txn.manager</name>
<value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
</property>
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)。所以添加上面代理配置
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。