[ https://issues.apache.org/jira/browse/RANGER-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922844#comment-17922844 ]
spark edited comment on RANGER-3751 at 1/31/25 8:48 PM: -------------------------------------------------------- [~aakashnand] Does the later version of Ranger 2.5.0 fixes the toLocalDate time conversion logic incorporated for sourcing audit event timestamp field value from elasticsearch? Can confirm the bug still exists in v2.4.0 release of ranger despite the fix PR merge into master. was (Author: JIRAUSER308012): Does the later version of Ranger 2.5.0 fixes the toLocalDate time conversion logic incorporated for sourcing audit event timestamp field value from elasticsearch? Can confirm the bug still exists in v2.4.0 release of ranger despite the fix PR merge into master. > ElasticSearch Audit shows wrong date on Ranger-admin UI > ------------------------------------------------------- > > Key: RANGER-3751 > URL: https://issues.apache.org/jira/browse/RANGER-3751 > Project: Ranger > Issue Type: Bug > Components: admin, audit > Affects Versions: 3.0.0, 2.3.0 > Reporter: Aakash Nand > Priority: Major > Attachments: admin-ui-audit-screen.png > > Time Spent: 40m > Remaining Estimate: 0h > > Recently AmazonCloudWatch support was added to the audit module in this > commit. > However, this commit also changed the _toDate_ method of > _ElasticSearchAccessAuditsService.java_ because of which the event time on > the Audit screen is showing the wrong date from 1970. The error stack is as > follows: > {noformat} > 2022-05-08 07:04:22,887 [http-nio-6080-exec-6] ERROR [MiscUtil.java:938] > Error converting value to date. Value = 2022-05-08T06:42:01.621Z > java.lang.IllegalArgumentException: null > at java.base/java.util.Date.parse(Date.java:616) > at java.base/java.util.Date.<init>(Date.java:274) > at org.apache.ranger.audit.provider.MiscUtil.toDate(MiscUtil.java:936) > at > org.apache.ranger.elasticsearch.ElasticSearchAccessAuditsService.populateViewBean(ElasticSearchAccessAuditsService.java:260) > at > org.apache.ranger.elasticsearch.ElasticSearchAccessAuditsService.searchXAccessAudits(ElasticSearchAccessAuditsService.java:95) > at org.apache.ranger.biz.AssetMgr.getAccessLogs(AssetMgr.java:1139) > at org.apache.ranger.rest.AssetREST.getAccessLogs(AssetREST.java:672) > at > org.apache.ranger.rest.AssetREST$$FastClassBySpringCGLIB$$8cffcb6d.invoke(<generated>) > at > org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) > at > org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) > at > org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) > at > org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) > at > org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) > at > org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123){noformat} > > > The screenshot shows the erroneous date on ranger-admin > > Please refer: > https://github.com/apache/ranger/commit/71744d3ff8e0db7f0a49881a891e77edf0ea518d#r73132360 > -- This message was sent by Atlassian Jira (v8.20.10#820010)