Connection to Hive fails

One Star

Connection to Hive fails

Hello,
I am new to talend and installed TOS for big data version 5.4.0. I am trying to connect to my Hive server using the tHiveConnection_1 component without success. Here are my settings:
Distibution: Cloudera Hive Version: Cloudera CDH4
Connection mode: Standalone Hive Server: Hive2
Host: "myURL" Port: "10000"
Database: "default"
Username: "" Password: ""
Set Jobtracker URL : "myURL:50030"
Set Namenode URI: "hdfs://myURL:8020

I am getting the following error:
connecting to socket on port 3737
connected
org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused: connect
at org.apache.thrift.transport.TSocket.open(TSocket.java:183)
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:248)
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:159)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:96)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at firstproject.firstjob_0_1.firstJob.tHiveConnection_1Process(firstJob.java:427)
at firstproject.firstjob_0_1.firstJob.runJobInTOS(firstJob.java:856)
at firstproject.firstjob_0_1.firstJob.main(firstJob.java:709)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
disconnected
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.thrift.transport.TSocket.open(TSocket.java:178)
... 10 more
Exception in component tHiveConnection_1
java.sql.SQLException: Could not establish connection to jdbc:hive2://cdh-prod-001.ludia.me:10000/default: java.net.ConnectException: Connection refused: connect
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:162)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:96)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at firstproject.firstjob_0_1.firstJob.tHiveConnection_1Process(firstJob.java:427)
at firstproject.firstjob_0_1.firstJob.runJobInTOS(firstJob.java:856)
at firstproject.firstjob_0_1.firstJob.main(firstJob.java:709)
Exception in component tHiveConnection_2
java.lang.IllegalArgumentException: Bad URL format
at org.apache.hive.jdbc.Utils.parseURL(Utils.java:181)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:84)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at firstproject.firstjob_0_1.firstJob.tHiveConnection_2Process(firstJob.java:574)
at firstproject.firstjob_0_1.firstJob.runJobInTOS(firstJob.java:868)
at firstproject.firstjob_0_1.firstJob.main(firstJob.java:709)
Job firstJob ended at 08:41 30/10/2013.
I am working on a Windows machine,
thanks for your help
Not applicable

Re: Connection to Hive fails

Hi boniecarine,
im seeing a Connection refused error and also BAD URL Format.
Maybe there is something wrong with the URL jdbc:hive2://cdh-prod-001.ludia.me:10000/default ?
Best regards,
Marco
One Star

Re: Connection to Hive fails

Exception in component tHiveInput_1
: big_data_testing.hive_connection_0_1.Hive_connection - tHiveInput_1 org.apache.thrift.transport.TTransportException
java.sql.SQLException: org.apache.thrift.transport.TTransportException
    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.<init>(HiveConnection.java:121)
    at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at big_data_testing.hive_connection_0_1.Hive_connection.tHiveInput_1Process(Hive_connection.java:635)
    at big_data_testing.hive_connection_0_1.Hive_connection.runJobInTOS(Hive_connection.java:1141)
    at big_data_testing.hive_connection_0_1.Hive_connection.main(Hive_connection.java:975)
I am getting this error while connecting hive.Can you please give me an solution for the same ?

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads