Support Questions

Find answers, ask questions, and share your expertise

Oozie sqoop action Error

avatar
Rising Star

I am trying to import a oracle table data using sqoop action in oozie. I am getting error as

WARN SqoopActionExecutor:523 - SERVER[****] USER[hadoop] GROUP[-] TOKEN[] APP[sample-wf] JOB[0000134-160802050043050-oozie-oozi-W] ACTION[0000134-160802050043050-oozie-oozi-W@source2landingZone] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]

Below is my workflow.xml.

<workflow-app name="sample-wf" xmlns="uri:oozie:workflow:0.1"> <start to="source2landingZone"/> <action name="source2landingZone"> <sqoop xmlns="uri:oozie:sqoop-action:0.2"> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <command>sqoop import --connect jdbc:oracle:thin:@//****:1521/orcl --username *** --password *** --table TEST_SQOOP --target-dir /user/hadoop/generic/test55 -m 1</command> </sqoop> <ok to="end"/> <error to="kill"/> </action> <kill name="kill"> <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill> <end name="end"/> </workflow-app>

1 ACCEPTED SOLUTION

avatar
Rising Star

The Issue got resolved after copying the file ojdbc6.jar in hdfs, path /user/oozie/share/lib/lib_<ts>/sqoop/ojdbc6.jar.

Then I restarted the yarn RM. Thanks for your help.

View solution in original post

6 REPLIES 6

avatar
Super Guru
@Gaurab D

Do you have Oracle drive in Sqoop directory? Check /usr/hdp/current/sqoop-client/lib/. If it's not there, pease put it here in classpath.

avatar
Rising Star

@mqureshi I dont have any such directory as /usr/hdp/current/sqoop-client/lib/. But I am able to import data from oracle database using sqoop. Problem starts while I am trying to do same using oozie sqoop action.

avatar
Super Guru

Then can you please share more from oozie logs? /var/log/oozie?

avatar
Expert Contributor

Make sure you add oracle jdbc driver to the sqoop sharelib in HDFS (find the current sharelib location using 'oozie admin -sharelibliblist sqoop' - For older installations (pre HDP -2.2) you can add the file to /user/oozie/share/lib/sqoop directory

Make sure you either call oozie admin -sharelibupdate or restart oozie after that

avatar
Rising Star

The Issue got resolved after copying the file ojdbc6.jar in hdfs, path /user/oozie/share/lib/lib_<ts>/sqoop/ojdbc6.jar.

Then I restarted the yarn RM. Thanks for your help.

avatar
Expert Contributor

Why would you restart the RM for this?