Hive无法启动的解决方案

关掉虚拟机后,重新启动后,按照Hadoop和Hive的流程重新启动,发现无法启动成功,特别是元数据服务无法启动,出现以下错误:

Exception in thread “main” java.lang.RuntimeException: java.net.ConnectException: Call From hadoop-master/192.168.19.137 to hadoop-master:9000 failed on connection exception: java.net.ConnectException: Connection refused;
Caused by: java.net.ConnectException: Call From hadoop-master/192.168.19.137 to hadoop-master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
at

重新启动Hadoop和Hive都是相同的错误,查看jps发现NameNode没有启动:

7235 RunJar
11235 NodeManager
10661 ResourceManager
10041 DataNode
10490 SecondaryNameNode
11387 Jps

需要删除core-site配置文件中hadoop.tmp.dir映射的文件目,一般在hadoop/tmp文件夹下。下面是解决步骤:

  1. 进入hadoop/sbin目录下,启动stop-all.sh停止所有服务

./stop-all.sh

  1. 删除core-site配置文件中hadoop.tmp.dir映射的文件目

rm -rf tmp

  1. 进入hadoop目录下,格式化NameNode

./bin/hdfs namenode -format

  1. 进入hadoop/sbin目录,重新启动

./start-all.sh

  1. 启动元数据服务

hive --service metastore&

  1. 启动hive

hive

你可能感兴趣的:(软件安装教程,大数据,hive,hadoop,数据仓库)