Support Questions

Find answers, ask questions, and share your expertise

Could not submit Oozie workflow with distcp-action

avatar
Expert Contributor

Hi,

I am trying to submit Oozie workflow with distcp-action but getting below error when I validate the workflow

oozie validate pdr-distcp-wf.xml Error: Invalid app definition, org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 20; cvc-complex-type.2.4.a: Invalid content was found starting with element 'configuration'. One of '{"uri:oozie:distcp-action:0.2":arg}' is expected.

Please find the workflow that I am using below....

<workflow-app xmlns="uri:oozie:workflow:0.2" name="pdr-distcp-wf">
 <start to="distcp-node"/>
  <action name="distcp-node">
   <distcp xmlns="uri:oozie:distcp-action:0.2">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode1}</name-node>
            <arg>${SourceDir}</arg>
            <arg>${TargetDir}</arg>
    <configuration>
     <property>
       <name>oozie.launcher.mapreduce.job.hdfs-servers</name>
       <value>${nameNode1},${nameNode2}</value>
     </property>
   </configuration>
  </distcp>
   <ok to="end"/>
   <error to="kill"/>
 </action>
  <kill name="kill">
      <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
  </kill>
  <end name="end"/>
</workflow-app>

Please help me out

1 ACCEPTED SOLUTION

avatar
Master Mentor
11 REPLIES 11

avatar
Master Mentor

@Venkata Sridhar Gangavarapu you're welcome, please choose the answer that was most relevant and mark as accepted.

avatar
Contributor

Hi Venkat,

The problem is here you declared args parameter before the configuration you should declare the args after the configuration it won't give you an error. I tested it it's working fine.

<workflow-app xmlns="uri:oozie:workflow:0.2" name="pdr-distcp-wf">

<start to="distcp-node"/>

<action name="distcp-node">

<distcp xmlns="uri:oozie:distcp-action:0.2">

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

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

<configuration>

<property>

<name>oozie.launcher.mapreduce.job.hdfs-servers</name>

<value>${nameNode1},${nameNode2}</value>

</property>

</configuration>

<arg>${SourceDir}</arg>

<arg>${TargetDir}</arg>

</distcp>

<ok to="end"/>

<error to="kill"/>

</action>

<kill name="kill">

<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>

</kill>

<end name="end"/>

</workflow-app>