大叔问题定位分享(31)hive metastore报错
hive metastore在建表时报错
[pool-5-thread-2]: MetaException(message:Got exception: java.net.ConnectException Call From server2 to server1:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused)
其中server1:8020是namenode,但是正常的namenode是server2:8020,为什么会连接一个不存在的namenode?
检查cdh hive的启动过程中使用的conf目录:
using /opt/cloudera/parcels/CDH-5.16.1-1.cdh5.16.1.p0.3/lib/hive as HIVE_HOME
using /opt/cloudera-manager/cm-5.16.1/run/cloudera-scm-agent/process/245-hive-HIVEMETASTORE as HIVE_CONF_DIR
using /opt/cloudera/parcels/CDH-5.16.1-1.cdh5.16.1.p0.3/lib/hadoop as HADOOP_HOME
using /opt/cloudera-manager/cm-5.16.1/run/cloudera-scm-agent/process/245-hive-HIVEMETASTORE/yarn-conf as HADOOP_CONF_DIR
这些目录中都是正常的namenode配置,忽然想到数据库中会保存hdfs路径,
mysql> select db_location_uri from DBS;
果然是这里存储的hdfs路径有问题,修改之后正常;
---------------------------------------------------------------- 结束啦,我是大魔王先生的分割线 :) ----------------------------------------------------------------
- 由于大魔王先生能力有限,文中可能存在错误,欢迎指正、补充!
- 感谢您的阅读,如果文章对您有用,那么请为大魔王先生轻轻点个赞,ありがとう