Configure High Availability for Oozie

High Availability (HA) for Oozie is available starting in version 4.0.1 of Oozie. To configure HA for Oozie on your cluster, the cluster must meet the following prerequisites:
  • Your cluster must have access to a database with support for multiple concurrent connections. To prevent this database from becoming a single point of failure, the database must support HA. HA for the Oozie service works regardless of the database‚Äôs HA status. See MySQL Data Store for Oozie.
  • To prevent the ZooKeeper service from becoming a single point of failure, your cluster must have at least 3 ZooKeeper nodes. You can still configure HA for Oozie on clusters with a single ZK node.
  • Multiple nodes on the cluster must have Oozie installed according to the directions in Install Oozie.
    Note: For greater consistency of behavior on your cluster, verify that all of the Oozie servers have the same configuration.
  • A load balancer, virtual IP, or round-robin DNS set up, such as HAProxy. To prevent the load balancer from becoming a single point of failure, the load balancer must support HA.
  1. Verify that the Oozie servers are all configured to connect to the same database. Do not start Oozie.
  2. On each Oozie node, edit the oozie-site.xml file to add the following section, which changes the results in Oozie using the Zookeeper's version of the services, overriding the default implementations:
    <property>
        <name>oozie.services.ext</name>
        <value>
            org.apache.oozie.service.ZKLocksService,
            org.apache.oozie.service.ZKXLogStreamingService,
            org.apache.oozie.service.ZKJobsConcurrencyService,
            org.apache.oozie.service.ZKUUIDService
        </value>
    </property>
  3. On each Oozie node, edit the oozie-site.xml file to include a comma-separated list of the host names and ports for the ZooKeeper servers. For example:
    <property>
         <name>oozie.zookeeper.connection.string</name>
         <value>zk1:5181,zk2:5181,zk3:5181</value>
    </property>
  4. On each Oozie node, edit the oozie-site.xml file to specify the namespace. Each Oozie server that communicates to other Oozie servers must use the same namespace:
    <property>
         <name>oozie.zookeeper.namespace</name>
         <value>oozie</value>
    </property>
  5. In Oozie 4.2.0-1510, you cannot use the default shared libs directory. Therefore, on each Oozie node, edit the oozie-site.xml file to specify a custom shared libs directory. For example:
    <property>
            <name>oozie.service.WorkflowAppService.system.libpath</name>
            <value>/oozie/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>
  6. On each Oozie node, change the value of the OOZIE_BASE_URL property in the oozie-env.sh file to the address of the load balancer or virtual IP.
    export OOZIE_BASE_URL="http://my.loadbalancer.hostname:11000/oozie"
  7. (Optional) On each Oozie node, change the value of the OOZIE_INSTANCE_ID property in the oozie-env.sh file to make the instance ID of each Oozie server unique. The default value for this property is ${OOZIE_HTTP_HOSTNAME}.
    export OOZIE_INSTANCE_ID="${OOZIE_HTTP_HOSTNAME}"
  8. Start the Oozie server. See Starting and Stopping Oozie Services.