Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Oozie sqoop action Error

Contributor

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

Contributor

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

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.

Contributor

@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.

Super Guru

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

Rising Star

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

Contributor

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.

Rising Star

Why would you restart the RM for this?

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.