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/08 06:12:11 UTC

[GitHub] [servicecomb-java-chassis] YangGuanQun opened a new issue #2602: io.vertx.core.VertxException: Connection was closed

YangGuanQun opened a new issue #2602:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2602


   微服务间通过CSE调用接口出现一次490,Cse Internal Bad Request
   日志如下,原因是什么。期间被调用服务状态正常
   ``` 
   2021-10-08 01:18:05,006 ERROR [][][resourceusage-3-pusher-2][rest.client.RestTemplateService 152] Failed to execute http request. Exception: InvocationException: code=490;msg=CommonExceptionData [message=Cse Internal Bad Request]
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.doCreate(ExceptionFactory.java:79)
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.convertException(ExceptionFactory.java:124)
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.convertConsumerException(ExceptionFactory.java:83)
   	at org.apache.servicecomb.swagger.invocation.Response.createConsumerFail(Response.java:129)
   	at org.apache.servicecomb.swagger.invocation.Response.createFail(Response.java:122)
   	at org.apache.servicecomb.swagger.invocation.Response.failResp(Response.java:165)
   	at org.apache.servicecomb.bizkeeper.FallbackPolicyManager.getFallbackResponse(FallbackPolicyManager.java:44)
   	at org.apache.servicecomb.bizkeeper.BizkeeperCommand.lambda$resumeWithFallback$0(BizkeeperCommand.java:65)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
   	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
   	at rx.Observable.unsafeSubscribe(Observable.java:8666)
   	at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142)
   	at rx.internal.operators.OperatorDoOnEach$1.onError(OperatorDoOnEach.java:72)
   	at rx.internal.operators.OperatorDoOnEach$1.onError(OperatorDoOnEach.java:72)
   	at rx.observers.Subscribers$5.onError(Subscribers.java:230)
   	at com.netflix.hystrix.AbstractCommand$DeprecatedOnRunHookApplication$1.onError(AbstractCommand.java:1431)
   	at com.netflix.hystrix.AbstractCommand$ExecutionHookApplication$1.onError(AbstractCommand.java:1362)
   	at org.apache.servicecomb.bizkeeper.BizkeeperCommand.lambda$null$1(BizkeeperCommand.java:84)
   	at org.apache.servicecomb.swagger.invocation.AsyncResponse.fail(AsyncResponse.java:42)
   	at org.apache.servicecomb.transport.rest.client.http.RestClientInvocation.fail(RestClientInvocation.java:253)
   	at org.apache.servicecomb.transport.rest.client.http.RestClientInvocation.lambda$invoke$0(RestClientInvocation.java:106)
   	at io.vertx.core.http.impl.HttpClientRequestBase.handleException(HttpClientRequestBase.java:139)
   	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.handleException(Http1xClientConnection.java:515)
   	at io.vertx.core.http.impl.Http1xClientConnection.handleClosed(Http1xClientConnection.java:883)
   	at io.vertx.core.net.impl.VertxHandler.lambda$channelInactive$5(VertxHandler.java:164)
   	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
   	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
   	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:188)
   	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:180)
   	at io.vertx.core.net.impl.VertxHandler.channelInactive(VertxHandler.java:164)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
   	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelInactive(CombinedChannelDuplexHandler.java:418)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:389)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:354)
   	at io.netty.handler.codec.http.HttpClientCodec$Decoder.channelInactive(HttpClientCodec.java:311)
   	at io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:221)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
   	at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81)
   	at io.netty.handler.timeout.IdleStateHandler.channelInactive(IdleStateHandler.java:277)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:389)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:354)
   	at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1129)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
   	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
   	at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
   	at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:831)
   	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
   	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
   	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: ServiceDefinitionException Code:servicecomb.bizkeeper.fallback, Message:This is a fallback call from circuit breaker. 
    You can add fallback logic by catching this exception. 
    info: operation=CSBBillingProcessService.RestfulService.batchUsageRating.
   	at org.apache.servicecomb.bizkeeper.BizkeeperExceptionUtils.createBizkeeperException(BizkeeperExceptionUtils.java:34)
   	at org.apache.servicecomb.bizkeeper.FallbackPolicyManager.getFallbackResponse(FallbackPolicyManager.java:46)
   	... 71 more
   Caused by: InvocationException: code=490;msg=CommonExceptionData [message=Cse Internal Bad Request]
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.doCreate(ExceptionFactory.java:79)
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.convertException(ExceptionFactory.java:124)
   	at org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory.convertConsumerException(ExceptionFactory.java:83)
   	at org.apache.servicecomb.swagger.invocation.Response.createConsumerFail(Response.java:129)
   	at org.apache.servicecomb.swagger.invocation.Response.createFail(Response.java:122)
   	... 46 more
   Caused by: io.vertx.core.VertxException: Connection was closed
   2021-10-08 01:18:05,008 WARN  [][][resourceusage-3-pusher-2][jaxrs.rest.CloudMonitorTrackerRestInvoker 276] fail to send [POST] request, url [cse://CSBBillingProcessService/rest/billing/processservice/v1/batchusageevent]com.huawei.bsp.remoteservice.exception.ServiceException: {"message":"Cse Internal Bad Request"}
   ```


-- 
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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2602: io.vertx.core.VertxException: Connection was closed

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2602:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2602#issuecomment-938381594


   这类错误很常见也很普遍,原因一般比较复杂,需要尽可能多收集信息和观察来判断是否问题。 常见的可能原因有:
   1. 网络问题:网络不稳定,导致的时延增加、丢包等。 
   2. 性能问题:服务端、客户端等处理超时。
   3. 连接池管理问题:通常由于连接池客户端的保活时间和服务端的保活时间设置不恰当导致。 网络和性能问题也可能会触发。 
   
   部分由于随机故障(包括网络的随机错误、请求的不均匀、JVM线程调度和垃圾回收不及时等)导致的问题,需要业务进行手工补偿来降低问题出现的概率,特别是超时时间设置的比较短的情形。 


-- 
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