Connectivity Problem on Oracle Big Data Appliance using Hive JDBC gives exception " java.net.SocketException: Connection reset" (Doc ID 1673791.1)

Last updated on MAY 19, 2017

Applies to:

Big Data Appliance Integrated Software - Version 2.3.1 and later
Linux x86-64

Symptoms

Trying to establish a JDBC connection to Hive on BDA 2.3.1/CDH 4.4 and getting the following exception:

Exception in thread "main" java.sql.SQLException: org.apache.thrift.transport.TTransportException:
  java.net.SocketException: Connection reset
  at: org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery (HiveStatement.java:191)
  at: org.apache.hadoop.hive.jdbc.HiveStatement.execute (HiveStatement.java:127)
  at: org.apache.hadoop.hive.jdbc.HiveConnection.configureConnection (HiveConnection.java:126)
  at: org.apache.hadoop.hive.jdbc.HiveConnection.(HiveConnection.java:121)
  at: org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
  at: java.sql.DriverManager.getConnection(DriverManager.java:571)
  at: java.sql.DriverManager.getConnection(DriverManager.java:215)
  at: HiveJDBCCLient.main(HiveJDBCCLient.java:44)



The connection is similar to follows where the x's represent username and password:

Connection con = DriverManger.getConnection("jdbc:hive:/*.*.*.*:10000", "xxxxxx", "xxxxx");

The driver used in the JDBC code is as follows:

private static String driverName = "org.apache.hadoop.hive.jdbc.HiveDriver";

  

Additionally, the following Beeline connection is found to work with the following on Node 4 of the BDA Cluster:

# beeline
Beeline version 0.10.0-cdh4.4.0 by Apache Hive
beeline> !connect jdbc:hive2://localhost:10000 <user> <password> org.apache.hive.jdbc.HiveDriver
Connecting to jdbc:hive2://localhost:10000
Connected to: Hive (version 0.10.0)
Driver: Hive (version 0.10.0-cdh4.4.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ

  

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms