Follow

Analytics failing with "permission denied" error

Issue

Analytics is failing with:

  • AccessControlException: Permission denied: user=<user>, access=WRITE...

Cause

The cause is attempting to run the Analytics as a different user than the Spark user.

Attempting to execute Analytics with the following syntax WILL FAIL:

  • sudo /opt/interset/analytics/bin/analytics.sh /opt/interset/analytics/conf/<your_conf_file> > /opt/interset/log/analytics.log 2>&1

Resolution Steps

Executing Analytics manually

If the error above was thrown in the analytics.log when Analytics is executed manually, then it indicates that the command/syntax used was not executed as the spark user. Please follow the steps below on how to correctly execute analytics as the spark user:

  1. SSH to the MASTER (ANALYTICS) NODE as the Interset User
  2. Type in the proper command and syntax when attempting to execute Analytics:
    • sudo -H -u spark -i /opt/interset/analytics/bin/analytics.sh /opt/interset/analytics/conf/<your_conf_file> > /opt/interset/log/analytics.log 2>&1
  3. If Analytics was executed manually or a subset of analytics jobs via the scripts located in /opt/interset/analytics/bin directory, please rerun the jobs again using the following syntax:
    •  sudo -H -u spark -i /opt/interset/analytics/bin/<script_name>.sh /opt/interset/analytics/conf/<your_conf_file> 

Analytics executed via cron job

If the error above was outputted in the analytics.log when Analytics is being kicked off as a cron job, and there may be an issue with how the cron job was set. Please follow the steps below on how to modify the cronjob to execute analytics as the Spark user:

  1. SSH to the MASTER (ANALYTICS) NODE as the Interset User
  2. Type in the following to output what is currently set in crontab for the Interset User:
    • crontab -l
  3. The output should be similar to the following:
    • 0 0 * * * sudo -H -u spark -i /opt/interset/analytics/bin/analytics.sh /opt/interset/analytics/conf/interset.conf > /opt/interset/log/analytics.log 2>&1
  4. If the output is NOT similar to the above, type in the following command to edit the Interset crontab:
    • crontab -e
  5. Look for the following line that is similar to the output in step 3. Once located, type “i” to start editing the command value
  6. Edit the command value to what is outputted in step 3.
  7. Once modified, type in the following two commands to exit editing, and save/exit the file:
    • esc
    • :wq

Applies To

  • Interset 5.4.x or higher
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments