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

Oozie hive action errors out with Exit code 12

New Contributor

Using HDP sandbox 2.3.2 on VMWare. Trying to run very simple one line hive query using oozie.

1. Designed oozie workflow using Hue.

2. Added Hive-site as Job xml and as well as file resource.

3. Copied all lib/hive, lib/hive2 etc to /user/oozie/share/ hdfs path

4. Done few addl things as mentioned in

But my Hive action result in oozie web ui is

ERROR. When i goto see job logs as mentioned in this post -, i see status as Succeeded.

"2016-02-25 02:49:16,934 INFO  jobhistory.JobSummary ( - jobId=job_1456308349646_0117,submitTime=1456368470425,launchTime=1456368497066,firstMapTaskLaunchTime=1456368502963,firstReduceTaskLaunchTime=0,finishTime=1456368554934,resourcesPerMap=250,resourcesPerReduce=0,numMaps=1,numReduces=0,user=hue,queue=default,status=SUCCEEDED,mapSlotSeconds=51,reduceSlotSeconds=0,jobName=oozie:launcher:T\=hive:W\=FirstHueWf:A\=Iot:ID\=0000037-160224100502172-oozie-oozi-W"

Why are we getting Hive action as Failed/Killed when underlying job is completed ?

*Though underlying job says it is complete, i didnt get result of my Hive query.


@Ramanathan Ramaiyah

yarn log -applicationid job_1456308349646_0117 --> This can help you resolve the issue

New Contributor

Tried peeking at Job logs and application logs. Oozie job has 2 hive actions. First HIVE action simply creates table and loads data from another table. Here 2 jobs are being created - One as Mapreduce and one as Tez. I see both jobs getting compelted w/o any issues and even when i look in HIVE, my new table and data is there. But Oozie is not moving to next hive action and throws 12 error code. This is what i found in oozie's job logs.

2016-02-26 07:03:21,459 WARN HiveActionExecutor:523 - SERVER[] USER[hue] GROUP[-] TOKEN[] APP[FirstHueWf] JOB[0000051-160224100502172-oozie-oozi-W] ACTION[0000051-160224100502172-oozie-oozi-W@test] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [12] 2016-02-26 07:03:21,611 INFO ActionEndXCommand:520 - SERVER[] USER[hue] GROUP[-] TOKEN[] APP[FirstHueWf] JOB[0000051-160224100502172-oozie-oozi-W] ACTION[0000051-160224100502172-oozie-oozi-W@test] ERROR is considered as FAILED for SLA

I suspect oozie for some reason is not able to move to next DAG action in HDP 2.3.2.

New Contributor

Additionally i saw this Warning in Job history for 8 this the issue ?

org.apache.hadoop.mapreduce.v2.util.MRApps: cache file (mapreduce.job.cache.files) hdfs:// conflicts with cache file (mapreduce.job.cache.files) hdfs:// This will be an error in Hadoop 2


I'm almost confident it's a sharelib issue. Try to copy files that do not exist in new shareelib from old. Make backups before you do anything


Here's my sample for Pig with hcatalog. It would be the same as Hive. directory called apps/hcatalog.

Replace sharelib.for.pig with Hive

Rising Star

@Artem Ervits I have the same issue I put jdbc jar file in share lib but I still get the same error. Do you have any suggestion?


Rising Star

@Artem Ervits I updated the share lib but I still get the same error.

Rising Star

@Ramanathan Ramaiyah did you solve this issue? I get the same error recently.