Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-103927

"IOException: can not write type" error when navigating or reindexing Workflow Metrics with remote Elasticsearch 6.5/6.8 and 7.4

    Details

      Description

      Steps to reproduce - Remote ES6.5/6.8

      1. Setup a remote Elasticsearch 6.5/6.8 with the necessary plugins and cluster name
      2. Create
        osgi/configs/com.liferay.portal.search.elasticsearch6.configuration.ElasticsearchConfiguration.config
        operationMode="REMOTE"
        
      3. Start ES6 server
      4. Start SP1 bundle
      5. Reindex
      6. Navigate to Control Panel - Workflow - Metrics

      Expected result: Metrics portlet is loaded
      Actual result: Portlet is not rendered and error is thrown in the console:

      2019-10-30 18:07:57.143 ERROR [http-nio-7210-exec-7][ExceptionMapper:31] UncategorizedExecutionException[Failed execution]; nested: IOException[can not write type [class com.liferay.portal.workflow.metrics.sla.processor.WorkfowMetricsSLAStatus]];
      UncategorizedExecutionException[Failed execution]; nested: IOException[can not write type [class com.liferay.portal.workflow.metrics.sla.processor.WorkfowMetricsSLAStatus]];
      	at org.elasticsearch.common.util.concurrent.FutureUtils.rethrowExecutionException(FutureUtils.java:97)
      	at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:62)
      	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:34)
      	at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:53)
      	at com.liferay.portal.search.elasticsearch6.internal.search.engine.adapter.search.SearchSearchRequestExecutorImpl.execute(SearchSearchRequestExecutorImpl.java:49)
      	at com.liferay.portal.search.elasticsearch6.internal.search.engine.adapter.search.ElasticsearchSearchRequestExecutor.executeSearchRequest(ElasticsearchSearchRequestExecutor.java:59)
      	at com.liferay.portal.workflow.metrics.rest.internal.resource.v1_0.ProcessResourceImpl._getSLATermsAggregationResult(ProcessResourceImpl.java:548)
      	at com.liferay.portal.workflow.metrics.rest.internal.resource.v1_0.ProcessResourceImpl._getProcesses(ProcessResourceImpl.java:426)
      	at com.liferay.portal.workflow.metrics.rest.internal.resource.v1_0.ProcessResourceImpl.getProcessesPage(ProcessResourceImpl.java:141)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
      	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:192)
      	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
      	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
      	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
      	at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
      	at com.liferay.portal.security.auth.verifier.internal.tracker.AuthVerifierFilterTracker$RemoteAccessFilter.doFilter(AuthVerifierFilterTracker.java:165)
      	at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
      	at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      	at com.liferay.portal.servlet.filters.authverifier.AuthVerifierFilter.processFilter(AuthVerifierFilter.java:198)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      	at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
      	at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
      	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)
      	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
      	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.doDispatch(HttpServiceRuntimeImpl.java:373)
      	at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at com.liferay.portal.module.framework.ModuleFrameworkServletAdapter.service(ModuleFrameworkServletAdapter.java:52)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
      	at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:268)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
      	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.io.IOException: can not write type [class com.liferay.portal.workflow.metrics.sla.processor.WorkfowMetricsSLAStatus]
      	at org.elasticsearch.common.io.stream.StreamOutput.writeGenericValue(StreamOutput.java:725)
      	at org.elasticsearch.index.query.BaseTermQueryBuilder.doWriteTo(BaseTermQueryBuilder.java:134)
      	at org.elasticsearch.index.query.AbstractQueryBuilder.writeTo(AbstractQueryBuilder.java:80)
      	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteable(StreamOutput.java:961)
      	at org.elasticsearch.index.query.AbstractQueryBuilder.writeQueries(AbstractQueryBuilder.java:264)
      	at org.elasticsearch.index.query.BoolQueryBuilder.doWriteTo(BoolQueryBuilder.java:102)
      	at org.elasticsearch.index.query.AbstractQueryBuilder.writeTo(AbstractQueryBuilder.java:80)
      	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteable(StreamOutput.java:961)
      	at org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder.doWriteTo(FilterAggregationBuilder.java:83)
      	at org.elasticsearch.search.aggregations.AbstractAggregationBuilder.writeTo(AbstractAggregationBuilder.java:69)
      	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteable(StreamOutput.java:961)
      	at org.elasticsearch.search.aggregations.AggregatorFactories$Builder.writeTo(AggregatorFactories.java:276)
      	at org.elasticsearch.search.aggregations.AbstractAggregationBuilder.writeTo(AbstractAggregationBuilder.java:67)
      	at org.elasticsearch.common.io.stream.StreamOutput.writeNamedWriteable(StreamOutput.java:961)
      	at org.elasticsearch.search.aggregations.AggregatorFactories$Builder.writeTo(AggregatorFactories.java:276)
      	at org.elasticsearch.common.io.stream.StreamOutput.writeOptionalWriteable(StreamOutput.java:819)
      	at org.elasticsearch.search.builder.SearchSourceBuilder.writeTo(SearchSourceBuilder.java:264)
      	at org.elasticsearch.common.io.stream.StreamOutput.writeOptionalWriteable(StreamOutput.java:819)
      	at org.elasticsearch.action.search.SearchRequest.writeTo(SearchRequest.java:469)
      	at org.elasticsearch.transport.TcpTransport.buildMessage(TcpTransport.java:1025)
      	at org.elasticsearch.transport.TcpTransport.sendRequestToChannel(TcpTransport.java:876)
      	at org.elasticsearch.transport.TcpTransport.access$1200(TcpTransport.java:117)
      	at org.elasticsearch.transport.TcpTransport$NodeChannels.sendRequest(TcpTransport.java:411)
      	at org.elasticsearch.transport.TransportService.sendRequestInternal(TransportService.java:657)
      	at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:572)
      	at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:560)
      	at org.elasticsearch.action.TransportActionNodeProxy.execute(TransportActionNodeProxy.java:50)
      	at org.elasticsearch.client.transport.TransportProxyClient.lambda$execute$0(TransportProxyClient.java:60)
      	at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:252)
      	at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:60)
      	at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:382)
      	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:395)
      	at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:384)
      	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:46)
      

      Steps to Reproduce - Remote Elasticsearch 7.4

      1. Setup a remote Elasticsearch 7.4 with the necessary plugins and cluster name
      2. Start DXP
      3. Stop the ES6 connector
      4. Deploy the ES7 connector
      5. Switch to remote mode
      6. Reindex

      Actual Result: Same as with ES6


      Works with the default (embedded) 6.5.0 server

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.lee Brian Lee
              Reporter:
              tibor.lipusz Tibor Lipusz
              Participants of an Issue:
              Recent user:
              Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 12 weeks, 5 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP4
                  7.2.X
                  Master