在CDH中,安装完Hive,开始可能是好的,但是过一下就会遇到如题所示的错误,具体如下:

在日志中,报错如下:
文件:hadoop-cmf-hive-HIVEMETASTORE-cdh1.log.out

Hive配置MySQL Connector驱动:

然后CM里面重启服务:

日志:

可以看到,这时候就没有报错了。
————————————————————————
Done。

3 thoughts on “CDH 5.13,HIVE:不良 : Hive Metastore canary 创建数据库失败。”

  1. 之前是因为一直以为hive的mysql驱动是在【/var/lib/hive/】这里配置的,所以,才会导致上面出错,因为事实上报错时,是没有或者走的是默认的MySQL驱动,版本比较老,当然有的语法就不支持,然后就报错了。

  2. 不过前期就算没有按照本文的方式部署MySQL的驱动,CM也会用默认的驱动去连接指向的MySQL服务,创建53张数据表,… 后面有问题,无非是因为MySQL的版本较低而已,并非是不能用。

  3. 我在本地使用CM(5.13.0)的虚拟机,在配置sentry授权后,也出现了同样的错误提示,但参照你的方案没有成功。查看了hive-metastore的日志,发现了如下的内容:

    2019-11-08 15:57:08,435 INFO org.apache.hadoop.hive.metastore.HiveMetaStore: [pool-5-thread-3]: 3: create_database: Database(name:cloudera_manager_metastore_canary_test_db_hive_HIVEMETASTORE, description:Cloudera Manager Metastore Canary Test Database, locationUri:/user/hue/.cloudera_manager_hive_metastore_canary/hive_HIVEMETASTORE, parameters:null)
    2019-11-08 15:57:08,435 INFO org.apache.hadoop.hive.metastore.HiveMetaStore.audit: [pool-5-thread-3]: ugi=hue/quickstart.cloudera@CLOUDERA ip=/192.168.56.104 cmd=create_database: Database(name:cloudera_manager_metastore_canary_test_db_hive_HIVEMETASTORE, description:Cloudera Manager Metastore Canary Test Database, locationUri:/user/hue/.cloudera_manager_hive_metastore_canary/hive_HIVEMETASTORE, parameters:null)
    2019-11-08 15:57:08,437 WARN org.apache.hadoop.hive.metastore.ObjectStore: [pool-5-thread-3]: Failed to get database cloudera_manager_metastore_canary_test_db_hive_HIVEMETASTORE, returning NoSuchObjectException
    2019-11-08 15:57:08,441 ERROR org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-5-thread-3]: MetaException(message:null)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.firePreEvent(HiveMetaStore.java:2136)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_database_core(HiveMetaStore.java:932)
    at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_database(HiveMetaStore.java:993)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:140)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:99)
    at com.sun.proxy.$Proxy10.create_database(Unknown Source)
    at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_database.getResult(ThriftHiveMetastore.java:9570)
    at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$create_database.getResult(ThriftHiveMetastore.java:9554)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
    at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge.java:736)
    at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1917)
    at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:731)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
    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)

    不知道你有没好的建议,谢谢。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装