Exception thrown when hive JDBC joins:
Exception in thread ' main ' java.sql.SQLException:Could not open client transport with JDBC uri:jdbc:hive2://192.168. 206.128:10000/default:java.net.connectexception:connection Refused:connect
At Org.apache.hive.jdbc.HiveConnection.openTransport (hiveconnection.java:215)
At org.apache.hive.jdbc.hiveconnection.<init> (hiveconnection.java:163)
At Org.apache.hive.jdbc.HiveDriver.connect (hivedriver.java:105)
At java.sql.DriverManager.getConnection (drivermanager.java:571)
At java.sql.DriverManager.getConnection (drivermanager.java:215)
At Hellohive.main (hellohive.java:17)
caused By:org.apache.thrift.transport.TTransportException:java.net.ConnectException:Connection refused: Connect
At Org.apache.thrift.transport.TSocket.open (tsocket.java:187)
At Org.apache.thrift.transport.TSaslTransport.open (tsasltransport.java:266)
At Org.apache.thrift.transport.TSaslClientTransport.open (tsaslclienttransport.java:37)
At Org.apache.hive.jdbc.HiveConnection.openTransport (hiveconnection.java:190)
... 5 More
caused by:java.net.ConnectException:Connection refused:connect
At java.net.DualStackPlainSocketImpl.connect0 (Native Method)
At Java.net.DualStackPlainSocketImpl.socketConnect (dualstackplainsocketimpl.java:79)
At Java.net.AbstractPlainSocketImpl.doConnect (abstractplainsocketimpl.java:339)
At java.net.AbstractPlainSocketImpl.connectToAddress (abstractplainsocketimpl.java:200)
At Java.net.AbstractPlainSocketImpl.connect (abstractplainsocketimpl.java:182)
At Java.net.PlainSocketImpl.connect (plainsocketimpl.java:172)
At Java.net.SocksSocketImpl.connect (sockssocketimpl.java:392)
At Java.net.Socket.connect (socket.java:579)
At Org.apache.thrift.transport.TSocket.open (tsocket.java:182)
... 8 MoreWorkaround: 1. Check if Hive Server2 is started:NETSTAT-ANP |grep 100002. Check that the configuration is correct under Conf/hive-site.xml:<configuration><property>
<name>hive.server2.thrift.port</name>
<value>10000</value>
</property>
<property>
<name>hive.server2.thrift.bind.host</name>
<value>192.168.206.128</value>
</property>
</configuration>
Hive JDBC Connection refused