beeline连接hive2的时候报错,报错信息为Error: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.81.131:10000: java.net.ConnectException: 拒绝连接 (Connection refused) (state=08S01,code=0)
google搜了很久试了很多方法都不行,后来在log里找到好像是metastore的缘故,错误原因是metastore没有启动。
解决方法:在命令行输入"hive --service metastore &"启动metastore,然后再在beeline连接hive2就行了。