Skip to content

CseRestTemplate调用postForObject报错"Can not execute sync logic in event loop." #2607

@Snowfish1994

Description

@Snowfish1994

版本:2.1.5
jdk:1.8
场景:CSE网元间请求,请求url为cse://CCOPMService/rest/operation/queryappkey/v1.0

debug报错位置:
image

其中:所使用的cseRestTemplate:
image

线程调用堆栈:
innerSyncInvoke:151, InvokerUtils (org.apache.servicecomb.core.provider.consumer)
doInvoke:244, CseClientHttpRequest (org.apache.servicecomb.provider.springmvc.reference)
invoke:234, CseClientHttpRequest (org.apache.servicecomb.provider.springmvc.reference)
execute:177, CseClientHttpRequest (org.apache.servicecomb.provider.springmvc.reference)
doExecute:776, RestTemplate (org.springframework.web.client)
execute:711, RestTemplate (org.springframework.web.client)
postForObject:82, CseRestTemplate (org.apache.servicecomb.provider.springmvc.reference)
queryFilePathInfo:117, OpmClient (com.huawei.orch.http.opm)
getAppKeyByIMSIOrCallee:181, AppData (com.huawei.orch.data.redis)
queryFilePathInfoForMixCso:143, AppData (com.huawei.orch.data.redis)
sendToCCF:1043, XModeNotifyUtil (com.huawei.orch.notify.resale)
sendCdr:1026, XModeNotifyUtil (com.huawei.orch.notify.resale)
updateNumMsg:509, XModeNotifyUtil (com.huawei.orch.notify.resale)
executeReceiveSmsScript:463, XModeNotifyUtil (com.huawei.orch.notify.resale)
doEventAfterResp:42, XModeReceiveSmsStrategy (com.huawei.orch.notify.resale)
accept:-1, 436079316 (com.huawei.orch.notify.resale.XModeReceiveSmsStrategy$$Lambda$3520)
onSuccess:54, XModeMicroCallback (com.huawei.orch.http.cse)
onSuccess:25, XModeMicroCallback (com.huawei.orch.http.cse)
onSuccess:72, ListenableFutureAdapter$1 (org.springframework.util.concurrent)
notifySuccess:76, ListenableFutureCallbackRegistry (org.springframework.util.concurrent)
success:142, ListenableFutureCallbackRegistry (org.springframework.util.concurrent)
lambda$new$0:59, CompletableToListenableFutureAdapter (org.springframework.util.concurrent)
accept:-1, 1889428700 (org.springframework.util.concurrent.CompletableToListenableFutureAdapter$$Lambda$4092)
uniWhenComplete:774, CompletableFuture (java.util.concurrent)
tryFire:750, CompletableFuture$UniWhenComplete (java.util.concurrent)
postComplete:488, CompletableFuture (java.util.concurrent)
complete:1975, CompletableFuture (java.util.concurrent)
lambda$doAsyncInvoke$0:67, CseAsyncClientHttpRequest (org.apache.servicecomb.provider.springmvc.reference.async)
handle:-1, 705070259 (org.apache.servicecomb.provider.springmvc.reference.async.CseAsyncClientHttpRequest$$Lambda$4090)
lambda$reactiveInvoke$0:196, InvokerUtils (org.apache.servicecomb.core.provider.consumer)
handle:-1, 351352310 (org.apache.servicecomb.core.provider.consumer.InvokerUtils$$Lambda$4091)
lambda$handle$0:199, LoadbalanceHandler (org.apache.servicecomb.loadbalance)
handle:-1, 1664606749 (org.apache.servicecomb.loadbalance.LoadbalanceHandler$$Lambda$3472)
complete:46, AsyncResponse (org.apache.servicecomb.swagger.invocation)
onExecutionSuccess:354, LoadbalanceHandler$3 (org.apache.servicecomb.loadbalance)
onExecutionSuccess:319, LoadbalanceHandler$3 (org.apache.servicecomb.loadbalance)
onExecutionSuccess:143, ExecutionContextListenerInvoker (com.netflix.loadbalancer.reactive)
onExecutionSuccess:131, ExecutionContextListenerInvoker (com.netflix.loadbalancer.reactive)
onNext:324, LoadBalancerCommand$3$1$1 (com.netflix.loadbalancer.reactive)
onNext:96, OnSubscribeDoOnEach$DoOnEachSubscriber (rx.internal.operators)
lambda$null$0:420, LoadbalanceHandler$4 (org.apache.servicecomb.loadbalance)
handle:-1, 265977596 (org.apache.servicecomb.loadbalance.LoadbalanceHandler$4$$Lambda$3496)
complete:46, AsyncResponse (org.apache.servicecomb.swagger.invocation)
complete:255, RestClientInvocation (org.apache.servicecomb.transport.rest.client.http)
lambda$processResponseBody$4:239, RestClientInvocation (org.apache.servicecomb.transport.rest.client.http)
run:-1, 1078965787 (org.apache.servicecomb.transport.rest.client.http.RestClientInvocation$$Lambda$3506)
execute:28, ReactiveResponseExecutor (org.apache.servicecomb.core.provider.consumer)
processResponseBody:230, RestClientInvocation (org.apache.servicecomb.transport.rest.client.http)
handle:-1, 1238004075 (org.apache.servicecomb.transport.rest.client.http.RestClientInvocation$$Lambda$3505)
notifyHandler:292, HttpClientResponseImpl$BodyHandler (io.vertx.core.http.impl)
lambda$bodyHandler$0:193, HttpClientResponseImpl (io.vertx.core.http.impl)
handle:-1, 1873713345 (io.vertx.core.http.impl.HttpClientResponseImpl$$Lambda$492)
handleEnd:248, HttpClientResponseImpl (io.vertx.core.http.impl)
lambda$beginResponse$0:484, Http1xClientConnection$StreamImpl (io.vertx.core.http.impl)
handle:-1, 1737615027 (io.vertx.core.http.impl.Http1xClientConnection$StreamImpl$$Lambda$489)
handleEvent:237, InboundBuffer (io.vertx.core.streams.impl)
write:127, InboundBuffer (io.vertx.core.streams.impl)
endResponse:503, Http1xClientConnection$StreamImpl (io.vertx.core.http.impl)
access$000:242, Http1xClientConnection$StreamImpl (io.vertx.core.http.impl)
handleResponseEnd:644, Http1xClientConnection (io.vertx.core.http.impl)
handleHttpMessage:604, Http1xClientConnection (io.vertx.core.http.impl)
handleMessage:577, Http1xClientConnection (io.vertx.core.http.impl)
handle:-1, 1345436 (io.vertx.core.net.impl.VertxHandler$$Lambda$484)
executeTask:366, ContextImpl (io.vertx.core.impl)
execute:43, EventLoopContext (io.vertx.core.impl)
executeFromIO:229, ContextImpl (io.vertx.core.impl)
channelRead:164, VertxHandler (io.vertx.core.net.impl)
invokeChannelRead:379, AbstractChannelHandlerContext (io.netty.channel)
invokeChannelRead:365, AbstractChannelHandlerContext (io.netty.channel)
fireChannelRead:357, AbstractChannelHandlerContext (io.netty.channel)
fireChannelRead:436, CombinedChannelDuplexHandler$DelegatingChannelHandlerContext (io.netty.channel)
fireChannelRead:324, ByteToMessageDecoder (io.netty.handler.codec)
channelRead:296, ByteToMessageDecoder (io.netty.handler.codec)
channelRead:251, CombinedChannelDuplexHandler (io.netty.channel)
invokeChannelRead:379, AbstractChannelHandlerContext (io.netty.channel)
invokeChannelRead:365, AbstractChannelHandlerContext (io.netty.channel)
fireChannelRead:357, AbstractChannelHandlerContext (io.netty.channel)
channelRead:286, IdleStateHandler (io.netty.handler.timeout)
invokeChannelRead:379, AbstractChannelHandlerContext (io.netty.channel)
invokeChannelRead:365, AbstractChannelHandlerContext (io.netty.channel)
fireChannelRead:357, AbstractChannelHandlerContext (io.netty.channel)
channelRead:1410, DefaultChannelPipeline$HeadContext (io.netty.channel)
invokeChannelRead:379, AbstractChannelHandlerContext (io.netty.channel)
invokeChannelRead:365, AbstractChannelHandlerContext (io.netty.channel)
fireChannelRead:919, DefaultChannelPipeline (io.netty.channel)
read:166, AbstractNioByteChannel$NioByteUnsafe (io.netty.channel.nio)
processSelectedKey:719, NioEventLoop (io.netty.channel.nio)
processSelectedKeysOptimized:655, NioEventLoop (io.netty.channel.nio)
processSelectedKeys:581, NioEventLoop (io.netty.channel.nio)
run:493, NioEventLoop (io.netty.channel.nio)
run:989, SingleThreadEventExecutor$4 (io.netty.util.concurrent)
run:74, ThreadExecutorMap$2 (io.netty.util.internal)
run:30, FastThreadLocalRunnable (io.netty.util.concurrent)
run:748, Thread (java.lang)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions