My Profile Photo


A Thinker, Innovator, Enthusiastic Software Developer, Amateur sketch maker, Recreational Singer, Thought leader and Sometimes clumsy. :-)

20 - Installing Oozie 4.3.0 on Hadoop 2.7.3

This weekend, I tried to configure oozie 4.3.0 and wanted to do some hands on submitting hadoop jobs to oozie. While installing oozie and to make it up, I struggled a lot with errors. So I thought to blog about it.


  1. Java 1.7+
  2. Hadoop 2.x (here, 2.7.3)
  3. Maven3+
  4. Unix box

Step1: Dist file

Get oozie tar.gz file from and extract it

cd $HOME
tar -xvf oozie-4.3.0.tar.gz

Step2: Build Oozie

cd $HOME/oozie-4.3.0/bin
./ -DskipTests

Step3: Server Installation

Copy the built binaries to the home directory as ‘oozie’

cd $HOME
cp -R $HOME/oozie-4.3.0/distro/target/oozie-4.3.0-distro/oozie-4.3.0 .

Step 3.1: libext

Create libext directory inside oozie directory

 cd $HOME/oozie
 mkdir libext

Note: ExtJS (2.2+) library (optional, to enable Oozie webconsole) But, The ExtJS library is not bundled with Oozie because it uses a different license :( Now you need to put hadoop jars inside libext directory, else it will throw below error in oozie.log file

WARN ActionStartXCommand:523 - SERVER[] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161215143751620-oozie-hado-W] ACTION[0000000-161215143751620-oozie-hado-W@mr-node] Error starting action [mr-node]. ErrorType [TRANSIENT], ErrorCode [JA009], Message [JA009: Cannot initialize Cluster. Please check your configuration for and the correspond server addresses.]

So, let’s put below jars inside libext directory

cp $HADOOP_HOME/share/hadoop/common/*.jar oozie/libext/
cp $HADOOP_HOME/share/hadoop/common/lib/*.jar oozie/libext/
cp $HADOOP_HOME/share/hadoop/hdfs/*.jar oozie/libext/
cp $HADOOP_HOME/share/hadoop/hdfs/lib/*.jar oozie/libext/
cp $HADOOP_HOME/share/hadoop/mapreduce/*.jar oozie/libext/
cp $HADOOP_HOME/share/hadoop/mapreduce/lib/*.jar oozie/libext/
cp $HADOOP_HOME/share/hadoop/yarn/*.jar oozie/libext/
cp $HADOOP_HOME/share/hadoop/yarn/lib/*.jar oozie/libext/

Step 3.2: Oozie Impersonate

To avoid impersonate error on oozie, modify core-site.xml like below

<!-- OOZIE -->

Assuming, my oozie user is huser and host is localhost and group is hadoop

<!-- OOZIE -->

Note : You can use * in all values, in case of confusion

Step 3.3: Prepare the war

cd $HOME/oozie/bin
./ prepare-war

This will create oozie.war file inside oozie directory. If this war will be used further, you may face this error :

ERROR ActionStartXCommand:517 - SERVER[] USER[hadoop] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-161220104605103-oozie-hado-W] ACTION[0000000-161220104605103-oozie-hado-W@mr-node] Error, java.lang.NoSuchFieldError: HADOOP_CLASSPATH

Why? because, The oozie compilation produced Hadoop 2.6.0 jars even when specifying Hadoop 2.7.3 with the option “-Dhadoop.version=2.7.3”.

So, to avoid this error, copy the oozie.war file to a different directory

mkdir $HOME/oozie_war_dir
cp $HOME/oozie/oozie.war $HOME/oozie_war_dir
cd $HOME/oozie_war_dir
jar -xvf oozie.war
rm -f oozie.war/WEB-INF/lib/hadoop-*.jar
rm -f oozie.war/WEB-INF/lib/hive-*.jar
rm oozie.war
jar -cvf oozie.war ./*
cp oozie.war $HOME/oozie/

Then, regenerate the oozie.war binaries for oozie with a prepare-war

cd $HOME/oozie/bin
./ prepare-war

Step 3.4: Create sharelib on HDFS

cd $HOME/oozie/bin
./ sharelib create -fs hdfs://localhost:9000

Now, this sharelib set up may give you below error:

org.apache.oozie.service.ServiceException: E0104: Could not fully initialize service [org.apache.oozie.service.ShareLibService], Not able to cache sharelib. An Admin needs to install the sharelib with and issue the ‘oozie admin’ CLI command to update the sharelib

To avoid this, modify oozie-site.xml like below

cd $HOME/oozie
vi conf/oozie-site.xml

Add below property


The value should be your $HADOOP_HOME/etc/hadoop, where all hadoop configuration files are present.

Step 3.5 : Create Oozie DB

cd $HOME/oozie
./bin/ create -sqlfile oozie.sql -run

Step 3.6 : Start Daemon To start Oozie as a daemon use the following command:

./bin/ start

To stop

./bin/ stop

check logs for errors, if any

cd $HOME/oozie/logs
tail -100f oozie.log

Use the following command to check the status of Oozie from command line:

$ ./bin/oozie admin -oozie http://localhost:11000/oozie -status
System mode: NORMAL

Step 4: Client Installation

$ cd
$ cp oozie/oozie-client-4.3.0.tar.gz .
$ tar -xvf oozie-client-4.3.0.tar.gz
$ mv oozie-client-3.3.2 oozie-client
$ cd bin

Add $HOME/oozie-client/bin to PATH variable in .bashrc file and restart your terminal or do

source $HOME/.bashrc

For more details on set up, you can refer this URL

Now you can submit hadoop jobs to oozie in your terminal.

To run an example, you can follow this URL and set up your first example to run

You may face below error while running the map reduce example in above URL Call From localhost.localdomain/ to failed on connection exception: Connection refused; For more details see:



cd $HADOOP_HOME/sbin
./ start historyserver

Another point to note about modifying file is :


in your case, this can be different, as I am using apache hadoop, you may be using cloudera/hdp/anything

To run spark job, I have tried running in local[], yarn-client and yarn-cluster as master, but succeeded in local[]only

Good luck and Keep Experimenting :)