Error: Could not open connection to jdbc:hive2://192.168.144.22:10000: java.net.ConnectException: Co

Error: Could not open connection to jdbc:hive2://192.168.144.22:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)


解决办法

1. 进入到hive中conf目录下, vim hive-site.xml
<!--hive server2的超时时间,默认是5000-->
<property>
  <name>hive.server2.long.polling.timeout</name>
  <value>5000</value>
  <!--尤其注意时间是5000,原配置文件中会多个L,需要去掉-->
</property>
<!-- hive server2的使用端口,默认就是10000-->
<property>
  <name>hive.server2.thrift.port</name>
  <value>10000</value>
</property>

<!-- hive server2绑定的主机名-->
<property>
  <name>hive.server2.thrift.bind.host</name>
  <value>hadoop21</value>
</property>

你可能感兴趣的:(hive)