hiveserver2启动成功但无法通过beeline连接 | 您所在的位置:网站首页 › picACG哔咔网页版七游 › hiveserver2启动成功但无法通过beeline连接 |
可能是配置的问题。 我将hive.metastore.uris从配置文件中注释掉之后解决了hiveserver2启动成功但无法通过beeline连接的问题。 [root@node03 conf]# vi hive-site.xml hive.metastore.warehouse.dir /user/hive_remote/warehouse javax.jdo.option.ConnectionURL jdbc:mysql://node01/hive_remote?createDatabaseIfNotExist=true javax.jdo.option.ConnectionDriverName com.mysql.jdbc.Driver javax.jdo.option.ConnectionUserName root javax.jdo.option.ConnectionPassword 123 hive.server2.thrift.port 10000 hive.server2.thrift.bind.host node03--------------------------------------------------------- 问题过程: 我创建了4台centos虚拟机,node03做hive的mestore和hiveserver2节点,node04做hive客户端。 在node使用hiveserver2命令之后,在hive04使用beeline连接时出现无法连接的问题: [root@node04 conf]# beeline -u jdbc:hive2://node03:10000/default -n root Connecting to jdbc:hive2://node03:10000/default Error: Could not open client transport with JDBC Uri: jdbc:hive2://node03:10000/default: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0) Beeline version 1.2.2 by Apache Hive 0: jdbc:hive2://node03:10000/default (closed)>首先想到去查看10000端口的状态: 发现10000端口已经启用了,这就很奇怪了。 想了一会儿,尝试把metastore也启动起来看看,启动metastore之后发现node04居然可以连接了! 自己对hive-site.xml配置也不是很熟悉,但是之前搭建hive的时候确实遇到过hiverserver2无法启动的问题,当时好像删掉了什么东西。 既然metastore的配置和hiveserver2的配置有关联(?),那就去掉一个试试。 于是把node03中hive-site.xml里的metastore的配置去掉(其实hive服务端好像也没必要配置metastore uri,只要客户端知道在哪不就行了吗),重新启动hiveserver2,在node04再次用beeline连接,竟然可以了???
|
CopyRight 2018-2019 实验室设备网 版权所有 |