All Forums Teradata Studio
rupert160 131 posts Joined 09/10
23 Apr 2015
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

rupert160 131 posts Joined 09/10
23 Apr 2015

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

rupert160 131 posts Joined 09/10
07 May 2015

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)

rupert160 131 posts Joined 09/10
07 May 2015

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...

Chuckbert 78 posts Joined 07/09
08 May 2015

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?

rupert160 131 posts Joined 09/10
24 May 2015

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
hive.server2.thrift.http.path

hive.server2.thrift.http.port

hive.server2.transport.mode

 

rupert160 131 posts Joined 09/10
24 May 2015

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

rupert160 131 posts Joined 09/10
25 May 2015

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.

mdampier 1 post Joined 10/13
14 Jun 2015

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?
 
 

fgrimmer 553 posts Joined 04/09
15 Jun 2015

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

MA255073 1 post Joined 05/14
16 Nov 2015

I am unable to connect Teradata Studio with sandbox vm 2.1 HTTP Transport mode. if i checked HTTP Transport Mode  and test connection it gives below exception.

ava.lang.Exception: Could not establish connection to jdbc:hive2://sandbox.hortonworks.com:10001/default?hive.server2.transport.mode=http;hive.server2.thrift.http.path=cliservice: org.apache.http.conn.HttpHostConnectException: Connection to http://sandbox.hortonworks.com:10001 refused

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

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

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)
 

 
Can someone help me to configure with HTTP transport mode?

harristd 6 posts Joined 07/12
17 Nov 2015

Hey MA255073,
Go to Ambari (sandbox.hortonworks.com:8081) and go to the Hive configuration settings.  Double check these settings are correctly set:
hive.server2.transport.mode=http
hive.server2.thrift.http.port=10001
hive.server2.thrift.http.path=cliservice

 
The default login for Ambari is admin/admin

joshuawinter 5 posts Joined 03/11
18 Nov 2015

I'm having very similar issues when going from 15 to 15.10 studio.  Rupert160 and I are encountering the same issue plus the following: 
1.  can't see inventory of databases from connections project side menu.  Tested on mac and linux against hdp2.1, 2.2 and 2.3.  Almost certain its a studio issue.
2.  SQLH foreign server test worked.
3.  TDCH fails bi-directionally when using 15.0 studio.  Seeing oozie errors with system exit.  When I watch the progress from HUE it shows the job as successful but no rows transfer.  From Oozie you see the tdch job definition come through and start but then fails out. 
4.  Now that I'm at studio 15.10 you can't even run a transfer I'm thinking because of issue #1.
I'm attempting this all with td express and hortwonworks sandboxes. 
 

fgrimmer 553 posts Joined 04/09
18 Nov 2015

Joshua, In 15.10.01 we added more error handling. Are you seeing any exceptions in the error logs?

joshuawinter 5 posts Joined 03/11
18 Nov 2015

this is all i get.  i turned it up to debug.  and I'm looking at /StudioWorkspace/.metadata/.log
 
!SESSION 2015-11-18 14:39:43.801 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/admin/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/admin/.eclipse_keyring -showlocation

!ENTRY org.eclipse.ui.navigator 2 0 2015-11-18 14:39:58.453
!MESSAGE Warning: popupMenuId of "org.eclipse.datatools.connectivity.DataSourceExplorerNavigator" was overridden: old value = "org.eclipse.datatools.connectivity.DataSourceExplorerNavigator.menu", new value = "org.eclipse.datatools.connectivity.DataSourceExplorerNavigator.menu".

!ENTRY org.eclipse.ui.navigator 2 0 2015-11-18 14:39:58.454
!MESSAGE Warning: popupMenuId of "org.eclipse.ui.navigator.ProjectExplorer" was overridden: old value = "org.eclipse.ui.navigator.ProjectExplorer#PopupMenu", new value = "org.eclipse.ui.navigator.ProjectExplorer#PopupMenu".

fgrimmer 553 posts Joined 04/09
18 Nov 2015

Thanks. How about the teradata.log? It is located in the .../.metadata/Teradata/teradata.log

joshuawinter 5 posts Joined 03/11
24 Nov 2015

Francine-
I've attached the log but renamed with a .jpeg extension.  Note that there is more in the log than this specific scenario.   Should I move this issue off the forum and create a support ticket instead? 
 
Josh

fgrimmer 553 posts Joined 04/09
24 Nov 2015

Josh, the log image did not come across. Please open an incident so we can investigate your issue. thanks.

You must sign in to leave a comment.