Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

Teradata Studio
Enthusiast

Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

Hello team - I have downloaded TDStudio15.10 and tried to connect to a HWSandbox2.1 and a vanilla 4 pseudo HDP2.2 cluser and failed both times.

"The target server failed to respond"

  • localhost/50111/hdfs works for the WebHCat connection test.
  • But the JDBC fails using ports 10000 or 10001, the default thrift type is binary,
  • I change this to http and the cluster is happy, however your notes do say use http for JDBC.
  • I have also noticed that 10000 is for hive and 10001 is for hive2.thrift so which one should it be?
  • I'm assuming 10001 but "netstat -letpn" on the hive/hive2 node does not show a 10001 port active, only the 10000
  • I have tested creating a hive table for that user on the CLI so it's a valid hive setup for the user.

Help greatly apprieciated

17 REPLIES
Enthusiast

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

addendum: hive2.thrift.type=http causes issues so I turned it back to "binary".

Enthusiast

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

I also downloaded the latest TD Studio 15.10.00.01 and it fails in a similary way for JDBC:

java.lang.Exception: Could not establish connection to jdbc:hive2://localhost:10000/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice: org.apache.http.NoHttpResponseException: The target server failed to respond

    at com.teradata.datatools.hadoop.hive.connectivity.HiveConnection.openJdbcConnection(HiveConnection.java:273)

    at com.teradata.datatools.hadoop.hive.connectivity.HiveConnection.createConnection(HiveConnection.java:187)

    at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)

    at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)

    at com.teradata.datatools.hadoop.hive.connectivity.HiveConnection.open(HiveConnection.java:144)

    at com.teradata.datatools.hadoop.hive.connectivity.HivePingFactory.createJdbcConnection(HivePingFactory.java:44)

    at com.teradata.datatools.hadoop.hive.connectivity.PingJdbcJob.createTestConnection(PingJdbcJob.java:30)

    at com.teradata.datatools.hadoop.hive.connectivity.PingJob.run(PingJob.java:42)

    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Enthusiast

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

Okay I have some more understanding now: JDBC connectivity works on 10000 if you don't use http transport protocol - but that's no good for the TD Studio setup, you need to use Thrift  - and it's default port is 10001 in Sandbox's Ambari. netstat -letpn | grep 10001 show's nothing - so thrift's port is not currently active so it's something to do with the vanilla install of Sanbox. No fault of the TDStudio package. I need to figure out why thrift isn't working on this Sandbox install...

Teradata Employee

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

I can connect to the Hortonworks Sandbox as it is provided. I've unchecked the HTTP Transport Mode checkbox which changes the JDBC Port Number to 10000. I've done this with both the 2.1 (a version of HDP we support) and the 2.2 Sandbox (which we haven't done certification with).

Are there any messages in the Error Log indicating problems?

Enthusiast

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

You mean other than the log details I've provided above? can you be more specific?

Does this mean you dropped your sandbox back to "binary" mode from the "http" mode? I've tested with the following plus http/10001 plus binary/10000








Enthusiast

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

Also did you need to change knox settings? which user did you use for tdch/jdbc/webhcat respectively?

Enthusiast

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

Okay making progress. Restarting stale Hive configs wasn't enough on the Sandbox V2.2.4.2, I needed to restart the entire thing. JDBC now successfully pings. However unfortunately now when I open up TDStudio I still don' get anything more on the sidebar tree than the username under the connection, and I can't run jdbc actions in the SQL editor screen. "show databases" provides no rows.

A DTS0905 "NullPointerException" get's thrown with "show tables;"

an SQLPlugin Internal Error is returned on "show databases;"

Even though on the CLI the following can be returned:

hive> show databases;

OK

default

xademo

Time taken: 0.822 seconds, Fetched: 2 row(s)

hive> show tables;   

OK

sample_07

sample_08

Time taken: 0.148 seconds, Fetched: 2 row(s)

I think now I'm dealing with a TDStudio bug not a Sandbox setup issue. Keen for ideas.

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

Connection properties that worked for me...

Tab General

Check TDCH and JDBC

Tab TDCH

WebHDFS Host Name: sandbox.hortonworks.com (setup in hosts file on client - windows\system32\drivers\etc\hosts)

WebHDFS Port Number: 50070

WebHDFS User Name: guest

Tab JDBC

JDBC Host: sandbox.hortonworks.com

JDBC Port Number: 10000

JDBC Database: default

JDBC User Name: hive

JDBC password: left blank

HTTP Transport Mode is left unchecked

Tab WebHCat

WebHCat Host Name: sandbox.hortonworks.com

WebHCat Port Number: 50111

WebHCat User Name: hue

I am able to query the HDFS via Hive and I can navigate the tree on the left. But I cannot load data via TDCH. I saw you had some posts about that. How were you able to get Knox working? did that allow you to load data?

Teradata Employee

Re: Teradata Studio 15.10 connectivity to HDP 2.2(2.2.4.2-2) via JDBC - WebHCat works; fails with JDBC

Mike, Have you followed the steps to run the ConfigureOozie script?