AWS上的HUE:Hive编辑器需要HiveServer2 - 创建表sample_07

时间:2016-01-28 14:05:03

标签: hadoop amazon-web-services hive cloudera hue

我使用Quickstart和cloudera-director可执行文件在AWS上部署了Cloudera EDH群集。我按照这里的说明操作: http://docs.aws.amazon.com/quickstart/latest/cloudera/welcome.html 我使用了Cloudera启动器附带的aws.reference.conf文件。在部署期间一切正常,但我遇到了HUE / Hive编辑器的问题。当我转到HUE UI时,我会看到下面的屏幕:

enter image description here

当我尝试打开Hive编辑器时,我得到了:

enter image description here

在我看来,问题的根源可能在这里:

InvalidConfigurationException hive.server2.authentication can't be none in non-testing mode 

在AWS CloudFormation启动期间,节点使用自动生成的密钥对文件相互连接,因此没有为ssh配置密码。

我登录到运行hive的节点,看了一下hive日志文件,说:

ERROR org.apache.hadoop.hdfs.KeyProviderCache: [pool-6-thread-2]: Could not find uri with key [dfs.encryption.key.provider.uri] to create a keyProvider !!

和色调日志文件说:

    [28/Jan/2016 17:22:02 -0800] models       ERROR    error syncing beeswax
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/core/src/desktop/models.py", line 297, in sync
    for job in find_jobs_with_no_doc(SavedQuery):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/query.py", line 96, in __iter__
    self._fetch_all()
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/query.py", line 857, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/sql/compiler.py", line 713, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/sqlite3/base.py", line 452, in execute
    return Database.Cursor.execute(self, query, params)
OperationalError: no such column: beeswax_savedquery.is_redacted
[28/Jan/2016 17:22:02 -0800] models       ERROR    error syncing search
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/core/src/desktop/models.py", line 315, in sync
    from search.models import Collection
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/search/src/search/models.py", line 34, in <module>
    from libsolr.api import SolrApi
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/libs/libsolr/src/libsolr/api.py", line 46, in <module>
    class SolrApi(object):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/libs/libsolr/src/libsolr/api.py", line 50, in SolrApi
    def __init__(self, solr_url, user, security_enabled=SECURITY_ENABLED.get()):
AttributeError: 'Config' object has no attribute 'get'
[28/Jan/2016 17:33:52 -0800] views        ERROR    Error in config validation by liboozie: <html><head><title>Apache Tomcat/6.0.44 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:w
hite;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#
525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sa
ns-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</
b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.Uns
upportedOperationException
        org.apache.oozie.util.MetricsInstrumentation.getVariables(MetricsInstrumentation.java:333)
        org.apache.oozie.servlet.BaseAdminServlet.instrToJson(BaseAdminServlet.java:339)
        org.apache.oozie.servlet.BaseAdminServlet.sendInstrumentationResponse(BaseAdminServlet.java:396)
        org.apache.oozie.servlet.BaseAdminServlet.doGet(BaseAdminServlet.java:127)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        org.apache.oozie.servlet.JsonRestServlet.service(JsonRestServlet.java:289)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        org.apache.oozie.servlet.AuthFilter$2.doFilter(AuthFilter.java:171)
        org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:589)
        org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:552)
        org.apache.oozie.servlet.AuthFilter.doFilter(AuthFilter.java:176)
        org.apache.oozie.servlet.HostnameFilter.doFilter(HostnameFilter.java:86)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/6.0.44 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.44</h3></body></html> (error 500)
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/core/src/desktop/views.py", line 445, in _get_config_errors
    for confvar, error in validator(request.user):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/libs/liboozie/src/liboozie/conf.py", line 86, in config_validator
    intrumentation = api.get_instrumentation()
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/libs/liboozie/src/liboozie/oozie_api.py", line 304, in get_instrumentation
    resp = self._root.get('admin/instrumentation', params)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/core/src/desktop/lib/rest/resource.py", line 97, in get
    return self.invoke("GET", relpath, params, headers=headers, allow_redirects=True)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/core/src/desktop/lib/rest/resource.py", line 78, in invoke
    urlencode=self._urlencode)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/desktop/core/src/desktop/lib/rest/http_client.py", line 161, in execute
    raise self._exc_class(ex)
RestException: <html><head><title>Apache Tomcat/6.0.44 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.UnsupportedOperationException
        org.apache.oozie.util.MetricsInstrumentation.getVariables(MetricsInstrumentation.java:333)
        org.apache.oozie.servlet.BaseAdminServlet.instrToJson(BaseAdminServlet.java:339)
        org.apache.oozie.servlet.BaseAdminServlet.sendInstrumentationResponse(BaseAdminServlet.java:396)
        org.apache.oozie.servlet.BaseAdminServlet.doGet(BaseAdminServlet.java:127)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        org.apache.oozie.servlet.JsonRestServlet.service(JsonRestServlet.java:289)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        org.apache.oozie.servlet.AuthFilter$2.doFilter(AuthFilter.java:171)
        org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:589)
        org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:552)
        org.apache.oozie.servlet.AuthFilter.doFilter(AuthFilter.java:176)
        org.apache.oozie.servlet.HostnameFilter.doFilter(HostnameFilter.java:86)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/6.0.44 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.44</h3></body></html> (error 500)
