<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108955#M38209</link>
    <description>&lt;P&gt;My Sqlserver JDBC connection works perfectly if I use SQL authentication. However, if I use JDBC connection string for the Windows authentication, it works fine if I just use sqoop list-databases, but on executing the sqoop import, it failes after initializing the map reduce job. Below is the command which I am using along with the errors. Please suggest a solution. Thanks&lt;/P&gt;&lt;P&gt;sqoop import --connect "jdbc:sqlserver://FQDN;integratedSecurity=true;authenticationScheme=JavaKerberos;database=database_name" --username 'Domain\user' --query 'select * from table where $CONDITIONS' --split-by Abc_Number --target-dir /user/user/Sql&lt;/P&gt;&lt;P&gt; INFO mapreduce.JobSubmitter: Kind: HDFS_DELEGATION_TOKEN, Service: ha-hdfs:NNHA, Ident: (HDFS_DELEGATION_TOKEN token 2496 for )
INFO impl.YarnClientImpl: Submitted application 
 INFO mapreduce.Job: The url to track the job: 
 INFO mapreduce.Job: Running job: job_1
 INFO mapreduce.Job: Job job_1 running in uber mode : false
INFO mapreduce.Job: map 0% reduce 0%
 INFO mapreduce.Job: Task Id : attempt_1470416754637_0238_m_000003_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:366c38c7-c
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:167)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:749)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1709)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
Caused by: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:366c38c7-c
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:220)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:165)
... 9 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:366c38c7-c
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2399)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.intAuthInit(KerbAuthentication.java:176)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.GenerateClientContext(KerbAuthentication.java:296)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4084)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3159)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:42)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3122)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2444)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1980)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1627)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1458)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:772)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1168)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.sqoop.mapreduce.db.DBConfiguration.getConnection(DBConfiguration.java:302)
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:213)
... 10 more
Caused by: java.security.PrivilegedActionException: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.getClientCredential(KerbAuthentication.java:199)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.intAuthInit(KerbAuthentication.java:150)
... 26 more
Caused 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:122)
at sun.security.jgss.GSSManagerImpl.getCredentialElement(GSSManagerImpl.java:193)
at sun.security.jgss.GSSCredentialImpl.add(GSSCredentialImpl.java:427)
at sun.security.jgss.GSSCredentialImpl.&amp;lt;init&amp;gt;(GSSCredentialImpl.java:62)
at sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:154)
at com.microsoft.sqlserver.jdbc.KerbAuthentication$1.run(KerbAuthentication.java:189)
at com.microsoft.sqlserver.jdbc.KerbAuthentication$1.run(KerbAuthentication.java:187)
... 30 more&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2016 02:47:04 GMT</pubDate>
    <dc:creator>kushalkhera06</dc:creator>
    <dc:date>2016-08-18T02:47:04Z</dc:date>
    <item>
      <title>SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108955#M38209</link>
      <description>&lt;P&gt;My Sqlserver JDBC connection works perfectly if I use SQL authentication. However, if I use JDBC connection string for the Windows authentication, it works fine if I just use sqoop list-databases, but on executing the sqoop import, it failes after initializing the map reduce job. Below is the command which I am using along with the errors. Please suggest a solution. Thanks&lt;/P&gt;&lt;P&gt;sqoop import --connect "jdbc:sqlserver://FQDN;integratedSecurity=true;authenticationScheme=JavaKerberos;database=database_name" --username 'Domain\user' --query 'select * from table where $CONDITIONS' --split-by Abc_Number --target-dir /user/user/Sql&lt;/P&gt;&lt;P&gt; INFO mapreduce.JobSubmitter: Kind: HDFS_DELEGATION_TOKEN, Service: ha-hdfs:NNHA, Ident: (HDFS_DELEGATION_TOKEN token 2496 for )
