Oozie Job Error - java.io.IOException: configuration is not specified
Asked Answered
R

3

10

I have created one oozie workflow for hive script to load data in a table.

My workflow.xml contains -

<workflow-app xmlns="uri:oozie:workflow:0.4" name="Hive-Table-Insertion">
  <start to="InsertData"/>

  <action name="InsertData">
    <hive xmlns="uri:oozie:hive-action:0.4">
      <job-tracker>${jobTracker}</job-tracker>
      <name-node>${nameNode}</name-node>
      <prepare>
        <delete path="${workflowRoot}/output-data/hive"/>
        <mkdir path="${workflowRoot}/output-data"/>
      </prepare>
      <job-xml>${workflowRoot}/hive-site.xml</job-xml>
      <configuration>
        <property>
          <name>oozie.hive.defaults</name>
          <value>${workflowRoot}/hive-site.xml</value>
        </property>
      </configuration>
      <script>load_data.hql</script>
    </hive>
    <ok to="end"/>
    <error to="fail"/>
  </action>

  <kill name="fail">
    <message>Hive failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
  </kill>
  <end name="end"/>
</workflow-app>

My job.properties file contains -

nameNode=hdfs://localhost:8020
jobTracker=localhost:8021
queueName=default
workflowRoot=HiveLoadData
oozie.libpath=${nameNode}/user/oozie/share/lib
oozie.wf.application.path=${nameNode}/user/${user.name}/${workflowRoot}

When I try to submit my job using command "oozie job -oozie http://localhost:11000/oozie -config /user/oozie/HiveLoadData/job.properties -submit" I get following error,

java.io.IOException: configuration is not specified
        at org.apache.oozie.cli.OozieCLI.getConfiguration(OozieCLI.java:729)
        at org.apache.oozie.cli.OozieCLI.jobCommand(OozieCLI.java:879)
        at org.apache.oozie.cli.OozieCLI.processCommand(OozieCLI.java:604)
        at org.apache.oozie.cli.OozieCLI.run(OozieCLI.java:577)
        at org.apache.oozie.cli.OozieCLI.main(OozieCLI.java:204)
configuration is not specified
Ramos answered 25/4, 2015 at 9:51 Comment(1)
Just for information. The same error also comes when you have unwanted spaces in your job.properties file. so even if your file is placed at right location and you are seeing this error. then look for extra spaces or junk characters in your properties file. :-)Gerta
L
21

The path that you give to the -config parameter must exist on the local drive (not on HDFS). Make sure that /user/oozie/HiveLoadData/job.properties does exist - do e.g. ls /user/oozie/HiveLoadData/job.properties on the same machine where you execute the oozie job -oozie... command

Loar answered 25/4, 2015 at 10:53 Comment(0)
S
0
bin/oozie job --oozie http://node03:11000/oozie -config oozie_works/sereval-actions/job.properties -run

This is a bootable format that can be run.

Slender answered 21/2, 2019 at 11:59 Comment(0)
D
0

You could try with --config parameter:

$ oozie job --oozie http://node03:11000/oozie --run --config job.properties
Dunstable answered 30/9, 2020 at 19:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.