A Oracle sqoop job fails with an "Unknown host specified" error

Symptoms

You created a Big Data batch Job with a tSqoopImport component for Oracle from Studio. The Job fails with the following error:

 

[ERROR]: org.apache.sqoop.manager.SqlManager - Error executing statement: java.sql.SQLRecoverableException: IO Error: Unknown host specified 
java.sql.SQLRecoverableException: IO Error: Unknown host specified 
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489) 
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553) 
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254) 
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) 
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528) 
at java.sql.DriverManager.getConnection(DriverManager.java:571) 
at java.sql.DriverManager.getConnection(DriverManager.java:215) 
at org.apache.sqoop.manager.OracleManager.makeConnection(OracleManager.java:328) 
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52) 
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:763) 
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:786) 
at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:289) 
at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:260) 
at org.apache.sqoop.manager.SqlManager.getColumnTypesForQuery(SqlManager.java:253) 
at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:336) 
at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1861) 
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1661) 
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107) 
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:488) 
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615) 
at org.apache.sqoop.Sqoop.run(Sqoop.java:143) 
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) 
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)

 

Diagnosis

Even though you received the Unknown host specified error, this is not the actual reason for the issue. The ping and telnet to the Oracle database server host always works from Studio and JobServer machines.

 

When you see the other Oracle calls in the stack trace, you see a logon(T4CConnection) method. If you verify the user login properties in the component, you will see that the issue is isolated to the incorrect password provided while creating the tSqoopImport component from Studio.

 

Solution

Correct the password of the Oracle database user in the tSqoopImport component from Studio to fix this issue.

Version history
Revision #:
3 of 3
Last update:
‎11-28-2017 11:52 AM
Updated by:
 
Contributors