9. Upgrade Oozie

  1. 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

  2. You must replace your configuration after upgrading. Copy /etc/oozie/conf from the template to the conf directory on each oozie server and client.

  3. Change the JDBC config to match your Oozie database. The entries to edit are:


    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


    If your are upgrading from HDP to HDP, you do not need to re-install. Run the upgrade command instead:

    • For RHEL/CentOS:

      yum upgrade oozie  
    • For SLES:

      zypper upgrade oozie 
    • For Ubuntu:

      apt-get updrade oozie

  4. Copy the JDBC jar to libext.

    1. Create the /usr/lib/oozie/libext directory.

      cd /usr/lib/oozie
      mkdir libext
    2. Grant read/write/execute access to all users for the libext directory.

      chmod -R 777 /usr/lib/oozie/libext

  5. 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.

  6. 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/

  7. 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"
  8. 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
  9. 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 
  10. Replace the content of /user/oozie/share in HDFS. On the Oozie server host:

    1. 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
    2. 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"
    3. 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"
  11. Set the oozie.service.WorkflowAppService.system.libpath in oozie-site.xml to the right path of sharelib in hdfs.

      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.

  12. Start Oozie. Run as root.

    sudo su -l oozie -c "cd /grid/0/var/log/oozie; /usr/lib/oozie/bin/oozie-start.sh"
  13. Check processes.

    ps -ef | grep -i oozie

loading table of contents...