You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/10/12 07:22:29 UTC

[GitHub] [servicecomb-java-chassis] Snowfish1994 commented on issue #2607: CseRestTemplate调用postForObject报错"Can not execute sync logic in event loop."

Snowfish1994 commented on issue #2607:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2607#issuecomment-940736321


   错误日志
   2021-10-12 15:19:58,846|ERROR|invoke failed, CCOPMService.AppControl.getApp|vert.x-eventloop-thread-3|org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:167)
   java.lang.IllegalStateException: Can not execute sync logic in event loop. 
   	at org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:151) ~[java-chassis-core-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.doInvoke(CseClientHttpRequest.java:244) ~[provider-springmvc-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.invoke(CseClientHttpRequest.java:234) ~[provider-springmvc-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.execute(CseClientHttpRequest.java:177) ~[provider-springmvc-2.1.5.jar:2.1.5]
   	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:776) ~[spring-web-5.3.4.jar:5.3.4]
   	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711) ~[spring-web-5.3.4.jar:5.3.4]
   	at org.apache.servicecomb.provider.springmvc.reference.CseRestTemplate.postForObject(CseRestTemplate.java:82) ~[provider-springmvc-2.1.5.jar:2.1.5]
   	at com.huawei.orch.http.opm.OpmClient.queryFilePathInfo(OpmClient.java:117) ~[main/:?]
   	at com.huawei.orch.data.redis.AppData.getAppKeyByIMSIOrCallee(AppData.java:181) ~[main/:?]
   	at com.huawei.orch.data.redis.AppData.queryFilePathInfoForMixCso(AppData.java:143) ~[main/:?]
   	at com.huawei.orch.notify.resale.XModeNotifyUtil.sendToCCF(XModeNotifyUtil.java:1043) ~[main/:?]
   	at com.huawei.orch.notify.resale.XModeNotifyUtil.sendCdr(XModeNotifyUtil.java:1026) ~[main/:?]
   	at com.huawei.orch.notify.resale.XModeNotifyUtil.updateNumMsg(XModeNotifyUtil.java:509) ~[main/:?]
   	at com.huawei.orch.notify.resale.XModeNotifyUtil.executeReceiveSmsScript(XModeNotifyUtil.java:463) ~[main/:?]
   	at com.huawei.orch.notify.resale.XModeReceiveSmsStrategy.doEventAfterResp(XModeReceiveSmsStrategy.java:42) ~[main/:?]
   	at com.huawei.orch.http.cse.XModeMicroCallback.onSuccess(XModeMicroCallback.java:54) ~[main/:?]
   	at com.huawei.orch.http.cse.XModeMicroCallback.onSuccess(XModeMicroCallback.java:25) ~[main/:?]
   	at org.springframework.util.concurrent.ListenableFutureAdapter$1.onSuccess(ListenableFutureAdapter.java:72) ~[spring-core-5.3.4.jar:5.3.4]
   	at org.springframework.util.concurrent.ListenableFutureCallbackRegistry.notifySuccess(ListenableFutureCallbackRegistry.java:76) ~[spring-core-5.3.4.jar:5.3.4]
   	at org.springframework.util.concurrent.ListenableFutureCallbackRegistry.success(ListenableFutureCallbackRegistry.java:142) ~[spring-core-5.3.4.jar:5.3.4]
   	at org.springframework.util.concurrent.CompletableToListenableFutureAdapter.lambda$new$0(CompletableToListenableFutureAdapter.java:59) ~[spring-core-5.3.4.jar:5.3.4]
   	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774) ~[?:1.8.0_252]
   	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750) ~[?:1.8.0_252]
   	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488) ~[?:1.8.0_252]
   	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975) ~[?:1.8.0_252]
   	at org.apache.servicecomb.provider.springmvc.reference.async.CseAsyncClientHttpRequest.lambda$doAsyncInvoke$0(CseAsyncClientHttpRequest.java:67) ~[provider-springmvc-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.core.provider.consumer.InvokerUtils.lambda$reactiveInvoke$0(InvokerUtils.java:196) ~[java-chassis-core-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.loadbalance.LoadbalanceHandler.lambda$handle$0(LoadbalanceHandler.java:199) ~[handler-loadbalance-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.swagger.invocation.AsyncResponse.complete(AsyncResponse.java:46) ~[swagger-invocation-core-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.loadbalance.LoadbalanceHandler$3.onExecutionSuccess(LoadbalanceHandler.java:354) ~[handler-loadbalance-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.loadbalance.LoadbalanceHandler$3.onExecutionSuccess(LoadbalanceHandler.java:319) ~[handler-loadbalance-2.1.5.jar:2.1.5]
   	at com.netflix.loadbalancer.reactive.ExecutionContextListenerInvoker.onExecutionSuccess(ExecutionContextListenerInvoker.java:143) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0]
   	at com.netflix.loadbalancer.reactive.ExecutionContextListenerInvoker.onExecutionSuccess(ExecutionContextListenerInvoker.java:131) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0]
   	at com.netflix.loadbalancer.reactive.LoadBalancerCommand$3$1$1.onNext(LoadBalancerCommand.java:324) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0]
   	at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onNext(OnSubscribeDoOnEach.java:96) ~[rxjava-1.3.8.jar:1.3.8]
   	at org.apache.servicecomb.loadbalance.LoadbalanceHandler$4.lambda$null$0(LoadbalanceHandler.java:420) ~[handler-loadbalance-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.swagger.invocation.AsyncResponse.complete(AsyncResponse.java:46) ~[swagger-invocation-core-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.transport.rest.client.http.RestClientInvocation.complete(RestClientInvocation.java:255) ~[transport-rest-client-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.transport.rest.client.http.RestClientInvocation.lambda$processResponseBody$4(RestClientInvocation.java:239) ~[transport-rest-client-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.core.provider.consumer.ReactiveResponseExecutor.execute(ReactiveResponseExecutor.java:28) ~[java-chassis-core-2.1.5.jar:2.1.5]
   	at org.apache.servicecomb.transport.rest.client.http.RestClientInvocation.processResponseBody(RestClientInvocation.java:230) ~[transport-rest-client-2.1.5.jar:2.1.5]
   	at io.vertx.core.http.impl.HttpClientResponseImpl$BodyHandler.notifyHandler(HttpClientResponseImpl.java:292) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.HttpClientResponseImpl.lambda$bodyHandler$0(HttpClientResponseImpl.java:193) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.HttpClientResponseImpl.handleEnd(HttpClientResponseImpl.java:248) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.lambda$beginResponse$0(Http1xClientConnection.java:484) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:237) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:127) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.endResponse(Http1xClientConnection.java:503) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.access$000(Http1xClientConnection.java:242) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.Http1xClientConnection.handleResponseEnd(Http1xClientConnection.java:644) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.Http1xClientConnection.handleHttpMessage(Http1xClientConnection.java:604) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.http.impl.Http1xClientConnection.handleMessage(Http1xClientConnection.java:577) ~[vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366) [vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43) [vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:229) [vertx-core-3.9.8.jar:3.9.8]
   	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:164) [vertx-core-3.9.8.jar:3.9.8]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) [netty-codec-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) [netty-codec-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [netty-handler-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [netty-transport-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.59.Final.jar:4.1.59.Final]
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.59.Final.jar:4.1.59.Final]
   	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
   2021-10-12 15:19:58,852|ERROR|invocation type: CONSUMER, handler chain: [org.apache.servicecomb.qps.ConsumerQpsFlowControlHandler@f1b5295, org.apache.servicecomb.loadbalance.LoadbalanceHandler@49ec5b1b, org.apache.servicecomb.core.handler.impl.TransportClientHandler@433d796a]|vert.x-eventloop-thread-3|org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:168)
   2021-10-12 15:19:58,861|WARN |slow(1000 ms) invocation, CONSUMER  CCOPMService.AppControl.getApp:
     http method: POST
     url        : /rest/operation/queryappkey/v1.0/
     server     : unknown
     status code: 490
     total      : 0.0 ms
       prepare                : 0.0 ms
       handlers request       : 0.0 ms
       client filters request : 0.0 ms
       send request           : 0.0 ms
       get connection         : 0.0 ms
       write to buf           : 0.0 ms
       wait response          : 0.0 ms
       wake consumer          : 0.0 ms
       client filters response: 0.0 ms
       handlers response      : 0.0 ms|vert.x-eventloop-thread-3|org.apache.servicecomb.core.tracing.TraceIdLogger.warn(TraceIdLogger.java:56)
   2021-10-12 15:19:58,862|ERROR|Something wrong happens during getting the AudioFilePathResponse! InvocationException: code=490;msg=CommonExceptionData [message=Unexpected consumer error, please check logs for details]
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.doCreate(ExceptionFactory.java:81)
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.convertException(ExceptionFactory.java:124)
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.convertConsumerException(ExceptionFactory.java:85)
   	at org.apache.servicecomb.swagger.invocation.Response.createConsumerFail(Response.java:178)
   	at org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:171)
   	at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.doInvoke(CseClientHttpRequest.java:244)
   	at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.invoke(CseClientHttpRequest.java:234)
   	at org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.execute(CseClientHttpRequest.java:177)
   	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:776)
   	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)|vert.x-eventloop-thread-3|com.huawei.orch.http.opm.OpmClient.queryFilePathInfo(OpmClient.java:128)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org