sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georgi Pehlev <g.peh...@gmail.com>
Subject Azure Active Directory authentication with Sqoop
Date Thu, 26 Apr 2018 08:16:30 GMT
Hello,

I am trying to use Sqoop on Azure HDInsight to move data between Data Lake
Store and Azure SQL Database. I have created an Azure AD authentication
contained database user with 'CREATE USER [user@domain] FROM EXTERNAL
PROVIDER'. I am getting the following error when I try to list the database:

sh-4.3$ sqoop list-tables --connect "jdbc:sqlserver://sqlserver.
database.windows.net:1433;database=sqldatabase;user=
sqluser;password=password;encrypt=true;trustServerCertificate=false;
hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword"


Warning: /usr/hdp/2.6.2.3-1/accumulo does not exist! Accumulo imports will
fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.

18/04/26 07:58:18 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.6.2.3-1

18/04/26 07:58:19 INFO manager.SqlManager: Using default fetchSize of 1000

18/04/26 07:58:19 ERROR manager.CatalogQueryManager: Failed to list tables

com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user
'sqluser'. ClientConnectionId:de17342d-1a64-49a8-a16d-ecc3bc8
4c549

        at com.microsoft.sqlserver.jdbc.SQLServerException.
makeFromDatabaseError(SQLServerException.java:217)

        at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:251)

        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:81)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(
SQLServerConnection.java:3077)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(
SQLServerConnection.java:2360)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$
100(SQLServerConnection.java:43)

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

        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(
SQLServerConnection.java:1793)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(
SQLServerConnection.java:1404)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(
SQLServerConnection.java:1068)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:904)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:451)

        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1014)

        at java.sql.DriverManager.getConnection(DriverManager.java:664)

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

        at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:902)

        at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)

        at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:102)

        at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)

        at org.apache.sqoop.Sqoop.run(Sqoop.java:147)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)

        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)

        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225)

        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)

        at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

18/04/26 07:58:19 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException:
Login failed for user 'sqluser'.
ClientConnectionId:de17342d-1a64-49a8-a16d-ecc3bc84c549

java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException:
Login failed for user 'sqluser'.
ClientConnectionId:de17342d-1a64-49a8-a16d-ecc3bc84c549


        at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:118)

        at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)

        at org.apache.sqoop.Sqoop.run(Sqoop.java:147)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)

        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)

        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225)

        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)

        at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed
for user 'sqluser'. ClientConnectionId:de17342d-1a64-49a8-a16d-ecc3bc84c549


        at com.microsoft.sqlserver.jdbc.SQLServerException.
makeFromDatabaseError(SQLServerException.java:217)

        at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:251)

        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:81)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(
SQLServerConnection.java:3077)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(
SQLServerConnection.java:2360)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$
100(SQLServerConnection.java:43)

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

        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(
SQLServerConnection.java:1793)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(
SQLServerConnection.java:1404)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(
SQLServerConnection.java:1068)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:904)

        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:451)

        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1014)

        at java.sql.DriverManager.getConnection(DriverManager.java:664)

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

        at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:902)

        at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)

        at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:102)

        ... 7 more

I am not sure if I have to use a specific SQL JDBC driver in order to get
Azure AD authentication to work. Has anyone been able to successfully
connect with Sqoop to Azure SQL Database using Azure AD authentication?


Best regards,
Georgi

Mime
View raw message