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]
Created 09-20-2016 07:28 AM
I'm running HDP 2.5 and are having problems with the timezone/dates for the audit records in ranger. The underlaying storage of the data is Solr. This is my setup/environment:
- My current timezone is UTC +2. - I log audit data to both HDFS and Solr - Audit data on HDFS shows the correct date - A query direct in Solr gives me dates in correct UTC time. - Ranger Admin interface / Audit shows the dates that is 2 hours into the future.
Example: Ranger Admin Audit date: 09/20/2016 09:36:29 AM
Solr query date: "evtTime": "2016-09-20T05:36:29.586Z"
HDFS Audit date: "evtTime":"2016-09-20 07:36:29.586"
My quess is that when Ranger reads the data from Solr, Solr converts the date to localtime (UTC +2), and then Ranger do the same conversion once more. Not the first system that have done this misstake.
Can anybody give me some help/pointer on where to look to fix this issue?
Created 01-24-2017 08:21 PM
I have a solution....
We had this issue, caused by this: https://issues.apache.org/jira/browse/RANGER-1249
To fix it, create a file: /etc/ranger/admin/ranger-admin-env-tz.sh
Add this:
JAVA_OPTS="$JAVA_OPTS -Duser.timezone=UTC"
Now chmod +x /etc/ranger/admin/ranger-admin-env-tz.sh
Now restart ranger admin.
I know this was asked long ago, but if this solves your problem (which it did for me), please accept the answer.
Created 09-20-2016 07:40 AM
ranger admin shows time in timezone of your local machine where you have opened the ranger ui
Created 09-20-2016 07:47 AM
@Berry Österlund Please check https://issues.apache.org/jira/browse/RANGER-798 , the patch on this JIRA should be resolving this issue.
Created 09-28-2016 09:54 AM
Yes, that looks like a valid solution. But RANGER-798 should be implemented in 0.6.0, and thats what I'm running. Will investigate this further and update with my findings.
Created 01-24-2017 08:21 PM
I have a solution....
We had this issue, caused by this: https://issues.apache.org/jira/browse/RANGER-1249
To fix it, create a file: /etc/ranger/admin/ranger-admin-env-tz.sh
Add this:
JAVA_OPTS="$JAVA_OPTS -Duser.timezone=UTC"
Now chmod +x /etc/ranger/admin/ranger-admin-env-tz.sh
Now restart ranger admin.
I know this was asked long ago, but if this solves your problem (which it did for me), please accept the answer.
Created 02-22-2017 08:37 AM
Thanks, that worked! The bug still appears in Ranger-0.6 included in HDP-2.5.3.
Created 03-01-2017 06:55 PM
This is fixed in the next maintenance version of HDP 2.5 as well as HDP 2.6 (Ranger 0.7)