Execute the following command on the Oozie server and client machines:
For RHEL/CentOS:
yum install oozie
For SLES:
zypper install oozie (if not already installed)
For Ubuntu:
apt-get install oozie
You must replace your configuration after upgrading. Copy
/etc/oozie/conf
from the template to the conf directory on each oozie server and client.Change the JDBC config to match your Oozie database. The entries to edit are:
oozie.service.JPAService.jdbc.driver oozie.service.JPAService.jdbc.url
For example, for MySQL, use:
oozie.service.JPAService.jdbc.driver = com.mysql.jdbc.Driver oozie.service.JPAService.jdbc.url = jdbc:mysql://$my_server:my_port/oozie?createDatabaseIfNotExist=true
Copy the JDBC jar to libext.
Create the
/usr/lib/oozie/libext directory
.cd /usr/lib/oozie mkdir libext
Grant read/write access to the Oozie user.
chmod -R 666 /usr/lib/oozie/libext
Copy the JDBC jar of your Oozie database to the libext directory. For example, if you are using MySQL the
mysql-connector-java.jar
is found in/usr/lib/oozie/libtool
.Copy these files libext directory
cp /usr/lib/hadoop/lib/hadoop-lzo*.jar /usr/lib/oozie/libext cp /usr/share/HDP-oozie/ext-2.2.zip /usr/lib/oozie/libext/
Extract share-lib.
cd /usr/lib/oozie tar xzvf /usr/lib/oozie//oozie-sharelib.tar.gz su -l hdfs -c "hdfs dfs -mkdir -p /user/oozie" su -l hdfs -c "hdfs dfs -copyFromLocal /usr/lib/oozie/share /user/oozie/."
You may see complaints that some files exist. This is an expected behavior.
su -l hdfs -c "hdfs dfs -chown oozie:hadoop /user/oozie" su -l hdfs -c "hdfs dfs -chmod -R 755 /user/oozie"
Run upgrade as the Oozie user. Do not run as the root user to execute this.
su $OOZIE_USER /usr/lib/oozie/bin/ooziedb.sh upgrade -run
Prepare the Oozie WAR file. Run as root:
sudo su -l oozie -c "/usr/lib/oozie/bin/oozie-setup.sh prepare-war -d /usr/lib/oozie/libext"
Look for console output to indicate success. For example, if you are using MySQL you should see something similar to:
INFO: Adding extension: libext/mysql-connector-java.jar New Oozie WAR file with added 'JARs' at /var/lib/oozie/oozie-server/webapps/oozie.war
Replace the content of
/user/oozie/share
in HDFS. On the Oozie server host:Extract the Oozie sharelib into a
tmp
folder.mkdir -p /tmp/oozie_tmp cp /usr/lib/oozie/oozie-sharelib.tar.gz /tmp/oozie_tmp cd /tmp/oozie_tmp tar xzvf oozie-sharelib.tar.gz
Back up the
/user/oozie/share
folder in HDFS and then delete it. If you have any custom files in this folder back them up separately and then add them back after the share folder is updated.su -l hdfs -c "hdfs dfs -copyToLocal /user/oozie/share /tmp/oozie_tmp/oozie_share_backup" su -l hdfs -c "hdfs dfs -rm -r /user/oozie/share"
Add the latest share libs that you extracted in step 1. After you have added the files, modify ownership and ACL.
su -l hdfs -c "hdfs dfs -copyFromLocal /tmp/oozie_tmp/share /user/oozie/." su -l hdfs -c "hdfs dfs -chown -R oozie:hadoop /user/oozie" su -l hdfs -c "hdfs dfs -chmod -R 755 /user/oozie"
Set the
oozie.service.WorkflowAppService.system.libpath
in oozie-site.xml to the right path of sharelib in hdfs.<property> <name>oozie.service.WorkflowAppService.system.libpath</name> <value>/user/$ {user.name} /share/lib</value> <description> System library path to use for workflow applications. This path is added to workflow application if their job properties sets the property 'oozie.use.system.libpath' to true. </description> </property>
Start Oozie. Run as root.
sudo su -l oozie -c "cd /grid/0/var/log/oozie; /usr/lib/oozie/bin/oozie-start.sh"
Check processes.
ps -ef | grep -i oozie