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

Oozie Sqoop Job gets stuck at 95%

Highlighted

Oozie Sqoop Job gets stuck at 95%

New Contributor

Hi,
Am trying to run a sqoop job on oozie but it's getting stuck at 95% but the same sqoop command runs perfectly on the command line.

I am running HDP 2.6.2

The following is my workflow xml, hive xml and job properties

Workflow xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<workflow-app xmlns="uri:oozie:workflow:0.5" name="Sqoop_Import_105">
    <start to="sqoop_ext_105"/>
    <action name="sqoop_ext_105">
        <sqoop xmlns="uri:oozie:sqoop-action:0.4">
            <job-tracker>${resourceManager}</job-tracker>
            <name-node>${nameNode}</name-node>
            <prepare>
                <delete path="/user/admin/Data/Users/Extract"/>
                <mkdir path="/user/admin/Data/Users/Extract"/>
            </prepare>
            <command>import --connect jdbc:mysql://xxxxxx/xx --username xxxxx --password xxxxxx --table users --direct --split-by id --target-dir /user/admin/Data/Test</command>
            <file>/user/admin/Workflows/Exp2/lib/hive-site.xml#hive-site.xml</file>
            <file>/user/admin/Workflows/Exp2/lib/tez-site.xml#tez-site.xml</file>
        </sqoop>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <kill name="kill">
        <message>${wf:errorMessage(wf:lastErrorNode())}</message>
    </kill>
    <end name="end"/>
</workflow-app>

hive xml

<configuration supports_final="true">
    <property>
        <name>ambari.hive.db.schema.name</name>
        <value>hive</value>
    </property>

    <property>
        <name>hive.metastore.uris</name>
        <value>thrift://xxxxxxxx:9083</value>
    </property>

    <property>
        <name>hive.metastore.warehouse.dir</name>
        <value>/apps/hive/warehouse</value>
    </property>

    <property>
        <name>hive.zookeeper.quorum</name>
        <value>xxxxxxxx:2181,xxxxxxxx:2181</value>
    </property>

    <property>
        <name>javax.jdo.option.ConnectionDriverName</name>
        <value>com.mysql.jdbc.Driver</value>
    </property>

    <property>
        <name>javax.jdo.option.ConnectionURL</name>
        <value>jdbc:mysql://xxxxxxxxxx/hive?createDatabaseIfNotExist=true</value>
    </property>
    <property>
      <name>hadoop.bin.path</name>
      <value>/usr/hdp/2.6.5.0-292/hadoop/bin</value>
   </property>
   <property>
      <name>hadoop.config.dir</name>
      <value>/etc/hadoop/conf</value>
   </property>
</configuration>

job properties

nameNode=hdfs://xxxxxxxx:8020
jobTracker=xxxxxxxxx:8050
queueName=default
oozie.use.system.libpath=true
oozie.wf.application.path=hdfs://xxxxxxxxx:8020/user/admin/Workflows/Exp2/workflow.xml
oozie.libpath=/user/admin/Workflows/Exp2/lib/sqoop
oozie.action.sharelib.for.sqoop=sqoop
mapreduce.job.user.name=admin
user.name=admin
resourceManager=xxxxxxxx:8050

Attached is where the job gets stuck

85499-screen-shot.jpg

Kindly assist

1 REPLY 1
Highlighted

Re: Oozie Sqoop Job gets stuck at 95%

The sqoop commands from command line and the ones that will work to completion in oozie are going to be slightly different. This difference is based on container enviroment, paths, and permissions.

The only way to trouble shoot is to go into YARN UI, and click deep into the log for the containers and the application failure(s). You are specifically looking for the logs of the failed container. Be careful as there are several higher level of logs that are not always going to show the errors. You will most likely be looking in every possible place.

For my oozie / sqoop job the click through path is:

1. From workflow tab, click into the job.

2. Inspect the log tabs here.

3. Follow link to the Job into the Yarn Resource UI.

2. Next find the container that executed the job(s) and click on the link to those Logs. This can be 1 or 2 pages to click through so be sure to inspect all links into sub pages.

3. Inspect the log output at the deepest levels for additional information and usually the error you need to solve.

Once you have the actual failures, it is usually descriptive enough to direct some adjustment in the workflow. Retry the application and repeat until resolved.

Good luck, and if this answer helps, please choose ACCEPT.