INFO impl.YarnClientImpl: Submitted application 
 INFO mapreduce.Job: The url to track the job: 
 INFO mapreduce.Job: Running job: job_1
 INFO mapreduce.Job: Job job_1 running in uber mode : false
INFO mapreduce.Job: map 0% reduce 0%
 INFO mapreduce.Job: Task Id : attempt_1470416754637_0238_m_000003_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:366c38c7-c
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:167)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:749)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1709)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
Caused by: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:366c38c7-c
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:220)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:165)
... 9 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:366c38c7-c
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2399)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.intAuthInit(KerbAuthentication.java:176)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.GenerateClientContext(KerbAuthentication.java:296)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4084)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3159)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:42)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3122)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2444)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1980)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1627)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1458)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:772)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1168)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.sqoop.mapreduce.db.DBConfiguration.getConnection(DBConfiguration.java:302)
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:213)
... 10 more
Caused by: java.security.PrivilegedActionException: GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.getClientCredential(KerbAuthentication.java:199)
at com.microsoft.sqlserver.jdbc.KerbAuthentication.intAuthInit(KerbAuthentication.java:150)
... 26 more
Caused 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:122)
at sun.security.jgss.GSSManagerImpl.getCredentialElement(GSSManagerImpl.java:193)
at sun.security.jgss.GSSCredentialImpl.add(GSSCredentialImpl.java:427)
at sun.security.jgss.GSSCredentialImpl.&amp;lt;init&amp;gt;(GSSCredentialImpl.java:62)
at sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:154)
at com.microsoft.sqlserver.jdbc.KerbAuthentication$1.run(KerbAuthentication.java:189)
at com.microsoft.sqlserver.jdbc.KerbAuthentication$1.run(KerbAuthentication.java:187)
... 30 more&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 02:47:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108955#M38209</guid>
      <dc:creator>kushalkhera06</dc:creator>
      <dc:date>2016-08-18T02:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108956#M38210</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12255/kushalkhera06.html" nodeid="12255"&gt;@Khera&lt;/A&gt; according to &lt;A href="https://community.hortonworks.com/questions/8143/sqoop-sqlserver-with-windows-authentication.html"&gt;this HCC post&lt;/A&gt;, Windows Authentication is not yet supported by Sqoop, with the JDBC driver provided by Microsoft, and SQL Authentication must be used.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:12:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108956#M38210</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2016-08-18T03:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108957#M38211</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/12255/kushalkhera06.html" nodeid="12255"&gt;@Khera&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What JDBC driver are you using to connect to SQL Server? The one provided by MS does not support WIndows authentication. That said, you can grab another driver that does support it. You have a couple options: &lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;Both Simba and &lt;A href="https://www.progress.com/blogs/windows-authentication-to-sql-server-from-unix-linux"&gt;Data Direct&lt;/A&gt; have drivers to support this authentication method. These have free trials but are ultimately going to require a license for repeated use. &lt;/LI&gt;
