hive创建表时报错:failed on connection exception: java.net.ConnectException: Connection refused
hive创建表时报错
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: java.net.ConnectException Call From spark1/192.168.56.109 to spark1:9000 failed on connection exception: java.net.ConnectException: Connection refused;)
报错如下图:
报错原因:
没有启动namenode
解决方法:
1. 首先停止dfs
Linux命令: stop-dfs.sh
可以看到停止的过程中显示没有namenode可停止, 看下图第三行:
2. 格式化namenode
Linux命令: hdfs namenode -format
3. 启动hdfs集群
Linux命令:start-dfs.sh
4. 启动yarn
Linux命令:start-yarn.sh
5. hive创建表
6. 问题解决