Error while running Sqoop job in Cloudera Hadoop Cluster

Sqoop is an import/export data from RDBMS to HDFS and HDFS to RDBMS vice versa. After that, I am trying to import data from the HDFS path using Sqoop commands that got below error in the Cloudera cluster node.




While running the Sqoop job in a single node Hadoop cluster got below error.

Sqoop Error:

Caused by: java.sql.SQLRecoverableException: IO Error: Connection reset
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java.498)
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 oracle.jdbc.driver.DriverManager.getConnection(DriverManager.java.571)
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection
Caused by: java.net.SocketException: Connection.reset
at javaa.net.SockerInputstream.read(SocketInputStream.java)

Please find the below screenshot.

Solution:





Step 1: Please verify JDBC connections and give correct details like usernames and passwords.

Step 2: After that restart the Sqoop job simply




Step3: If it is still failing then restart the Sqoop framework using Cloudera Manager. Right-click on Sqoop “stop” the Sqoop services

Step 4: Then “start”  the Sqoop services.

Step 5: And also need to check DataBase connections.

Summary: In Cloudera distributions, Sqoop service is a major role while data importing/exporting from RDBMS to HDFS vice versa. Here are first we need to check job log files what is the error exactly then find out resolutions for that error. In Single node Hadoop cluster first, we need to check all the nodes are running or not. To check JDBC/ODBC driver also for communicating with the job. Simply restart the Sqoop and re-run the job in the Single node Hadoop cluster. Sometimes Driver connection issues or sometimes it may be a network connection issue so we need to restart the job as well. Still, it is failing please verify Java configuration with Oracle Data Base in case any connection is fine otherwise we need to stop the entire cluster using “stop-all.sh” and then restart all services using “strat-all.sh” commands in Hadoop single node cluster. In Cloudera sometimes automatically recover the error so at the no worries.