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 issue : The Network Adapter could not establish the connection

Highlighted

SQOOP issue : The Network Adapter could not establish the connection

Expert Contributor

I am getting below error while executing SQOOP import command : ERROR manager.SqlManager: Error executing statement: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

6 REPLIES 6
Highlighted

Re: SQOOP issue : The Network Adapter could not establish the connection

Expert Contributor

Query : ./sqoop import --connect jdbc:oracle:thin://<ip address>:1521/app --username APP --password APP12# --table tbemp --hive-import

Highlighted

Re: SQOOP issue : The Network Adapter could not establish the connection

Your --connect URL does not seem to be correct.

--connect jdbc:oracle:thin://<ip address>:1521/app

Change it to something like following

--connect jdbc:oracle:thin:@//<ip address>:1521/app
Highlighted

Re: SQOOP issue : The Network Adapter could not establish the connection

Also it will be best to check if the oracle DB listener is started listening properly on port 1521 or not?

It will be also good to check if the port is accessible fine from the sqoop client host:

telnet   <oracle_ipaddress>   1521
Highlighted

Re: SQOOP issue : The Network Adapter could not establish the connection

Expert Contributor

This I need to do from hadoop namenode?

Highlighted

Re: SQOOP issue : The Network Adapter could not establish the connection

@Amit Dass the telnet command it just to verify the connectivity between the host where you are running the "./sqoop import" command to the Oracle Database host "<oracle_ipaddress> 1521".

Highlighted

Re: SQOOP issue : The Network Adapter could not establish the connection

Rising Star

If app is not a defined service for the TNS listener but the instance id, use this URL format

jdbc:oracle:thin:@//<host>:1521:app

Also, make sure you can connect to the Oracle instance from the all the client nodes (typically) as the sqoop mappers will run across the cluster.

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