&lt;LI&gt;There is also &lt;A href="http://jtds.sourceforge.net/"&gt;jTDS&lt;/A&gt; which is free and open source and claims to support Windows Authentication so we can take it for a spin if you would like. You can see the rough JDBC URL that you would need is: &lt;PRE&gt;&amp;lt;code&amp;gt;jdbc:jtds:sqlserver://123.123.123;instance=server1;databaseName=students;integratedSecurity=true;authenticationScheme=JavaKerberos&lt;/PRE&gt;
&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:19:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108957#M38211</guid>
      <dc:creator>bwilson</dc:creator>
      <dc:date>2016-08-18T03:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108958#M38212</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/99/bwilson.html" nodeid="99"&gt;@Brandon Wilson&lt;/A&gt; Thanks for answering. We are using Microsoft JDBC Driver 4.2 to connect. We'll try with the ones you mentioned. But how can I connect with the SQL server and get the list of databases with the same JDBC. This is the command we used to get the list of databases. Its just with the sqoop import, which is failing. &lt;/P&gt;&lt;P&gt;sqoop list-databases --connect "jdbc:sqlserver://FQDN;integratedSecurity=true;authenticationScheme=JavaKerberos;" --username 'Domain\user' &lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:31:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108958#M38212</guid>
      <dc:creator>kushalkhera06</dc:creator>
      <dc:date>2016-08-18T03:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108959#M38213</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/11295/slachterman.html" nodeid="11295"&gt;@slachterman&lt;/A&gt;. But how can I connect with the SQL server and get the list of databases with the same JDBC. This is the command we used to get the list of databases. Its just with the sqoop import, which is failing.&lt;/P&gt;&lt;P&gt;sqoop list-databases --connect "jdbc:sqlserver://FQDN;integratedSecurity=true;authenticationScheme=JavaKerberos;" --username 'Domain\user'&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 03:32:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108959#M38213</guid>
      <dc:creator>kushalkhera06</dc:creator>
      <dc:date>2016-08-18T03:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108960#M38214</link>
      <description>&lt;P&gt;Based on the error, it seems that you do not have a valid Kerberos ticket. Is the machine you are initiating the Sqoop job from integrated with your Windows AD via Kerberos?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 19:09:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108960#M38214</guid>
      <dc:creator>bwilson</dc:creator>
      <dc:date>2016-08-18T19:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108961#M38215</link>
      <description>&lt;P&gt;Yes, it is configured with our Windows AD via kerberos. &lt;A rel="user" href="https://community.cloudera.com/users/99/bwilson.html" nodeid="99"&gt;@Brandon Wilson&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 20:15:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108961#M38215</guid>
      <dc:creator>kushalkhera06</dc:creator>
      <dc:date>2016-08-18T20:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108962#M38216</link>
      <description>&lt;P&gt;Like I said, I do not believe you can connect from Linux to SQLServer using IWA with the sqlsever jdbc driver. I recommend that you drop the jTDS driver in your Sqoop lib dir and try using that driver.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 21:40:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108962#M38216</guid>
      <dc:creator>bwilson</dc:creator>
      <dc:date>2016-08-18T21:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108963#M38217</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/99/bwilson.html" nodeid="99"&gt;@Brandon Wilson&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/12255/kushalkhera06.html" nodeid="12255"&gt;@Khera&lt;/A&gt; &lt;A rel="user" href="https://community.cloudera.com/users/11295/slachterman.html" nodeid="11295"&gt;@slachterman&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Disclaimer: I work with Khera.&lt;/P&gt;&lt;P&gt;We are using the MS SQL JDBC connector found here: &lt;A href="https://www.microsoft.com/en-us/download/details.aspx?id=11774"&gt;https://www.microsoft.com/en-us/download/details.aspx?id=11774&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Specifically the sqljdbc42.jar file which supports Java 1.8 (We use Oracle Java 1.8 on all our Centos Nodes).&lt;/P&gt;&lt;P&gt;Our entire cluster is "kerberized", so all access is setup with Kerberos. All nodes are setup within Active Directory to allow Kerberos Delegation. Additionally all user accounts used to access the cluster are AD accounts, and will have valid kerberos tickets at login using one of two methods:&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;1. If they use a SSH client that supports GSSAPI, and requests delegation of tokens, they will have a delegated Kerberos token at login. For example:&lt;/P&gt;&lt;PRE&gt;[xxxxxx@xxxxxxx ~]$ klist -f
Ticket cache: FILE:/tmp/krb5cc_478262072
Default principal: xxxxxx@xxxx 
Valid starting       Expires              Service principal
08/29/2016 12:54:12  08/29/2016 22:54:12  krbtgt/xxxx@xxx         
renew until 09/05/2016 12:54:12, Flags: FfRA&lt;/PRE&gt;&lt;P&gt;      2. If they use an SSH client and login using a password (no GSSAPI), they will automatically be granted a Kerberos ticket. For example:&lt;/P&gt;&lt;PRE&gt;[xxxxx@xxxxx ~]$ klist -f 

