Installing Oozie on ODP

To install Oozie on Acceldata's Open Source Data Platform, perform the following steps:

  1. Create Oozie users and database. Refer to Using an Existing Database with Oozie.
  2. Install Oozie from Ambari UI on the ODP cluster.
  1. Validate Oozie UI:

If the Oozie UI shows the following error in the Kerberized cluster:

{"errorMessage":"Authentication required","httpStatusCode":401}

Solution: In the Kerberized cluster, if HTTP authentication needs to be set as simple, follow these steps and restart the Oozie service:

  1. Navigate to Ambari UI.
  2. Go to Oozie > Configs > Security.
  3. Set oozie.authentication.type to simple.
  4. Restart the Oozie service.

Alternatively, if oozie.authentication.type is set to kerberos, configure your browser with the relevant keytabs to access the Oozie UI.

Enabling SSL on Oozie

For this demonstration, the default directory for saving certificates is set to /opt/security/pki. Feel free to choose any path that suits your preferences.

  1. Generate the required keystore, truststore and cert.
  2. Setup SSL using the existing jks by manually configuring the following properties in the Ambari UI > Oozie > Configs > Advanced page:

Advanced Oozie:

oozie.base.url=https://<oozie-server-hostname>:11443/oozie

Custom Oozie Site

oozie.https.enabled=true

oozie.https.keystore.file=/path/to/keystore.jks

oozie.https.keystore.pass=<password>

oozie.https.port=11443

oozie.https.truststore.file=/path/to/truststore.jks

oozie.https.truststore.pass=<password>

a. Download shell script on your oozie-server and change keystore and truststore configs as required https://github.com/acceldata-io/ce-utils/blob/main/ODP/scripts/setup_ssl_with_existing_jks.sh

b. Provide execution permissions to this bash file. chown g+x setup_ssl_with_existing_jks.sh

c. Run the bash script setup_ssl_with_existing_jks.sh

  1. Restart Oozie server from the Ambari UI.
  2. Access Oozie UI with https and on port 11443.
  1. Add the certificate to java cacerts before Oozie job run.
Bash
Copy

Running hive2 example Oozie Jobs

Prepare environment to

Note In SSL enabled Oozie, use https://<hostname>:11443/oozie/ in place of http://<hostname>:11000/oozie in the steps mentioned below:

  1. Setup sharelib.
  2. (Sharelib is readily available at /usr/odp/current/oozie-server/share).
Bash
Copy

Sample Output:

Bash
Copy
  1. Confirm hive2 example job related files:
Bash
Copy
  1. Create a text file for sample jobs:

This file is to be used by Oozie workflow for table inputs.

Bash
Copy
  1. Validate HiverServer2 JDBC connection string with show tables command.
Bash
Copy

Sample (non-kerberized cluster):

Bash
Copy

Sample (kerberized cluster):

Bash
Copy
  1. Configure workflow.xml file as per your cluster related configurations:

Sample workflow.xml file (simple auth cluster):

Bash
Copy

Sample job.properties file (kerberized cluster):

Bash
Copy
  1. Upload the examples to HDFS (Oozie takes workflow.xml from HDFS examples path or oozie.wf.application.path) and provides necessary permissions for smooth execution of jobs:
Bash
Copy
  1. Run jobs:
Bash
Copy

Troubleshooting

Note Issues reported in Oozie is mentioned in the red error callout as followed by complete log trace in code snippet from Oozie UI, Oozie logs, Yarn logs, and Yarn UI respectively.

Issue with Oozie Job [options]

The following state the issues and solutions for while executing the job run/start/suspend/kill commands:

Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server. No of retries = 4. Exception = Error while authenticating with endpoint: https://vrpmrelease1.acceldata.ce:11443/oozie/versions

Bash
Copy

Issue/Solution: In a secure or kerberized cluster, Oozie job execution requires authentication. Authenticate by using the kinit command: kinit -kt </path/to/oozie.service.keytab> <oozie.principal>, and then proceed to re-run the Oozie job command.

java.io.IOException: configuration is not specifiedat org.apache.oozie.cli.OozieCLI.getConfiguration(OozieCLI.java:857)``

Bash
Copy

Issue/Solution: Oozie encounters difficulty locating or accessing configurations or the configuration file needed for job execution. Ensure that the path to the job.properties file is accurate. Additionally, validate and assign the required user permissions to the job.properties file.

Error: E0508 : E0508: User [?] not authorized for WF job [0000001-231212184930968-oozie-oozi-W]

Bash
Copy

Issue/Solution: Oozie cannot renew an expired authentication token; therefore, it is necessary to delete the Oozie authentication token using the command rm -rf ~/.oozie-auth-token* and then rerun the command.

Issues Post Oozie Job Submission

If jobs are getting killed or stuck in an endless running state, manually check Oozie job logs using terminal.

Bash
Copy

Scan logs for any exceptions.

Sample section from logs trace:

Bash
Copy

Part A

Search external ID, identify Hadoop application ID from the given logs in oozie.log and run the below command to check error in detail.

Bash
Copy

Launcher ERROR, reason: Main Class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]

Here the error is as mentioned below:

Bash
Copy

Issue/Solution: The job was terminated as it demanded resources exceeding the maximum allocation by the YARN container. To address this, adjust the following settings: Navigate to Ambari UI > Yarn > Configs > Settings > Container and augment the Maximum Container Size (Memory). Subsequently, restart Yarn.

Launcher ERROR, reason: Main Class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]

Here the error is as mentioned below:

Bash
Copy

Issue/Solution: Oozie lacks authorization in Ranger policies for accessing the Hive warehouse in HDFS. Rectify this by establishing a policy in the Hadoop Ranger Service through the Ranger UI. Grant Oozie the necessary write permissions for the specified path. Allow time for policy synchronization and proceed to rerun the Oozie job.

Yarn UI shows application in accepted state for too long.

Bash
Copy

Issue/Solution: The scheduler faces difficulty in allocating an Application Master as the requested AM resources surpass the available AM resources. Resolve this by either adjusting the job.properties to restrict resource allocation for Oozie jobs, following the guidance on limiting memory allocation for Oozie MapReduce jobs, or by elevating the maximum resource limit for AM in YARN. In this instance, the maximum resource limit for AM was expanded. Navigate to Ambari UI > Views (Drop-down menu) > YARN Queue Manager > Maximum AM Resource and augment the percentage.

Part B

If oozie.log lacks any logs indicating an external application ID or Hadoop application ID, it suggests that Oozie might be encountering difficulties connecting to the resource manager.

SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://vrpmrelease2.acceldata.ce:10000/default;;principal=hive/_HOST@ADSRE.COM: java.net.ConnectException: Connection refused (Connection refused)

Bash
Copy

Issue/Solution: The JDBC URI or principal provided in the passed configurations is incorrect. Please verify the configurations and rerun the job.

Example 4 (i): org.apache.oozie.action.ActionExecutorException: JA006: Connection refused

Bash
Copy

Issue/Solution: Validate the ResourceManager address in the job.properties file. Upon reviewing the job.properties file, a typo was identified in the ResourceManager address. Corrected the typo and reran the example job, which executed successfully.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated