当我使用 beeline 连接到 hiveserver2 时,错误消息是这样的。 我之前已经连接到hiveserver2。 我连接到 hiveserver2 几次后会显示此错误。 我可以使用 jdbc:hive2://
进行连接beeline> !connect jdbc:hive2://master:10000
SLF4J:类路径包含多个 SLF4J 绑定。 SLF4J:在 [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] 中找到绑定 SLF4J:在 [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] 中找到绑定 SLF4J:请参阅 http://www.slf4j.org/codes.html#multiple_bindings 了解说明。 SLF4J:实际绑定的类型为 [org.apache.logging.slf4j.Log4jLoggerFactory] 连接到 jdbc:hive2://master:10000 输入 jdbc:hive2://master:10000 用户名: 输入 jdbc:hive2://master:10000 的密码: 2014 年 11 月 17 日 22:09:36 [main]: 警告 jdbc.HiveConnection: 无法连接到 master:10000 从 HS2 服务器读取时出现意外的文件结束。根本原因可能是“并发连接太多”。请要求管理员检查活动连接数,并调整 hive.server2.thrift.max.worker.threads(如果适用)。 错误:无法使用 JDBC Uri 打开客户端传输:jdbc:hive2://master:10000: null (state=08S01,code=0) hive-site.xml是这样设置的
<property>
39 <name>hive.server2.thrift.min.worker.threads</name>
40 <value>5</value>
41 </property>
42 <property>
43 <name>hive.server2.thrift.max.worker.threads</name>
44 <value>500</value>
45 </property>
46 <property>
47 <name>hive.server2.thrift.bind.host</name>
48 <value>master</value>
49 </property>
50 <property>
51 <name>hive.server2.thrift.port</name>
52 <value>10000</value>
53 </property>
我检查了 netstat 10000 端口正在侦听。 即使我重新启动hadoop服务器和hiveserver2,问题也没有解决。 我如何知道有多少连接处于活动状态或者我可以清除线程池吗? 当我关闭hiveserver和hadoop以及linux系统时,active不会被关闭吗?
$ netstat -an | grep 10000
tcp4 0 0 *.10000 *.* LISTEN
<property>
<name>hive.server2.authentication</name>
<value>NOSASL</value> <!-- default NONE is for SASLTranspor
</property>
<property>
<name>hive.server2.enable.doAs</name>
<value>false</value> <!-- Execute query as hiveserver2 proc
</property>
和
!connect jdbc:hive2://localhost:10000/default;auth=noSasl hive password org.apache.hive.jdbc.HiveDriver