首页 > 解决方案 > 启动时显示 hiveserver2 错误

问题描述

我无法启动 hiveserver2,当我启动时,它没有显示任何响应。如图所示

hive --service hiveserver2
which: no hbase in (/opt/hadoop/hive/apache-hive-2.3.4-bin/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/java/default/bin:/opt/hadoop/sbin:/opt/hadoop/bin)

2019-01-09 07:20:24:启动 HiveServer2

我也试过用另一个命令

hive --service hiveserver2 --hiveconf hive.server2.thrift.port=10000 --hiveconf hive.root.logger=INFO,console
ERROR [main] metastore.ObjectStore: Version information found in metastore differs 2.0.0 from expected schema version 2.3.0. Schema verififcation is disabled hive.metastore.schema.verification

标签: hive

解决方案


您最近是否执行过升级?Hive 根据您的错误期待架构版本 2.3.0。您应该使用 Hive Schema 工具来升级架构版本。

  • 停止蜂巢服务
  • 备份您的配置单元后端数据库
  • 使用 schematool 升级 Metastore。例如 postgres(可能的后端是 derby|mysql|postgres|oracle|mssql);

    /bin/schematool -dbType postgres -info

    /bin/schematool -dbType postgres -upgradeSchemaFrom -upgradeSchemaFrom 2.0.0 -dryRun

    /bin/schematool -dbType postgres -upgradeSchemaFrom -upgradeSchemaFrom 2.0.0

  • 启动配置单元服务器

有关此过程的更多示例和信息记录在: https ://cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool


推荐阅读