Configure and Start Apache Oozie
![]() | Note |
|---|---|
The duration of the Oozie upgrade is dependent on the amount of job history stored in ooziedb. This history must be backed up and restored during the upgrade process. Best practice when planning for upgrade is to backup ooziedb from your production oozie server and restore it to a test or development oozie server. This can help you estimate the time that will be required to upgrade Oozie during your production upgrade. |
![]() | Note |
|---|---|
The |
Upgrading Oozie is a complex process. Although the instructions are straightforward, set aside a dedicated block of time to upgrade oozie clients and servers.
Perform the following preparation steps on each oozie server host:
You must restore
oozie-site.xmlfrom your backup to the conf directory on each oozie server and client.Copy the JDBC jar from
/usr/share/javato libext-customer:Create the
/usr/hdp/2.3.4.0-<version>/oozie-server/libext-customerdirectory.cd /usr/hdp/2.3.4.0-<version>/oozie-servermkdir libext-customerGrant read/write/execute access to all users for the libext-customer directory.
chmod -R 777 /usr/hdp/2.3.4.0-<version>/oozie-server/libext-customer
Copy these files to the libext-customer directory
cp /usr/hdp/2.3.4.0-<version>/hadoop-client/lib/hadoop*lzo*.jar /usr/hdp/current/oozie-server/libext-customercp /usr/share/HDP-oozie/ext.zip /usr/hdp/2.3.4.0-<version>/oozie-server/libext-customer/Also, copy Oozie db jar in libext-customer.
If Falcon was also installed and configured before upgrade in HDP 2.2.x, then after upgrade you might also need to do the following:
cp /usr/hdp/current/falcon-server/oozie/ext/falcon-oozie-el-extension-"jar /usr/hdp/current/oozie-server/libext-customerExtract share-lib.
/usr/hdp/current/oozie/bin/oozie-setup.sh sharelib create -fs hdfs://<namenode>:8020To verify that the sharelibs extracted correctly, run the following command:
oozie admin -oozie http://<oozie server host address>:11000/oozie -shareliblistThere should be:
Available ShareLib
oozie
hive
distcp
hcatalog
sqoop
mapreduce-streaming
pig
Change the ownershop and permissions of the oozie directory:
su -l hdfs -c "hdfs dfs -chown oozie:hadoop /user/oozie"su -l hdfs -c "hdfs dfs -chmod -R 755 /user/oozie"If a previous version of Oozie was created using auto schema creation, run the following SQL query:
insert into oozie_sys (name, data) values ('db.version', '2.5');As the Oozie user (not root), run the upgrade.
su - oozie -c "/usr/hdp/current/oozie-server/bin/ooziedb.sh upgrade -run"As root, prepare the Oozie WAR file.
chown oozie:oozie /usr/hdp/current/oozie-server/oozie-server/conf/server.xmlsu - oozie -c "/usr/hdp/current/oozie-server/bin/oozie-setup.sh prepare-war -d /usr/hdp/current/oozie-server/libext-customer"Look for console output to indicate success. For example, if you are using MySQL you should see something similar to:
INFO: Adding extension: libext-customer/mysql-connector-java.jar New Oozie WAR file with added 'JARs' at /var/lib/oozie/oozie-server/webapps/oozie.war
Make sure that following property is added in oozie-log4j.properties:
log4j.appender.oozie.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - SERVER[${oozie.instance.id}] %m%nwhere ${oozie.instance.id} is determined by oozie, automatically.
If you have custom Oozie actions, you must define them in oozie-site.xml. Edit the
/etc/oozie/conf/oozie-site.xmlfile and add the following property:<property> <name>oozie.service.SchemaService.wf.ext.schemas</name> <value>[Comma seperated list of custom actions]</value> </property>For example, if you have added Spark Action, enter the following:
<property> <name>oozie.service.SchemaService.wf.ext.schemas</name> <value>spark-action-0.1.xsd</value> </property>Configure HTTPS for the Oozie server.
Create a self signed certificate or get certificate from a trusted CA for the Oozie Server
Import the certificate to the client JDK trust store on all client nodes.
In the Ambari Oozie configuration, set the following environment variables in
oozie-env.sh, adding them if it does not exist:export OOZIE_HTTPS_PORT=11443 export OOZIE_HTTPS_KEYSTORE_FILE=/home/oozie/.keystore export OOZIE_HTTPS_KEYSTORE_PASS=passwordChange
OOZIE_HTTP_PORT={{oozie_server_port}}toOOZIE_HTTP_PORT=11000.Set the
oozie.base.urlto the HTTPS address.Save the configuration, and restart the Oozie components.
Start Oozie as the Oozie user:
su - oozie -c "/usr/hdp/current/oozie-server/bin/oozie-start.sh"Check processes.
ps -ef | grep -i oozie


![[Note]](../common/images/admon/note.png)