[
https://issues.apache.org/jira/browse/SQOOP-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501555#comment-13501555
]
Jan Mechtel commented on SQOOP-382:
-----------------------------------
I also have this issue when trying to connect to MS SQL on Azure. I can tell
that the connection works because it stops before the mappers if i try with a
wrong password or table name that does not exist.
If the password is correct then:
12/11/20 23:16:49 INFO mapred.JobClient: Cleaning up the staging area
hdfs://overlord-datanode1:8020/user/overlord/.staging/job_201211201516_0015
12/11/20 23:16:49 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.RuntimeException: java.lang.RuntimeException:
com.microsoft.sqlserver.jdbc.SQLServerException: Server name cannot be
determined. It must appear as the first segment of the server's dns name
(servername.database.windows.net). Some libraries do not send the server name,
in which case the server name must be included as part of the user name
(username@servername). In addition, if both formats are used, the server names
must match.
Complete output ( I believe the first error about connector file is not
relevant)
overlord@overlord-datanode1:~/Documents/hadoop/scripts/03_azure_sql$
./test_sqoop_azure_connection.sh
Enter password:
12/11/20 23:30:57 ERROR sqoop.ConnFactory: Error loading ManagerFactory
information from file /usr/lib/sqoop/bin/../conf/managers.d/mssqoop-sqlserver:
java.io.IOException: the content of connector file must be in form of key=value
at
org.apache.sqoop.ConnFactory.addManagersFromFile(ConnFactory.java:153)
at
org.apache.sqoop.ConnFactory.loadManagersFromConfDir(ConnFactory.java:228)
at
org.apache.sqoop.ConnFactory.instantiateFactories(ConnFactory.java:83)
at org.apache.sqoop.ConnFactory.<init>(ConnFactory.java:60)
at com.cloudera.sqoop.ConnFactory.<init>(ConnFactory.java:36)
at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:200)
at org.apache.sqoop.tool.ImportTool.init(ImportTool.java:83)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:464)
at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
12/11/20 23:30:57 INFO manager.SqlManager: Using default fetchSize of 1000
12/11/20 23:30:57 INFO tool.CodeGenTool: Beginning code generation
12/11/20 23:30:58 INFO manager.SqlManager: Executing SQL statement: SELECT t.*
FROM [Unlocks] AS t WHERE 1=0
12/11/20 23:30:58 INFO orm.CompilationManager: HADOOP_HOME is /usr/lib/hadoop
Note: /tmp/sqoop-overlord/compile/74f660b6b6f05d767baeb6b4266f35c1/Unlocks.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
12/11/20 23:31:00 INFO orm.CompilationManager: Writing jar file:
/tmp/sqoop-overlord/compile/74f660b6b6f05d767baeb6b4266f35c1/Unlocks.jar
12/11/20 23:31:01 INFO mapreduce.ImportJobBase: Beginning import of Unlocks
12/11/20 23:31:01 WARN mapred.JobClient: Use GenericOptionsParser for parsing
the arguments. Applications should implement Tool for the same.
12/11/20 23:31:18 INFO mapred.JobClient: Cleaning up the staging area
hdfs://overlord-datanode1:8020/user/overlord/.staging/job_201211201516_0016
12/11/20 23:31:18 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.RuntimeException: java.lang.RuntimeException:
com.microsoft.sqlserver.jdbc.SQLServerException: Server name cannot be
determined. It must appear as the first segment of the server's dns name
(servername.database.windows.net). Some libraries do not send the server name,
in which case the server name must be included as part of the user name
(username@servername). In addition, if both formats are used, the server names
must match.
java.lang.RuntimeException: java.lang.RuntimeException:
com.microsoft.sqlserver.jdbc.SQLServerException: Server name cannot be
determined. It must appear as the first segment of the server's dns name
(servername.database.windows.net). Some libraries do not send the server name,
in which case the server name must be included as part of the user name
(username@servername). In addition, if both formats are used, the server names
must match.
at
org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:167)
at
org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:70)
at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130)
at
org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:1011)
at org.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:1031)
at org.apache.hadoop.mapred.JobClient.access$600(JobClient.java:172)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:943)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:896)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1332)
at
org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:896)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:531)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:561)
at
org.apache.sqoop.mapreduce.ImportJobBase.runJob(ImportJobBase.java:141)
at
org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:202)
at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:465)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:403)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)
Caused by: java.lang.RuntimeException:
com.microsoft.sqlserver.jdbc.SQLServerException: Server name cannot be
determined. It must appear as the first segment of the server's dns name
(servername.database.windows.net). Some libraries do not send the server name,
in which case the server name must be included as part of the user name
(username@servername). In addition, if both formats are used, the server names
must match.
at
org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:193)
at
org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:162)
... 25 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Server name cannot
be determined. It must appear as the first segment of the server's dns name
(servername.database.windows.net). Some libraries do not send the server name,
in which case the server name must be included as part of the user name
(username@servername). In addition, if both formats are used, the server names
must match.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2529)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1905)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1893)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1045)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at
org.apache.sqoop.mapreduce.db.DBConfiguration.getConnection(DBConfiguration.java:181)
at
org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:187)
... 26 more
> Connection parameters should be used on the mapper
> --------------------------------------------------
>
> Key: SQOOP-382
> URL: https://issues.apache.org/jira/browse/SQOOP-382
> Project: Sqoop
> Issue Type: Bug
> Reporter: David Robson
>
> Currently you can specify connection parameters using --connection-param-file
> <properties-file>.
> This applies the connection parameters to the connection when generating the
> Sqoop code - but the parameters are not passed down to the mapper.
> Instead of specifying a parameters file couldn't we have a comma seperated
> list that could be specified on the command line or in sqoop-site.xml - that
> way it would be easier to override the settings per job, and they would be
> passed down to the mappers. It would then be simple to modify
> DBConfiguration.getConnection to read these.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira