Reply
Explorer
Posts: 10
Registered: ‎07-04-2016

sqoop export fails for SQLserver connection from linux server

Hi,

 

I am trying to export hdfs text file data to sql table via sqoop but it fails.

 

sqoop export --connect 'jdbc:sqlserver://xxxxxxx:10xx1;DatabaseName=xx;IntegratedSecurity=true;authenticationScheme=JavaKerberos' --export-dir hdfs://ns1/tmp/cust.csv --table 'test' -- --schema dbo

 

Sqoop command was triggered from a linux serevr where kerberos is enabled.

 

I see below excpetion in log files.

 

com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:76886c74-0ada-4616-8607-e7fdbc5702b6

                    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2400)

                    at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3123)

                    ----               at java.sql.DriverManager.getConnection(DriverManager.java:270)

                    at org.apache.sqoop.mapreduce.db.DBConfiguration.getConnection(DBConfiguration.java:300)

                    at org.apache.sqoop.mapreduce.SQLServerAsyncDBExecThread.getConnection(SQLServerAsyncDBExecThread.java:140)

                    at org.apache.sqoop.mapreduce.SQLServerAsyncDBExecThread.write(SQLServerAsyncDBExecThread.java:266)

                    at org.apache.sqoop.mapreduce.SQLServerAsyncDBExecThread.run(SQLServerAsyncDBExecThread.java:240)

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)

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

2017-03-22 11:34:38,236 WARN [Thread-11] org.apache.sqoop.mapreduce.db.BasicRetrySQLFailureHandler: Connection recovery attempt [1] failed.Exception details: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:1d6edd16-a84b-480a-aded-43db5611627c2017-03-22 11:34:53,571 WARN [Thread-11] org.apache.sqoop.mapreduce.db.BasicRetrySQLFailureHandler: Connection recovery attempt [2] failed.Exception details: com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:ff1397b6-6dcd-47c1-b70b-ecdde722d55f

 

Please advise.

Explorer
Posts: 10
Registered: ‎07-04-2016

Re: sqoop export fails for SQLserver connection from linux server

Hi ,

 

To be precise, we are using sqoop not sqoop2. To conenct to sql server ,we use windows authentication by setting IntegratedSecurity=true. Once the conenctivity is successful to SQL ,sqoop complaints about GSS exception.

 

Cant we use Integrated Security if kerberos is enabled?

 

Please assist.

 

 

New Contributor
Posts: 4
Registered: ‎04-23-2018

Re: sqoop export fails for SQLserver connection from linux server

Hi,

Is this issue resolved? We are also facing a similar issue and details would be appreciated

 

Thanks,

Sivaguru

Announcements
New solutions