Reply
Highlighted
New Contributor
Posts: 4
Registered: ‎05-19-2017
Accepted Solution

Sqoop fails with windows authentication error intermittently

Error: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
	at org.apache.sqoop.mapreduce.db.DBInputFormat.setDbConf(DBInputFormat.java:170)
	at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:161)
	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73)
	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
	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:164)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1714)
	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.RuntimeException: java.sql.SQLException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
	at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:223)
	at org.apache.sqoop.mapreduce.db.DBInputFormat.setDbConf(DBInputFormat.java:168)
	... 10 more
Caused by: java.sql.SQLException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
	at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:649)
	at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:371)
	at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
	at java.sql.DriverManager.getConnection(DriverManager.java:571)
	at java.sql.DriverManager.getConnection(DriverManager.java:215)
	at org.apache.sqoop.mapreduce.db.DBConfiguration.getConnection(DBConfiguration.java:302)
	at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:216)
	... 11 more
Champion
Posts: 425
Registered: ‎05-16-2016

Re: Sqoop fails with windows authentication error intermittently

looks like you are passing wrong credentials or the sql server aint accepting your windows account authentication

make the mysql server accept botht the sql server account and windows account . 

check what user being passed under the hood. 

New Contributor
Posts: 4
Registered: ‎05-19-2017

Re: Sqoop fails with windows authentication error intermittently

Thank you for the response.

 

Sqoop used to run fine until we changed service id password. New password is also reflected in the scripts. But, sqoop fails about 2 out of 10 runs with authentication error.

 

If at all I give wrong credentials it should fail all the times. I'm wondering if the job process uses the old credentials from some where in the cache on the sql server side or cluster side ??

 

Tried running the below sqoop from command line and ended up with same windows authentication error intermittently.

PS-- sqoop eval --driver net.sourceforge.jtds.jdbc.Driver --connect "jdbc:jtds:sqlserver://URL:port;DOMAIN:****;username=***;password=****" --username --password --query ""

 

New Contributor
Posts: 4
Registered: ‎05-19-2017

Re: Sqoop fails with windows authentication error intermittently

Source SQL server restart solved the issue

Announcements
New solutions