Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21956

Move es EVENTS_VIEW page provider to nuxeo-elasticsearch-audit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.10, 9.1-SNAPSHOT
    • Fix Version/s: 8.10-HF04, 9.1
    • Component/s: Audit, Elasticsearch
    • Upgrade notes:
      Hide

      The `EVENTS_VIEW` page provider definition has been moved from `org.nuxeo.admin.audit.es.contentView.contrib` to the `org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib` component (but remains the same for 8.10 backport).

      Show
      The `EVENTS_VIEW` page provider definition has been moved from `org.nuxeo.admin.audit.es.contentView.contrib` to the `org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib` component (but remains the same for 8.10 backport).
    • Sprint:
      nxGang Sprint 9.1.8, nxGang Sprint 9.1.9
    • Story Points:
      1

      Description

      It is currently defined in `nuxeo-elasticsearch-web` which is only deployed with JSF UI.

      As a direct result, when querying the Audit.QueryWithPageProvider on a server without JSF UI but with audit on es, we get the following error:

      2017-03-27 10:29:20,101 WARN  [http-bio-127.0.0.165-8080-exec-26] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] Exception in JAX-RS processing
      org.nuxeo.ecm.webengine.WebException: Failed to invoke operation: Audit.QueryWithPageProvider
      	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:133)
      	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:122)
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:87)
      	at sun.reflect.GeneratedMethodAccessor205.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ObjectOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:258)
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
      	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
      	at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.containerService(WebEngineServlet.java:178)
      	at org.nuxeo.ecm.webengine.app.jersey.WebEngineServlet.service(WebEngineServlet.java:155)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.elasticsearch.ElasticSearchFilter.doFilter(ElasticSearchFilter.java:55)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.webengine.jaxrs.session.SessionCleanupFilter.run(SessionCleanupFilter.java:50)
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.webengine.app.WebEngineFilter.doFilter(WebEngineFilter.java:92)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.webengine.jaxrs.context.RequestContextFilter.run(RequestContextFilter.java:48)
      	at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:49)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:69)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:606)
      	at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:51)
      	at org.nuxeo.ecm.platform.ui.web.auth.oauth.NuxeoOAuthFilter.doFilter(NuxeoOAuthFilter.java:122)
      	at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:49)
      	at org.nuxeo.ecm.platform.ui.web.auth.oauth2.NuxeoOAuth2Filter.doFilter(NuxeoOAuth2Filter.java:83)
      	at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:49)
      	at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:409)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:77)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:75)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)
      	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
      	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
      	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
      	at org.nuxeo.ecm.restapi.server.APIServlet.service(APIServlet.java:50)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.elasticsearch.ElasticSearchFilter.doFilter(ElasticSearchFilter.java:55)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:43)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:69)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:146)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.webdav.service.WIRequestFilter.doFilter(WIRequestFilter.java:61)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:197)
      	at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:274)
      	at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsFilter.doFilter(NuxeoCorsFilter.java:49)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:77)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:75)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.nuxeo.ecm.automation.TraceException: 
      
      ****** chain ******
      Name: Audit.QueryWithPageProvider
      Aliases: [Audit.PageProvider]
      Exception: OperationException
      Caught error: Failed to invoke operation Audit.QueryWithPageProvider with aliases [Audit.PageProvider]
      Caused by: Failed to execute phase [query_fetch], all shards failed; shardFailures {[ldpVJSP-RteMHegiUGmoqQ][nuxeo-audit][0]: RemoteTransportException[[nuxeoNode][local[1]][indices:data/read/search[phase/query+fetch]]]; nested: SearchParseException[failed to parse search source [{"from":40,"size":40,"query_binary":"ZnJvbSBMb2dFbnRyeSBsb2cgIE9SREVSIEJZIGxvZy5ldmVudERhdGUgREVTQyA="}]]; nested: ElasticsearchParseException[Failed to derive xcontent]; }
      ****** Hierarchy calls ******
      	org.nuxeo.ecm.automation.core.operations.services.AuditPageProviderOperation
      
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:238)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:121)
      	at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58)
      	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:68)
      	... 112 more
      Caused by: org.nuxeo.ecm.automation.OperationException: Failed to invoke operation Audit.QueryWithPageProvider with aliases [Audit.PageProvider]
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:189)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:130)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:214)
      	... 115 more
      Caused by: Failed to execute phase [query_fetch], all shards failed; shardFailures {[ldpVJSP-RteMHegiUGmoqQ][nuxeo-audit][0]: RemoteTransportException[[nuxeoNode][local[1]][indices:data/read/search[phase/query+fetch]]]; nested: SearchParseException[failed to parse search source [{"from":40,"size":40,"query_binary":"ZnJvbSBMb2dFbnRyeSBsb2cgIE9SREVSIEJZIGxvZy5ldmVudERhdGUgREVTQyA="}]]; nested: ElasticsearchParseException[Failed to derive xcontent]; }
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onFirstPhaseResult(AbstractSearchAsyncAction.java:206)
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction$1.onFailure(AbstractSearchAsyncAction.java:152)
      	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:46)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:855)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:833)
      	at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:387)
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:39)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	... 1 more
      Caused by: ElasticsearchParseException[Failed to derive xcontent]
      	at org.elasticsearch.common.xcontent.XContentFactory.xContent(XContentFactory.java:201)
      	at org.elasticsearch.common.xcontent.XContentFactory.xContent(XContentFactory.java:192)
      	at org.elasticsearch.search.query.QueryBinaryParseElement.parse(QueryBinaryParseElement.java:35)
      	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:838)
      	at org.elasticsearch.search.SearchService.createContext(SearchService.java:654)
      	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:620)
      	at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:463)
      	at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:392)
      	at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryFetchTransportHandler.messageReceived(SearchServiceTransportAction.java:389)
      	at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
      	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
      	at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:376)
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
      	... 3 more
      2017-03-27 10:30:00,025 ERROR [Quartz_Worker-1] [org.nuxeo.ecm.core.event.impl.EventServiceImpl] Exception during triggerEsclationRules sync listener execution, continuing to run other listeners
      org.nuxeo.ecm.platform.routing.api.exception.DocumentRouteException: Error evaluating condition: Fn.date(WorkflowVariables["end_date"]).days(1).calendar.compareTo(CurrentDate.calendar)<0
      	at org.nuxeo.ecm.platform.routing.core.impl.GraphNodeImpl.evaluateEscalationRules(GraphNodeImpl.java:868)
      	at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingEscalationServiceImpl.computeEscalationRulesToExecute(DocumentRoutingEscalationServiceImpl.java:70)
      	at org.nuxeo.ecm.platform.routing.core.listener.DocumentRoutingEscalationListener$1.run(DocumentRoutingEscalationListener.java:65)
      	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:131)
      	at org.nuxeo.ecm.platform.routing.core.listener.DocumentRoutingEscalationListener.triggerEsclationRulesExecution(DocumentRoutingEscalationListener.java:71)
      	at org.nuxeo.ecm.platform.routing.core.listener.DocumentRoutingEscalationListener.handleEvent(DocumentRoutingEscalationListener.java:51)
      	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:250)
      	at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:119)
      	at org.nuxeo.ecm.core.scheduler.EventJob.execute(EventJob.java:65)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
      

      Request is not translated to ES dialect but sent to ES backend.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: