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 進程號
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章