Ticket cache: FILE:/tmp/krb5cc_478262072 
Default principal: xxxxx@CORP.FOOTLOCKER.NET
Valid starting       Expires              Service principal
09/07/2016 10:28:36  09/07/2016 20:28:36  krbtgt/xxxxx@xxxx
        renew until 09/14/2016 10:28:36, Flags: FRIA&lt;/PRE&gt;&lt;P&gt;A manual kinit is always available and works, but by default will not generate forwardable tickets (the F flag seen above)&lt;/P&gt;&lt;P&gt;So when he calls scoop like so:&lt;/P&gt;&lt;PRE&gt;sqoop
list-databases --connect
"jdbc:sqlserver://hostname.domain.com;integratedSecurity=true;authenticationScheme=JavaKerberos"
--username 'DOMAIN\USER'&lt;/PRE&gt;&lt;P&gt;We know that it is using his Kerberos ticket to connect to the SQL server, as there is no password prompt and authentication is still required to get a list of databases (so I've been told). I do not have access to the SQL server in question, so I can't verify using the Windows event logs that Kerberos is in use, but it certainly looks like it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However when we then try to import the data, the mapreduce job either does not have any kerberos tickets available or just not one for khera. I'm not familiar with the chain of services that is involved in the import (Scoop, then Yarn, then MapR?).   Additionally our cluster is using Knox/Ranger which seems to further complicate things, as well as the fact that I don't have access to the SQL server nor the Hadoop processes involved so I can't do any troubleshooting myself.&lt;/P&gt;&lt;P&gt;I have a few questions, hopefully someone can answer them.&lt;/P&gt;&lt;P&gt;1.  What is the chain of services involved? (Scoop submits job to YARN, Yarn runs Mapreduce etc?)&lt;/P&gt;&lt;P&gt;2.  Once we know #1, do all of those services involved &lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;a) Support Kerberos&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;B) Support Kerberos DELEGATION as the user&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;C). Forwarding the Kerberos delegated ticket to the NEXT process in the chain (or conversely requesting delegation).&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 21:48:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108963#M38217</guid>
      <dc:creator>jkaufman</dc:creator>
      <dc:date>2016-09-07T21:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108964#M38218</link>
      <description>&lt;P&gt;
	Based on the behavior, it seems to be the case that the execution environment for sqoop list-databases is local to the client host and so has access to the user's ticket cache on that host. Sqoop is a wrapper for the creation and submission of MapReduce jobs (and everything here is with respect to MRv2 on YARN).&lt;/P&gt;&lt;P&gt;
	When sqoop import is invoked from the client, resources for the associated Map tasks are allocated by the YARN Resource Manager in the form of YARN containers that are scheduled to run on the cluster's worker nodes. These containers are not forwarded Kerberos tickets, instead they are given delegation tokens (requested by the client and associated with the container's launch context). More details are available &lt;A href="https://github.com/steveloughran/kerberos_and_hadoop/blob/master/sections/hadoop_tokens.md#example"&gt;here&lt;/A&gt; and &lt;A href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=31822268"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;These delegation tokens can be used to access Hadoop resources, such as HDFS, under the authorization context of &lt;EM&gt;the client&lt;/EM&gt;. My speculation is that since the execution context for the Map tasks does not contain the original TGT, this poses an issue for authenticating via Kerberos to services &lt;I&gt;outside of Hadoop &lt;/I&gt;that don't interact with Hadoop delegation tokens&lt;I&gt;, &lt;/I&gt;like SQL Server.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 01:39:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108964#M38218</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2016-09-08T01:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108965#M38219</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/12969/jkaufman.html"&gt;&lt;/A&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12969/jkaufman.html" nodeid="12969"&gt;@Jonathan Kaufman&lt;/A&gt; if you are a Hortonworks customer, this would be great detailed information to submit to Support to assist with this issue within your environment.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 02:06:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108965#M38219</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2016-09-08T02:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQLServer Sqoop Import Integrated Security Kerberos - Failed to find any Kerberos ticket.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108966#M38220</link>
      <description>&lt;P&gt;I have found a solution to this provided by another user here: &lt;A href="https://community.hortonworks.com/questions/20719/sqoop-to-sql-server-with-integrated-security.html" target="_blank"&gt;https://community.hortonworks.com/questions/20719/sqoop-to-sql-server-with-integrated-security.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Basically if you switch to the jtds driver which you can download here: &lt;A href="http://jtds.sourceforge.net/" target="_blank"&gt;http://jtds.sourceforge.net/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Per &lt;A href="https://community.hortonworks.com/users/3729/rajsyrus.html"&gt;Rajendra Manjunath &lt;/A&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Sqoop SQL Server data import to HDFS worked with manual
