HDP集成Hue (2)

 

HDP集成Hue

 

2.9其他组件配置修改

l Hadoop配置

Custom hdfs-site添加如下两个配置:

hadoop.proxyuser.hue.groups=*
hadoop.proxyuser.hue.hosts=*

 

HDP集成Hue

 

同时开启webhdfs

 

HDP集成Hue

 

2.10启动Hue

Ambari界面启动Hue

 

2.11登录Hue

用户名、密码:hue

 

HDP集成Hue

 

2.12安装参考链接

https://github.com/EsharEditor/ambari-hue-service

 

3.整合问题 问题1:启动Hue失败,报编码问题UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 3462: ordinal not in range(128)

解决办法:在Hue安装节点上修改sudo.py

vim /usr/lib/python2.6/site-packages/resource_management/core/sudo.py

添加

import sys

reload(sys)

sys.setdefaultencoding('utf-8')

 

HDP集成Hue

参考链接:https://github.com/EsharEditor/ambari-hue-service/issues/19

 

问题2:Hue首页PREFERRED_STORAGE_ENGINE   We recommend MySQL InnoDB engine over MyISAM which does not support transactions.

解决办法:执行如下两个命令

mysql -u root -proot -e \

"SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' engine=InnoDB;') \

FROM information_schema.tables \

WHERE engine = 'MyISAM' AND table_schema = 'hue';" \

| grep "ALTER TABLE hue" > /tmp/set_engine_innodb.ddl

 

mysql -u root -proot < /tmp/set_engine_innodb.ddl

参考链接: https://www.cloudera.com/documentation/enterprise/5-8-x/topics/hue_trb_misconfig.html

 

问题3:不管Hue使用的执行引擎(Tez、Mapreduce)是什么,即使HiveServer2运行正常,但是在使用Hue时,第一次一切正常,但后面就会显示如下信息:HiveThe application won't work without a running HiveServer2.

hiveserver2.log日志文件输入如下错误信息:

  Thread-95]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doPost(145)) - Could not validate cookie sent, will try to generate a new cookie

2017-10-13 16:05:56,038 ERROR [HiveServer2-HttpHandler-Pool: Thread-95]: thrift.ThriftHttpServlet (ThriftHttpServlet.java:doPost(209)) - Error:

org.apache.hive.service.auth.HttpAuthenticationException: Authorization header received from the client is empty.

        at org.apache.hive.service.cli.thrift.ThriftHttpServlet.getAuthHeader(ThriftHttpServlet.java:548)

        at org.apache.hive.service.cli.thrift.ThriftHttpServlet.getAuthHeaderTokens(ThriftHttpServlet.java:529)

        at org.apache.hive.service.cli.thrift.ThriftHttpServlet.getUsername(ThriftHttpServlet.java:507)

        at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPasswdAuth(ThriftHttpServlet.java:355)

        at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPost(ThriftHttpServlet.java:164)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)

        at org.eclipse.jetty.server.Server.handle(Server.java:349)

        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)

        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:925)

        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)

        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)

        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)

        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)

        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zywwxf.html