hive2中使用beeline:Required field 'serverProtocolVersion' is unset!

xiaoxiao2021-02-28  30

hive2中使用beeline:

beeline -u jdbc:hive2://localhost:10000

启动报如下错误:Required field 'serverProtocolVersion' is unset!User: hadoop is not allowed to impersonate anonymous 

解决方法:

hadoop的core-site.xml中添加如下配置:

<!--  

Required field 'serverProtocolVersion' is unset! User: hadoop is not allowed to impersonate anonymous  --> <property>       <name>hadoop.proxyuser.hadoop.groups</name>       <value>hadoop</value>       <description>Allow the superuser oozie to impersonate any members of the group group1 and group2</description>  </property>    <property>       <name>hadoop.proxyuser.hadoop.hosts</name>       <value>192.168.127.200,127.0.0.1,localhost</value>       <description>The superuser can connect only from host1 and host2 to impersonate a user</description>   </property>

然后使用如下命令启动:

beeline -u jdbc:hive2://localhost:10000 -n hadoop -p hadoop

转载请注明原文地址: https://www.6miu.com/read-250305.html

最新回复(0)