parametric the authentication(using windows credential) with added parameter on
the SQL Server JDBC driver, as integrated security is not supported by the SQL
driver as of now due to the Kerberos authentication(Delegated tokens
distributed over cluster while running MR job).&lt;/P&gt;&lt;P&gt;So we need to pass the windows authentication with password and
with the integrated security disabled mode to import the data to the system. As
normal SQL server driver does not support, so I had used the jtds.jar and the
different driver class to pull the data to the Hadoop Lake.&lt;/P&gt;&lt;P&gt;Sample Command I tried on the server as follows,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sqoop import --table Table1 --connect
"jdbc:jtds:sqlserver://&amp;lt;Hostname&amp;gt;:&amp;lt;Port&amp;gt;;useNTLMv2=true;domain=&amp;lt;WindowsDomainName&amp;gt;;databaseName=XXXXXXXXXXXXX"
\&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--connection-manager org.apache.sqoop.manager.SQLServerManager
--driver net.sourceforge.jtds.jdbc.Driver --username XXXXX --password 'XXXXXXX'
\&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;--verbose --target-dir /tmp/33 -m 1 -- --schema dbo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here are some examples that worked for me:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;# List
databases&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop
list-databases --connect
"jdbc:jtds:sqlserver://databasehostname.yourdomain.com:1433;useNTLMv2=true;domain=myactivedirectorydomain.com"
--connection-manager org.apache.sqoop.manager.SQLServerManager --driver
net.sourceforge.jtds.jdbc.Driver --username XXXXX -P&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;# List
tables&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop
list-tables --connect "jdbc:jtds:sqlserver://databasehostname.yourdomain.com:1433;useNTLMv2=true;domain=myactivedirectorydomain.com;databaseName=DATABASENAMEHERE"
--connection-manager org.apache.sqoop.manager.SQLServerManager --driver
net.sourceforge.jtds.jdbc.Driver --username jmiller.admin -P&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;# Pull
data example&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;sqoop import --table
TABLENAMEHERE --connect
"jdbc:jtds:sqlserver://databasehostname.yourdomain.com:1433;useNTLMv2=true;domain=myactivedirectorydomain.com;databaseName=DATABASENAMEHERE"
--connection-manager org.apache.sqoop.manager.SQLServerManager --driver
net.sourceforge.jtds.jdbc.Driver --username XXXXX -P --fields-terminated-by '\001'
--target-dir /user/XXXXX/20170313 -m 1 -- --schema dbo&lt;/P&gt;&lt;P&gt;Note* In the above
example you need to change the username to your username and database name in
the list-tables or pull to the one you need (note the AD account you use will
require access to the data).&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 03:49:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/SQLServer-Sqoop-Import-Integrated-Security-Kerberos-Failed/m-p/108966#M38220</guid>
      <dc:creator>mageru</dc:creator>
      <dc:date>2017-03-14T03:49:08Z</dc:date>
    </item>
  </channel>
</rss>

