<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Oozie job is getting killed in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107296#M38142</link>
    <description>&lt;P&gt;Shell action will get executed on one of the data nodes. Have you tried executing the script there? &lt;/P&gt;&lt;P&gt;If you want to execute your script on a specific node I would look into using ssh action to ssh to the node you've succesffuly run the script on.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2016 10:44:45 GMT</pubDate>
    <dc:creator>mliem</dc:creator>
    <dc:date>2016-08-18T10:44:45Z</dc:date>
    <item>
      <title>Oozie job is getting killed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107295#M38141</link>
      <description>&lt;P&gt;I am trying to schedule a Oozie job (Shell Action). &lt;/P&gt;&lt;P&gt;But it is getting
killed by going to  &amp;lt;fail-output&amp;gt; section after  script
execution and &amp;lt;capture-output/&amp;gt; action.&lt;/P&gt;&lt;P&gt;Same job is however running
fine from example folder.&lt;/P&gt;&lt;P&gt;Below is the job.properties we are using.&lt;/P&gt;&lt;PRE&gt;nameNode=hdfs://ip-xxx-xx-xx-xx
jobTracker=ip-xxx-xx-xx-xx
queueName=default 
examplesRoot=examples 
oozie.use.system.libpath=true 
oozie.libpath=${nameNode}/user/oozie/share/lib 
oozie.wf.application.path=${nameNode}/user/${user.name}/generic/oozie_dir
myscript=myscript.sh 
myscriptPath=${oozie.wf.application.path}/myscript.sh&lt;/PRE&gt;&lt;P&gt;Below is the workflow.xml we
are using.&lt;/P&gt;&lt;PRE&gt;&amp;lt;workflow-app
xmlns="uri:oozie:workflow:0.4" name="shell-wf"&amp;gt;  &amp;lt;start
to="shell-node"/&amp;gt;  &amp;lt;action
name="shell-node"&amp;gt; 
&amp;lt;shell xmlns="uri:oozie:shell-action:0.2"&amp;gt; 
&amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt; 
&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt; 
&amp;lt;configuration&amp;gt; 
&amp;lt;property&amp;gt; 
&amp;lt;name&amp;gt;mapred.job.queue.name&amp;lt;/name&amp;gt; 
&amp;lt;value&amp;gt;${queueName}&amp;lt;/value&amp;gt; 
&amp;lt;/property&amp;gt; 
&amp;lt;/configuration&amp;gt; 
&amp;lt;!-- &amp;lt;exec&amp;gt;echo&amp;lt;/exec&amp;gt; --&amp;gt;&amp;lt;!--
 &amp;lt;argument&amp;gt;my_output='Hello'&amp;lt;/argument&amp;gt; --&amp;gt; 
&amp;lt;exec&amp;gt;${myscript}&amp;lt;/exec&amp;gt; 
&amp;lt;file&amp;gt;${myscriptPath}&amp;lt;/file&amp;gt; 
&amp;lt;capture-output/&amp;gt; 
&amp;lt;/shell&amp;gt; 
&amp;lt;ok to="check-output"/&amp;gt; 
&amp;lt;error to="fail"/&amp;gt; 
&amp;lt;/action&amp;gt; 
&amp;lt;decision name="check-output"&amp;gt; 
&amp;lt;switch&amp;gt; 
&amp;lt;case to="end"&amp;gt; 
${wf:actionData('shell-node')['my_output'] eq 'Hello'} 
&amp;lt;/case&amp;gt; 
&amp;lt;default to="fail-output"/&amp;gt; 
&amp;lt;/switch&amp;gt; 
&amp;lt;/decision&amp;gt;  &amp;lt;kill
name="fail"&amp;gt; 
&amp;lt;message&amp;gt;Shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt; 
&amp;lt;/kill&amp;gt;  &amp;lt;kill
name="fail-output"&amp;gt; 
&amp;lt;message&amp;gt;Incorrect output, expected [Hello] but was
[${wf:actionData('shell-node')['my_output']}]&amp;lt;/message&amp;gt; 
&amp;lt;/kill&amp;gt;  &amp;lt;end
name="end"/&amp;gt;&amp;lt;/workflow-app&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Aug 2016 18:00:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107295#M38141</guid>
      <dc:creator>gaurab_dawn</dc:creator>
      <dc:date>2016-08-17T18:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie job is getting killed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107296#M38142</link>
      <description>&lt;P&gt;Shell action will get executed on one of the data nodes. Have you tried executing the script there? &lt;/P&gt;&lt;P&gt;If you want to execute your script on a specific node I would look into using ssh action to ssh to the node you've succesffuly run the script on.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 10:44:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107296#M38142</guid>
      <dc:creator>mliem</dc:creator>
      <dc:date>2016-08-18T10:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie job is getting killed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107297#M38143</link>
      <description>&lt;P&gt;@ &lt;A href="https://community.hortonworks.com/users/12099/gaurabdawn.html"&gt;Gaurab D&lt;/A&gt; can you share your shell script? &lt;/P&gt;&lt;P&gt;Looks like the script has been executed but the desired output which we are comparing are not correct? &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 12:00:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107297#M38143</guid>
      <dc:creator>mramasami</dc:creator>
      <dc:date>2016-08-18T12:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie job is getting killed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107298#M38144</link>
      <description>&lt;P&gt;Hi Murali, you are right. Script was executing but output wasn't matching with the below action.&lt;/P&gt;&lt;P&gt;${wf:actionData('shell-node')['my_output'] eq 'Hello'} &lt;/P&gt;&lt;P&gt;Now, I have changed the shell script as below and oozie job has finished successfully.&lt;/P&gt;&lt;P&gt; &amp;gt;&amp;gt; echo "my_output=Hello"&lt;/P&gt;&lt;P&gt; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 13:47:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-job-is-getting-killed/m-p/107298#M38144</guid>
      <dc:creator>gaurab_dawn</dc:creator>
      <dc:date>2016-08-18T13:47:58Z</dc:date>
    </item>
  </channel>
</rss>

