Support Questions
Find answers, ask questions, and share your expertise

oozie sqoop action fails with exit status 1

Highlighted

oozie sqoop action fails with exit status 1

New Contributor

I have a oozie sqoop action that calls the already configured sqoop job that does an incremental import into hive tables. The oozie action definition is given below. In that hiveconf points to the out of the box hive-site.xml (copied to hdfs). I am running HDP 2.3.2 in azure VM. The error i get as the result of this action execution is "Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]". I enabled full debug log for oozie and that doesn't suggest anything to debug this issue. The yarn logs also does not have enough information. The oozie dryrun goes through fine.

1. Is there a way to get additional debug to narrow down the issue.

2. Any possible reason for this. (i was able to run a sqoop job which imports into hdfs. (without --hive-import) in the same setup. So the lib resolution and all should be fine.

<action name="IncrementalSqoop">

<sqoop xmlns="uri:oozie:sqoop-action:0.3">

<job-tracker>${jobTracker}</job-tracker>

<name-node>${nameNode}</name-node>

<prepare> <mkdir path="${targetDir}"/> </prepare>

<job-xml>${hiveconf}</job-xml>

<configuration>

<property>

<name>sqoop.metastore.client.record.password</name>

<value>true</value>

</property>

<property>

<name>sqoop.metastore.client.autoconnect.url</name>

<value>${metastoreUrl}</value>

</property>

</configuration>

<arg>job</arg>

<arg>-exec</arg>

<arg>${SqoopJob}</arg>

<arg>--</arg>

<arg>--password</arg>

<arg>${password}</arg>

<arg>--target-dir</arg>

<arg>${targetDir}</arg>

<arg>--hive-partition-value</arg>

<arg>${hivePartitionValue}</arg>

</sqoop>

<ok to="End"/>

<error to="Kill"/>

</action>

2 REPLIES 2
Highlighted

Re: oozie sqoop action fails with exit status 1

Exit Code 1 just means it failed.

You have to go into the yarn logs to see why it failed. This can be the logs of the oozie launcher, the logs of the mapper of the launcher, the logs of the launched Sqoop application or the mapper of the application. Depending what failed. You can also click through to them in Hue or the oozie web UI ( at port 11000)

Highlighted

Re: oozie sqoop action fails with exit status 1

New Contributor

Thanks for your mail. The sqoop --hive-import (that is what the failing sqoop action does) happens in two steps.

1. First a sqoop import to the HDFS directory (targetDir referred in my xml).

2. Then the output of this sqoop import is moved and imported into Hive.

When i run my sqoop job through oozie i see a _SUCCESS file in targetDir indicating the sqoop import is successful. Only the later stage (step 2) is failing.

I enabled DEBUG logging for oozie. But these logs doesn't suggest anything. The Yarn log as well doesn't have anything useful. I don't see any log for my Sqoop application. Where do i find it? There is a empty /var/log/sqoop directory.

Given step 1 goes through fine and only step 2 is failing is there any likely possibilities. When i run the same sqoop job in the command line the step is run as a Tez task.