-
背景
當配置了hive中繼資料通路後,啟動中繼資料服務
hive --service metastore
,再開視窗使用hive報錯:
FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
-
分析
檢視hive背景日志 :
tail -f /tmp/nuochengze/hive.log
,發現報錯細節:
Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
-
解決措施
方式一:初始化中繼資料庫
schematool -initSchema -dbType mysql -verbose
注意:需要删除原來的中繼資料庫,
方式二:檢視hive.metastore.uris的value值是否比對,否則就修改$HIVE_HOME/conf/hive-site.xml檔案中的hive.metastore.uris值