Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (2)
avatar
Expert Contributor

ISSUE :

If SOLR is configured as backend storage for ranger audits, ranger audit screen shows incorrect screen. This happens if server is running on any timezone other than UTC.

ROOT CAUSE :

'ranger-admin-services.sh' script uses below command to start ranger.

nohup  java -Dproc_rangeradmin ${JAVA_OPTS} -Dlogdir=${RANGER_ADMIN_LOG_DIR} -Dcatalina.base=${XAPOLICYMGR_EWS_DIR} -cp "${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf:${XAPOLICYMGR_EWS_DIR}/lib/*:${RANGER_JAAS_LIB_DIR}/*:${RANGER_JAAS_CONF_DIR}:${JAVA_HOME}/lib/*:${RANGER_HADOOP_CONF_DIR}/*:$CLASSPATH" org.apache.ranger.server.tomcat.EmbeddedServer > ${RANGER_ADMIN_LOG_DIR}/catalina.out 2>&1 &

If JAVA_OPTS value does not contain '-Duser.timezone=UTC', then Ranger admin runs in the local timezone. This causes timezone issue in viewing audit on Ranger UI as Ranger admin doesn't return eventtime in UTC format.

RESOLUTION :

This is fixed under https://issues.apache.org/jira/browse/RANGER-1249

WORKAROUND :

1. Create a file ranger-admin-env-javaopts.sh in /usr/hdp/current/ranger-admin/conf/ on the ranger admin server

2. Add the below contents in to the file.

export JAVA_OPTS=" ${JAVA_OPTS} -Duser.timezone=UTC"

3. chown ranger:ranger /usr/hdp/current/ranger-admin/conf/ranger-admin-env-javaopts.sh

4. chmod 755 /usr/hdp/current/ranger-admin/conf/ranger-admin-env-javaopts.sh

5. Restart Ranger admin.

1,795 Views
Version history
Last update:
‎12-24-2016 05:58 PM
Updated by:
Contributors