hadoop2.4.1 安装hue with Yarn模式

在安装Hadoop 2.4.1的过程中,配置Hue与Yarn模式时遇到了权限问题。错误提示用户zjj无法代理访问httfs服务。解决方案涉及调整hive和mysql的主机配置,特别是当mysql与hive不在同一台机器上时,需要在hue的hiveserver2配置和hive-site.xml中设置正确的hostname。确保跨机器通信的正确性以减轻单节点压力。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Here are some urls about HUE,以下是一些参考链接

http://cloudera.github.io/hue/docs-3.7.0/manual.html
https://github.com/cloudera/hue/tree/branch-3.7.1
https://raw.githubusercontent.com/cloudera/hue/branch-3.7.1/desktop/conf.dist/hue.ini
http://gethue.com/hadoop-tutorial-hive-query-editor-with-hiveserver2-and/
http://gethue.com/category/hive/
首先,check your OS (Ubuntu or CentOS);

Make sure ,different OS should install some different liblary;

$ git clone http://github.com/cloudera/hue.git
$ cd hue
$ make apps
$ /usr/local/hue-3.7.1/build/env/bin/supervisor &


错误0,查看metastore的时候错误:

StructuredThriftTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found (code THRIFTTRANSPORT): TTransportException('Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found',)

You could try NOSASL. I'm not entirely sure what state the hue 3.0 tarball is in... but NONE implies using the PLAIN kerberos plugin, which is missing from your list of installed cyrus sasl plugins. yum install cyrus-sasl-plain should do the trick I think.


在hive-site.xml中增加以下内容:
<property>
        <name>hive.server2.authentication</name>
        <value>NOSASL</value> <!-- 如果出现SLAS那就一定需要增加这个属性-->
</property>


错误一:

2015-03-31 14:54:59,081 INFO  [main]: service.AbstractService (AbstractService.java:start(104)) - Service:HiveServer2 is started.
2015-03-31 14:54:59,158 WARN  [Thread-6]: conf.HiveConf (HiveConf.java:initialize(1383)) - DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
2015-03-31 14:54:59,231 INFO  [Thread-6]: thrift.ThriftCLIService (ThriftBinaryCLIService.java:run(88)) - ThriftBinaryCLIService listening on /192.168.2.234:10001
2015-03-31 14:58:54,934 INFO  [pool-7-thread-2]: thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(188)) - Client protocol version: HIVE_CLI_SERVICE_PROTOCOL_V5
2015-03-31 14:58:54,949 WARN  [pool-7-thread-2]: thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(197)) - Error opening session:
org.apache.hive.service.cli.HiveSQLException: Failed to validate proxy privilage of hue for zjj
        at org.apache.hive.service.auth.HiveAuthFactory.verifyProxyAccess(HiveAuthFactory.java:326)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.getProxyUser(ThriftCLIService.java:588)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.getUserName(ThriftCLIService.java:244)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:258)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:191)
        at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1253)
        at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1238)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:55)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.security.authorize.AuthorizationException: User: hue is not allowed to impersonate zjj
        at org.apache.hadoop.security.authorize.ProxyUsers.authorize(ProxyUsers.java:143)
        at org.apache.hadoop.hive.shims.HadoopShimsSecure.authorizeProxyAccess(HadoopShimsSecure.java:525)
        at org.apache.hive.service.auth.HiveAuthFactory.verifyProxyAccess(HiveAuthFactory.java:322)
        ... 13 more
2015-03-31 15:03:18,263 INFO  [pool-7-thread-3]: thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(188)) - Client protocol version: HIVE_CLI_SERVICE_PROTOCOL_V5
2015-03-31 15:03:18,268 WARN  [pool-7-thread-3]: thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(197)) - Error opening session:
org.apache.hive.service.cli.HiveSQLException: Failed to validate proxy privilage of hue for zjj
        at org.apache.hive.service.auth.HiveAuthFactory.verifyProxyAccess(HiveAuthFactory.java:326)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.getProxyUser(ThriftCLIService.java:588)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.getUserName(ThriftCLIService.java:244)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:258)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:191)
        at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1253)
        at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1238)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:55)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.security.authorize.AuthorizationException: User: hue is not allowed to impersonate zjj
        at org.apache.hadoop.security.authorize.ProxyUsers.authorize(ProxyUsers.java:143)
        at org.apache.hadoop.hive.shims.HadoopShimsSecure.authorizeProxyAccess(HadoopShimsSecure.java:525)
        at org.apache.hive.service.auth.HiveAuthFactory.verifyProxyAccess(HiveAuthFactory.java:322)
        ... 13 more

zjj用户没有代理的权限去访问httfs服务;


在core-site.xml中增加以下内容:
/app/prog/hadoop/etc/hadoop/core-site.xml
  <property>
                <name>hadoop.proxyuser.httpfs.hosts</name>
                <value>*</value>
        </property>
        <property>
                <name>hadoop.proxyuser.httpfs.groups</name>
                <value>*</value>
        </property>
        <property>
                <name>hadoop.proxyuser.hue.hosts</name>
                <value>*</value>
        </property>
        <property>
                <name>hadoop.proxyuser.hue.groups</name>
                <value>*</value>
        </property>
</configuration>

/app/prog/hadoop/etc/hadoop/hdfs-site.xml 

  <property>
        <name>dfs.webhdfs.enabled</name>
        <value>true</value>
    </property>

错误二:
查看jobHistory的生活出现500错误:
在httpfs-site.xml中增加以下内容,并启动服务  hadoop/sbin/httpfs.sh start


/app/prog/hadoop-2.4.1/etc/hadoop/httpfs-site.xml

/app/prog/hadoop/sbin/httpfs.sh  start 启动httpfs服务 ,保证Job Browser正常运行。
<configuration>
        <property>
                <name>httpfs.proxyuser.hue.hosts</name>
                <value>*</value>
        </property>
        <property>
                <name>httpfs.proxyuser.hue.groups</name>
                <value>*</value>
        </property>
</configuration>

在hive-site.xml 里面增加:
<!-- this property "hive.metastore.local" never supported since hive 0.10-->
<property>
  <name>hive.metastore.local</name>
  <value>false</value>
</property>
<property>
        <name>hive.server2.thrift.bind.host</name>
        <value>192.168.2.234</value>
</property>
<property>
  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值