Hive安装过程遇到的问题

问题一:

$ hive

Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-1.2.1.jar!/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
......

可能原因1:

因为没有正常启动Hive 的 Metastore Server服务进程。

解决方法:

启动Hive 的 Metastore Server服务进程,执行如下命令:

hive --service metastore &

可能原因2:

设置ConnectionURL错误

        <value>jdbc:mysql://localhost:3306/hive;createDatabaseIfNotExist=true</value>

解决方法:

将上面;修改成?即可。

        <name>javax.jdo.option.ConnectionURL</name>
        <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>

问题二:

$ hive --service metastore &
[5] 17493
hadoop@ubuntu:/usr/local/hive/conf$ Starting Hive Metastore Server
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:9083.
......

解决方法:

metastore重复启动,kill后重新启动即可解决。

# 查看启动metastore的进程号
$ ps -aux | grep 'metastore'
# 杀死相关进程
$ kill -9 进程号

猜你喜欢

转载自blog.csdn.net/namelessml/article/details/52688955
今日推荐