title: OOZIE:PIG job execution getting failed
body: <p>I am new to <code>OOZIE</code> and was trying to run a <code>PIG</code> script using the <code>OOZIE</code> workflow. Below is the pig script named <code>first.pig</code>:</p>
  
  <pre><code>A = LOAD '/user/jas/pigip' USING PigStorage(',');
  B = FOREACH A GENERATE $0;
  STORE B INTO '/user/jas/pigop';
  </code></pre>
  
  <p>Below is the <code>workflow.xml</code>:</p>
  
  <pre><code>&lt;workflow-app xmlns="uri:oozie:workflow:0.2" name="PIGACTION"&gt;
   &lt;start to="pig-node"/&gt;
   &lt;action name="pig-node"&gt;
      &lt;pig&gt;
          &lt;job-tracker&gt;${jobTracker}&lt;/job-tracker&gt;
          &lt;name-node&gt;${nameNode}&lt;/name-node&gt;
          &lt;script&gt;first.pig&lt;/script&gt;
      &lt;/pig&gt;
    &lt;ok to="end"/&gt;
    &lt;error to="fail"/&gt;
   &lt;/action&gt;
     &lt;kill name="fail"&gt;
     &lt;message&gt;Pig Script failed!!!&lt;/message&gt;
     &lt;/kill&gt;
     &lt;end name="end"/&gt;
  &lt;/workflow-app&gt;
  </code></pre>
  
  <p>Below is the <code>job.properties</code>:</p>
  
  <pre><code>nameNode=hdfs://localhost:8020
  jobTracker=localhost:8021
  queueName=default
  oozie.libpath=/user/oozie/shared/lib
  oozie.wf.application.path=${nameNode}/user/my/pigact
  </code></pre>
  
  <p>For running the workflow:</p>
  
  <p>1) I uploaded the <code>first.pig</code> and <code>workflow.xml</code> in the location <code>/user/my/pigact</code></p>
  
  <p>2) Input file (a simple CSV) is uploaded in the path <code>/user/jas/pigip</code></p>
  
  <p>For running the job, below is the command I used:</p>
  
  <p><code>oozie job -oozie http://localhost:11000/oozie -config job.properties -auth SIMPLE -run</code></p>
  
  <p>The job got submitted and then KILLED. below is the <code>Job Log</code>:</p>
  
  <pre><code>2016-03-02 11:35:01,463  INFO ActionStartXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@:start:] Start action [0000009-160301223816814-oozie-oozi-W@:start:] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
  2016-03-02 11:35:01,463  WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@:start:] [***0000009-160301223816814-oozie-oozi-W@:start:***]Action status=DONE
  2016-03-02 11:35:01,464  WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@:start:] [***0000009-160301223816814-oozie-oozi-W@:start:***]Action updated in DB!
  2016-03-02 11:35:01,524  INFO ActionStartXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] Start action [0000009-160301223816814-oozie-oozi-W@pig-node] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
  2016-03-02 11:35:02,411  WARN PigActionExecutor:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] credentials is null for the action
  2016-03-02 11:35:04,170  INFO PigActionExecutor:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] checking action, external ID [job_201603012236_0015] status [RUNNING]
  2016-03-02 11:35:04,293  WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] [***0000009-160301223816814-oozie-oozi-W@pig-node***]Action status=RUNNING
  2016-03-02 11:35:04,295  WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] [***0000009-160301223816814-oozie-oozi-W@pig-node***]Action updated in DB!
  2016-03-02 11:35:12,210  INFO CallbackServlet:539 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] callback for action [0000009-160301223816814-oozie-oozi-W@pig-node]
  2016-03-02 11:35:12,409  INFO PigActionExecutor:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] action completed, external ID [job_201603012236_0015]
  2016-03-02 11:35:12,434  WARN PigActionExecutor:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.PigMain], exit code [2]
  2016-03-02 11:35:12,705  INFO ActionEndXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@pig-node] ERROR is considered as FAILED for SLA
  2016-03-02 11:35:12,794  INFO ActionStartXCommand:539 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@fail] Start action [0000009-160301223816814-oozie-oozi-W@fail] with user-retry state : userRetryCount [0], userRetryMax [0], userRetryInterval [10]
  2016-03-02 11:35:12,795  WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@fail] [***0000009-160301223816814-oozie-oozi-W@fail***]Action status=DONE
  2016-03-02 11:35:12,795  WARN ActionStartXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[0000009-160301223816814-oozie-oozi-W@fail] [***0000009-160301223816814-oozie-oozi-W@fail***]Action updated in DB!
  2016-03-02 11:35:12,904  WARN CoordActionUpdateXCommand:542 - USER[training] GROUP[-] TOKEN[] APP[PIGACTION] JOB[0000009-160301223816814-oozie-oozi-W] ACTION[-] E1100: Command precondition does not hold before execution, [, coord action is null], Error Code: E1100
  </code></pre>
  
  <p>Please suggest what went wrong, I am unable to identify the issue.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Capturing the snapshots:</p>
  
  <p><a href="https://i.stack.imgur.com/Nja79.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nja79.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/79fo9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/79fo9.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ICGla.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ICGla.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/mkslJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mkslJ.png" alt="enter image description here"></a></p>
  
  <p>Console URL from the 3rd image (highlighted) is  displaying the 4th image. Please suggest.</p>
  
  <p>This is the log I got:</p>
  
  <pre><code>&gt;&gt;&gt; Invoking Pig command line now &gt;&gt;&gt;
  
  
  Run pig script using PigRunner.run() for Pig version 0.8+
  Apache Pig version 0.10.0-cdh4.1.1 (rexported) 
  compiled Oct 16 2012, 10:15:57
  
  Run pig script using PigRunner.run() for Pig version 0.8+
  1196 [main] INFO  org.apache.pig.Main  - Apache Pig version 0.10.0-cdh4.1.1 (rexported) compiled Oct 16 2012, 10:15:57
  1199 [main] INFO  org.apache.pig.Main  - Logging error messages to: /var/lib/hadoop-hdfs/cache/mapred/mapred/local/taskTracker/training/jobcache/job_201603012236_0030/attempt_201603012236_0030_m_000000_0/work/pig-job_201603012236_0030.log
  1463 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to hadoop file system at: hdfs://localhost:8020
  1472 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine  - Connecting to map-reduce job tracker at: localhost:8021
  1674 [main] ERROR org.apache.pig.tools.grunt.Grunt  - ERROR 2998: Unhandled internal error. name
  
  &lt;&lt;&lt; Invocation of Main class completed &lt;&lt;&lt;
  
  Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.PigMain], exit code [2]
  
  Oozie Launcher failed, finishing Hadoop job gracefully
  
  
  Oozie Launcher ends
  
  
  stderr logs
  
  Details at logfile: /var/lib/hadoop-hdfs/cache/mapred/mapred/local/taskTracker/training/jobcache/job_201603012236_0030/attempt_201603012236_0030_m_000000_0/work/pig-job_201603012236_0030.log
  
  Pig logfile dump:
  
  Pig Stack Trace
  ---------------
  ERROR 2998: Unhandled internal error. name
  
  java.lang.NoSuchFieldError: name
      at org.apache.pig.parser.QueryParserStringStream.&lt;init&gt;(QueryParserStringStream.java:32)
      at org.apache.pig.parser.QueryParserDriver.tokenize(QueryParserDriver.java:198)
      at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:166)
      at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1594)
      at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1545)
      at org.apache.pig.PigServer.registerQuery(PigServer.java:545)
      at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:970)
      at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
      at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:189)
      at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
      at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
      at org.apache.pig.Main.run(Main.java:430)
      at org.apache.pig.PigRunner.run(PigRunner.java:49)
      at org.apache.oozie.action.hadoop.PigMain.runPigJob(PigMain.java:282)
      at org.apache.oozie.action.hadoop.PigMain.run(PigMain.java:222)
      at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:37)
      at org.apache.oozie.action.hadoop.PigMain.main(PigMain.java:76)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:472)
      at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
      at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:393)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:327)
      at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:396)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1332)
      at org.apache.hadoop.mapred.Child.main(Child.java:262)
  ================================================================================
  Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.PigMain], exit code [2]
  </code></pre>