超级用户未经授权的连接:hcat“在尝试通过WebHCat查询Hive时

时间:2016-03-17 22:59:32

标签: hadoop hive bigdata

我正在尝试使用WebHCat / Templeton执行Hive查询。我将查询发送到/ templeton / v1 / hive,其中“execute”参数设置等于我的查询(现在简单的“select count(*)”查询)。

但是当我这样做时,我总是收回这个错误:

{"error":"Unauthorized connection for super-user: hcat from IP 172.31.27.207"}

从目前为止我能够找到的,似乎这些“超级用户未经授权的连接”错误通常与proxyuser设置有关,所以我将以下内容添加到我的core-site.xml:

 <property> 
   <name>hadoop.proxyuser.hcat.hosts</name> 
   <value>*</value> 
 </property> 

 <property> 
   <name>hadoop.proxyuser.hcat.groups</name> 
   <value>*</value> 
 </property>

不幸的是,这似乎没有任何帮助。添加此项并重新启动服务后,我仍然会收到相同的错误。

我还确认了此处引用的所有设置 - https://cwiki.apache.org/confluence/display/Hive/WebHCat+InstallWebHCat

的设置列在启用代理用户的部分中。

这是我在尝试查询时在webhcat日志中看到的内容:

WARN  | 17 Mar 2016 19:07:04,977 | org.apache.hive.hcatalog.templeton.Main | user.name is sent as form parameter which is deprecated as of Hive 0.13.  Should send it in the query string.
WARN  | 17 Mar 2016 19:07:04,977 | org.apache.hive.hcatalog.templeton.Main | user.name is sent as form parameter which is deprecated as of Hive 0.13.  Should send it in the query string.
WARN  | 17 Mar 2016 19:07:04,977 | org.apache.hive.hcatalog.templeton.Main | user.name is sent as form parameter which is deprecated as of Hive 0.13.  Should send it in the query string.
INFO  | 17 Mar 2016 19:07:05,064 | org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl | Timeline service address: http://ip-172-31-27-207.ec2.internal:8188/ws/v1/timeline/
INFO  | 17 Mar 2016 19:07:05,064 | org.apache.hadoop.yarn.client.RMProxy | Connecting to ResourceManager at ip-172-31-27-207.ec2.internal/172.31.27.207:8050
INFO  | 17 Mar 2016 19:07:05,229 | org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl | Timeline service address: http://ip-172-31-27-207.ec2.internal:8188/ws/v1/timeline/
INFO  | 17 Mar 2016 19:07:05,229 | org.apache.hadoop.yarn.client.RMProxy | Connecting to ResourceManager at ip-172-31-27-207.ec2.internal/172.31.27.207:8050
INFO  | 17 Mar 2016 19:07:05,305 | org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl | Timeline service address: http://ip-172-31-27-207.ec2.internal:8188/ws/v1/timeline/
INFO  | 17 Mar 2016 19:07:05,305 | org.apache.hadoop.yarn.client.RMProxy | Connecting to ResourceManager at ip-172-31-27-207.ec2.internal/172.31.27.207:8050
ERROR | 17 Mar 2016 19:07:05,315 | org.apache.hive.hcatalog.templeton.CatchallExceptionMapper | Unauthorized connection for super-user: hcat from IP 172.31.27.207

关于还有什么可能导致这种情况的任何想法,以及如何解决它?

2 个答案:

答案 0 :(得分:2)

好的,这已经解决了。这是发生了什么。我在Ambari工作以进行配置更改,这些设置位于“HDFS”部分下。进行更改后,Ambari会提示您重新启动受影响的服务,因此我选择这样做。不幸的是,事实证明,那只是重启HDFS!所以ResourceManager组件是YARN的一部分(用Ambari术语表示)没有重新启动。重新启动YARN服务后,它现在正常工作。

答案 1 :(得分:0)

我遇到同样的问题,但下一个指南解决了我:http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_ambari_views_guide/content/_setup_HDFS_proxy_user.html

您必须添加用于访问Ambari用户界面的用户,而不是抛出错误的用户。例如,在我的情况下,错误是下一个:Unauthorized connection for super-user: root from IP 172.16.8.172但我必须添加的用户是hadoop.proxyuser.admin.hosts