Support Questions
Find answers, ask questions, and share your expertise

Sqoop to teradata using Kerberos connection

New Contributor

Please help me with Sqoop command to connect to teradata using Kerberos Authentication . I need to know jdbc parameters especially

8 REPLIES 8

@Sibhi Prian

You will have to run kinit before running sqoop

16/02/12 18:49:50 INFO hdfs.DFSClient: Created HDFS_DELEGATION_TOKEN token 1102 for ns009 on ha-hdfs:HDPPOC

16/02/12 18:49:50 INFO security.TokenCache: Got dt for hdfs://HDPPOC; Kind: HDFS_DELEGATION_TOKEN, Service: ha-hdfs:HDPPOC, Ident: (HDFS_DELEGATION_TOKEN token 1102 for ns009)

If you don't run kinit then you will see this

used by: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)

at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:147)

at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:121)

at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:187)

at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:223)

at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:212)

at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)

at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:193)

New Contributor

@Neeraj Sabharwal Thanks . exactly . This is what i am getting but ,

1. I ran kinit

2. then i checked the tickets using klist

3. Then i ran sqoop but still i get the same

My sqoop command as below

sqoop import --connect jdbc:teradata://servername/databasename=tttttttt,LOGMECH=KRB5 --table YYYYYY .........

Do we need to add anything to JDBC parameter ?

@Sibhi Prian

No ..nothing was added in jdbc string

@Sibhi Prian Is there kerberos in teradata environment?

New Contributor

yes . @Neerajsabharwal . I can run other utilities to connect teradata . I m just confused to use jdbc connections in sqoop command

@Sibhi Prian You are confuse about sqoop connection while reading Teradata with kerberos at Teradata level

@Sibhi Prian I am not teradata expert.

Do you have existing jdbc example for Teradata connection in your application or GUI tool? If there is a way you can find that from teradata or existing application then you have the answer.

Please see this guide.http://www.info.teradata.com/htmlpubs/DB_TTU_15_10/index.html#page/Interface_Tools/B035_2418_035K/2418Ch05.46.005.html

sqoop import --connect jdbc:teradata://servername/databasename=tttttttt,LOGMECH=KRB5 --table YYYYYY .........

@Sibhi Prian This is what you need.

LOGDATA=user1@ESDOM.ESDEV.TDAT@@mypassword

sqoop import --connect jdbc:teradata://servername/databasename=tttttttt,LOGMECH=KRB5,LOGDATA=user1@ESDOM.ESDEV.TDAT@@mypassword --table YYYYYY

See this example https://developer.teradata.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html#URL_LOG...