Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

CDH 5.1.2. Oozie cannot initialize cluster error JA009

avatar
New Contributor

I have installed CDH 5.1.2 using cloudera manager. Have configured for YARN. When I submit an oozie job I am getting the below error

 

JA009: Cannot initialize Cluster. Please check your configuration for mapreduce.frameworl k.name and the correspond server addresses.

 

I have checked the configuration files.. oozie-default.xml,oozie-site.xml,core-site.xml and everywhere the mapreduce.framework.name property is set to 'yarn'. Also set HADOOP_MAPRED_HOME=/opt/cloudera/parcels/CDH-5.2.0-1.cdh5.2.0.p0.36/lib/hadoop-mapreduce

 

Nothing has helped so far. 

 

I am able to submit YARN jobs from other clients such as hive,sqoop,pig etc.

 

Kindly help. Thanks.

1 ACCEPTED SOLUTION

avatar
Contributor

Never mind. Issue got resolved. I thought I would post the job.properties and workflow.xml so that anyone else having this issue can refer here:

 

workflow.xml:

 

<workflow-app xmlns="uri:oozie:workflow:0.4" name="oozie-wf">
<start to="sqoop-wf1"/>
<action name="sqoop-wf1">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<command>import --connect jdbc:mysql://localhost/nosql --table forHive --username root --password test123 --m 1 --target-dir /user/kabeer/001</command>
<archive>/tmp/mysql-connector-java-5.1.33-bin.jar#mysql-connector-java-5.1.33-bin.jar</archive>
</sqoop>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Failed, Error Message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>

 

 

Job.properties:

 

nameNode=hdfs://localhost:8020
job-tracker=localhost:8032
jobTracker=localhost:8032
queueName=default
weatherRoot=oozie
#mapreduce.jobtracker.kerberos.principal=foo
#dfs.namenode.kerberos.principal=foo
oozie.libpath=${nameNode}/user/oozie/share/lib/lib_20150226170905
# oozie.wf.application.path=${nameNode}/user/${user.name}/${weatherRoot}
oozie.wf.application.path=${nameNode}/user/kabeer/${weatherRoot}
outputDir=sqoop-output
oozie.use.system.libpath=true

View solution in original post

4 REPLIES 4

avatar
Mentor
Its more than likely that Oozie is still running with MR1 config-set even though it has YARN libraries in it properly.

What MapReduce Service is associated as a dependency under CM -> Oozie -> Configuration? Make sure it is set to YARN, and restart your Oozie service. Does that help?

avatar
Contributor

Hi Harsh

 

I am facing similar issue with cdh 5.2.0. I have ensured that everything points to YARN in mapred-site.xml and that oozie-site.xml is pointing to the right configuration files of hadoop.conf.

 

Please let me know of any solution that you would have come across for this issue. Below are the configuration files that I have been using.

 

Thanks,

Kabeer.

 

job.properties:

 

nameNode=hdfs://localhost:8020
job-tracker=localhost:8032
jobTracker=localhost:8032
queueName=default
weatherRoot=oozie
#mapreduce.jobtracker.kerberos.principal=foo
#dfs.namenode.kerberos.principal=foo
oozie.libpath=${nameNode}/user/oozie/share/lib
oozie.wf.application.path=${nameNode}/user/${user.name}/${weatherRoot}
outputDir=weather-ooze

 

workflow.xml

 

<workflow-app xmlns="uri:oozie:workflow:0.4" name="oozie-wf">
<start to="sqoop-wf1"/>
<action name="sqoop-wf1">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>localhost:8032</job-tracker>
<name-node>localhost:8020</name-node>
<command>import --connect jdbc:mysql://localhost/employees --table forHive --username root --password test123 --m 1 </command>
</sqoop>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Failed, Error Message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>

avatar
Contributor

Never mind. Issue got resolved. I thought I would post the job.properties and workflow.xml so that anyone else having this issue can refer here:

 

workflow.xml:

 

<workflow-app xmlns="uri:oozie:workflow:0.4" name="oozie-wf">
<start to="sqoop-wf1"/>
<action name="sqoop-wf1">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<command>import --connect jdbc:mysql://localhost/nosql --table forHive --username root --password test123 --m 1 --target-dir /user/kabeer/001</command>
<archive>/tmp/mysql-connector-java-5.1.33-bin.jar#mysql-connector-java-5.1.33-bin.jar</archive>
</sqoop>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Failed, Error Message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>

 

 

Job.properties:

 

nameNode=hdfs://localhost:8020
job-tracker=localhost:8032
jobTracker=localhost:8032
queueName=default
weatherRoot=oozie
#mapreduce.jobtracker.kerberos.principal=foo
#dfs.namenode.kerberos.principal=foo
oozie.libpath=${nameNode}/user/oozie/share/lib/lib_20150226170905
# oozie.wf.application.path=${nameNode}/user/${user.name}/${weatherRoot}
oozie.wf.application.path=${nameNode}/user/kabeer/${weatherRoot}
outputDir=sqoop-output
oozie.use.system.libpath=true

avatar
Explorer
Had similar issue got resolved
Error
------
I had like this in workflow.xml
<job-tracker>localhost:8032</job-tracker>
<name-node>localhost:8020</name-node>

Changed it to the following
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>