Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sqoop Import Network Adaptor Error

Sqoop Import Network Adaptor Error

New Contributor

Hi ,

I am doing sqoop import from oracle using below command

 

sqoop import --connect jdbc:oracle:thin:@192.168.146.1:1521/orcl \ --username scott --password orcl --table emp --target-dir /tmp/test/ --m 1

 

Please set $ACCUMULO_HOME to the root of your Accumulo installation. 

16/06/14 17:41:29 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5.2.2.0.0-2041 
16/06/14 17:41:29 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 16/06/14 17:41:30 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled. 
16/06/14 17:41:30 INFO manager.SqlManager: Using default fetchSize of 1000 
16/06/14 17:41:30 INFO tool.CodeGenTool: Beginning code generation 

16/06/14 17:42:31 ERROR manager.SqlManager: Error executing statement: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:548) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:564) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:251) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:29) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563) 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:327) at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:736) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:759) at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:269) at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:240) at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:226) at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295) at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1773) at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1578) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601) 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) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227) at org.apache.sqoop.Sqoop.main(Sqoop.java:236) Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:436) at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:451) at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:897) at oracle.net.ns.NSProtocol.connect(NSProtocol.java:271) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1663) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:385) ... 25 more Caused by: java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:146) at oracle.net.nt.ConnOption.connect(ConnOption.java:130) at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:402) ... 30 more 

16/06/14 17:42:31 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1584) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:601) 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) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227) at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

Please check if telnet to Oracle host as "telnet 192.168.146.1 1521" works no fine from all the Data nodes.

1 REPLY 1
Highlighted

Re: Sqoop Import Network Adaptor Error

Expert Contributor

Hi,

 

Looks like there is a connectivity issue from the NM to the Oracle database.

 

Can you please run the below command from all the Node Managers.

 

Note:- You need to install telnet utility prior running this command.

 

## telnet <oracle full hostname> <oracle port number>

 

Kindly check if all the NM are able to connect, If any of them is not able to connect then kindly check with network team.

 

Regards

Nitish

Don't have an account?
Coming from Hortonworks? Activate your account here