[28/Jan/2016 17:33:53 -0800] conf         ERROR    The application won't work without a running HiveServer2.
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/beeswax/src/beeswax/conf.py", line 185, in config_validator
    server.get_databases()
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/beeswax/src/beeswax/server/dbms.py", line 151, in get_databases
    handle = self.execute_and_wait(query, timeout_sec=timeout)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/beeswax/src/beeswax/server/dbms.py", line 548, in execute_and_wait
    handle = self.client.query(query)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 923, in query
    return self._client.execute_async_query(query, statement)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 703, in execute_async_query
    return self.execute_async_statement(statement=query_statement, confOverlay=configuration)
 File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 721, in execute_async_statement
    res = self.call(self._client.ExecuteStatement, req)
  File "/opt/cloudera/parcels/CDH-5.5.1-1.cdh5.5.1.p0.11/lib/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 597, in call
    raise QueryServerException(Exception('Bad status for request %s:\n%s' % (req, res)), message=message)
QueryServerException: Bad status for request TExecuteStatementReq(confOverlay={}, sessionHandle=TSessionHandle(sessionId=THandleIdentifier(secret='r\x94N\xc0\xac\x99D\xd9\xad\xe1\xb7\x15?N\xd4B', guid='o\x1c\xe77\x06\x7fJ\x19\xaa\xd9N\xf0.\xcd[\xc2')), runAsync=True, statement="SHOW DATABASES LIKE '*'"):
TExecuteStatementResp(status=TStatus(errorCode=40000, errorMessage="Error while compiling statement: FAILED: InvalidConfigurationException hive.server2.authentication can't be none in non-testing mode", sqlState='42000', infoMessages=["*org.apache.hive.service.cli.HiveSQLException:Error while compiling statement: FAILED: InvalidConfigurationException hive.server2.authentication can't be none in non-testing mode:17:16", 'org.apache.hive.service.cli.operation.Operation:toSQLException:Operation.java:326', 'org.apache.hive.service.cli.operation.SQLOperation:prepare:SQLOperation.java:102', 'org.apache.hive.service.cli.operation.SQLOperation:runInternal:SQLOperation.java:171', 'org.apache.hive.service.cli.operation.Operation:run:Operation.java:268', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementInternal:HiveSessionImpl.java:410', 'org.apache.hive.service.cli.session.HiveSessionImpl:executeStatementAsync:HiveSessionImpl.java:397', 'org.apache.hive.service.cli.CLIService:executeStatementAsync:CLIService.java:258', 'org.apache.hive.service.cli.thrift.ThriftCLIService:ExecuteStatement:ThriftCLIService.java:509', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1313', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement:getResult:TCLIService.java:1298', 'org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39', 'org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39', 'org.apache.hive.service.auth.TSetIpAddressProcessor:process:TSetIpAddressProcessor.java:56', 'org.apache.thrift.server.TThreadPoolServer$WorkerProcess:run:TThreadPoolServer.java:285', 'java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1145', 'java.util.concurrent.ThreadPoolExecutor$Worker:run:ThreadPoolExecutor.java:615', 'java.lang.Thread:run:Thread.java:745', "*org.apache.sentry.binding.hive.conf.InvalidConfigurationException:hive.server2.authentication can't be none in non-testing mode:32:16", 'org.apache.sentry.binding.hive.authz.HiveAuthzBinding:validateHiveServer2Config:HiveAuthzBinding.java:167', 'org.apache.sentry.binding.hive.authz.HiveAuthzBinding:validateHiveConfig:HiveAuthzBinding.java:135', 'org.apache.sentry.binding.hive.authz.HiveAuthzBinding:<init>:HiveAuthzBinding.java:83', 'org.apache.sentry.binding.hive.authz.HiveAuthzBinding:<init>:HiveAuthzBinding.java:79', 'org.apache.sentry.binding.hive.HiveAuthzBindingHook:<init>:HiveAuthzBindingHook.java:109', 'sun.reflect.NativeConstructorAccessorImpl:newInstance0:NativeConstructorAccessorImpl.java:-2', 'sun.reflect.NativeConstructorAccessorImpl:newInstance:NativeConstructorAccessorImpl.java:57', 'sun.reflect.DelegatingConstructorAccessorImpl:newInstance:DelegatingConstructorAccessorImpl.java:45', 'java.lang.reflect.Constructor:newInstance:Constructor.java:526', 'java.lang.Class:newInstance:Class.java:374', 'org.apache.hadoop.hive.ql.hooks.HookUtils:getHooks:HookUtils.java:60', 'org.apache.hadoop.hive.ql.Driver:getHooks:Driver.java:1294', 'org.apache.hadoop.hive.ql.Driver:compile:Driver.java:407', 'org.apache.hadoop.hive.ql.Driver:compile:Driver.java:305', 'org.apache.hadoop.hive.ql.Driver:compileInternal:Driver.java:1110', 'org.apache.hadoop.hive.ql.Driver:compileAndRespond:Driver.java:1104', 'org.apache.hive.service.cli.operation.SQLOperation:prepare:SQLOperation.java:100'], statusCode=3), operationHandle=None)

哨兵日志文件显示没有错误。我还检查了网络ui和HiveServer2正在运行。

1 个答案:

答案 0 :(得分:0)

这个Hive错误是关于没有设置&#39; hive.server2.authentication&#39; https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-Authentication/SecurityConfiguration,但这可能与您的AWS安全设置有关,因为默认情况下应该无效。

Hue中的其他错误可以忽略,这些是更多警告,因为某些应用程序(如搜索应用程序)已被禁用。