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/03/04 03:23:53 UTC

[GitHub] [servicecomb-java-chassis] Hoysun opened a new issue #2274: provider指定服务限流策略从全局配置删除时,provider抛出异常,后续consumer请求全部异常

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


   consumer handler:
     handler:
       chain:
         Consumer:
           default: loadbalance,bizkeeper-consumer,qps-flowcontrol-consumer,fault-injection-consumer,governance-consumer
   
   provider handler:
     handler:
       chain:
         Provider:
           default: qps-flowcontrol-provider,governance-provider
   
   连接一代引擎:
   servicecomb:
     codec:
       printErrorMessage: true
     service:
       registry:
         address: ${sc}
     config:
       client:
         serverUri: ${cc}
         refreshMode: 1
         refresh_interval: 1000
       ignoreResolveFailure: true
   
   console界面全局配置下发指定服务的限流策略:
   servicecomb.flowcontrol.Provider.qps.limit.XXX:1
   
   consumer请求provider限流正常触发
   console直接删除上面的全局配置
   
   provider直接报出异常
   2021-03-04 11:18:54,418 [INFO] Qps limit updated, configKey = [AutoConsumer], value = [null] org.apache.servicecomb.qps.QpsControllerManager.lambda$createQpsControllerIfNotExist$2(QpsControllerManager.java:188)
   2021-03-04 11:18:54,421 [ERROR] Error in DynamicProperty callback com.netflix.config.DynamicProperty.notifyCallbacks(DynamicProperty.java:528)
   java.lang.NullPointerException
   	at java.util.concurrent.ConcurrentHashMap$MapEntry.setValue(ConcurrentHashMap.java:3500)
   	at org.apache.servicecomb.qps.QpsControllerManager.updateObjMap(QpsControllerManager.java:207)
   	at org.apache.servicecomb.qps.QpsControllerManager.lambda$createQpsControllerIfNotExist$2(QpsControllerManager.java:190)
   	at com.netflix.config.DynamicProperty.notifyCallbacks(DynamicProperty.java:526)
   	at com.netflix.config.DynamicProperty.updateProperty(DynamicProperty.java:591)
   	at com.netflix.config.DynamicProperty.access$600(DynamicProperty.java:59)
   	at com.netflix.config.DynamicProperty$DynamicPropertyListener.clearProperty(DynamicProperty.java:647)
   	at com.netflix.config.ExpandedConfigurationListenerAdapter.configurationChanged(ExpandedConfigurationListenerAdapter.java:119)
   	at com.netflix.config.ConcurrentMapConfiguration.fireEvent(ConcurrentMapConfiguration.java:312)
   	at com.netflix.config.ConcurrentCompositeConfiguration$1.configurationChanged(ConcurrentCompositeConfiguration.java:160)
   	at com.netflix.config.ConcurrentMapConfiguration.fireEvent(ConcurrentMapConfiguration.java:312)
   	at org.apache.commons.configuration.AbstractConfiguration.clearProperty(AbstractConfiguration.java:506)
   	at com.netflix.config.DynamicPropertyUpdater.deleteProperty(DynamicPropertyUpdater.java:169)
   	at com.netflix.config.DynamicPropertyUpdater.updateProperties(DynamicPropertyUpdater.java:104)
   	at com.netflix.config.DynamicWatchedConfiguration.updateConfiguration(DynamicWatchedConfiguration.java:83)
   	at org.apache.servicecomb.config.archaius.sources.ConfigCenterConfigurationSourceImpl.updateConfiguration(ConfigCenterConfigurationSourceImpl.java:107)
   	at org.apache.servicecomb.config.archaius.sources.ConfigCenterConfigurationSourceImpl.access$100(ConfigCenterConfigurationSourceImpl.java:45)
   	at org.apache.servicecomb.config.archaius.sources.ConfigCenterConfigurationSourceImpl$UpdateHandler.handle(ConfigCenterConfigurationSourceImpl.java:141)
   	at org.apache.servicecomb.config.client.ParseConfigUtils.notifyItemsChangedNeedRefresh(ParseConfigUtils.java:164)
   	at org.apache.servicecomb.config.client.ParseConfigUtils.doRefreshItems(ParseConfigUtils.java:130)
   	at org.apache.servicecomb.config.client.ParseConfigUtils.refreshConfigItems(ParseConfigUtils.java:89)
   	at org.apache.servicecomb.config.client.ConfigCenterClient$ConfigRefresh.lambda$null$7(ConfigCenterClient.java:326)
   	at io.vertx.core.http.impl.HttpClientResponseImpl$BodyHandler.notifyHandler(HttpClientResponseImpl.java:292)
   	at io.vertx.core.http.impl.HttpClientResponseImpl.lambda$bodyHandler$0(HttpClientResponseImpl.java:193)
   	at io.vertx.core.http.impl.HttpClientResponseImpl.handleEnd(HttpClientResponseImpl.java:248)
   	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.lambda$beginResponse$0(Http1xClientConnection.java:483)
   	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:237)
   	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:127)
   	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.endResponse(Http1xClientConnection.java:502)
   	at io.vertx.core.http.impl.Http1xClientConnection$StreamImpl.access$000(Http1xClientConnection.java:241)
   	at io.vertx.core.http.impl.Http1xClientConnection.handleResponseEnd(Http1xClientConnection.java:641)
   	at io.vertx.core.http.impl.Http1xClientConnection.handleHttpMessage(Http1xClientConnection.java:601)
   	at io.vertx.core.http.impl.Http1xClientConnection.handleMessage(Http1xClientConnection.java:575)
   	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
   	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
   	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:229)
   	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:163)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
   	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
   	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1486)
   	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1235)
   	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1282)
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:498)
   	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
   	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
   	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)
   2021-03-04 11:18:54,426 [INFO] Config value cache changed: action:delete; item:[servicecomb.flowcontrol.Provider.qps.limit.AutoConsumer] org.apache.servicecomb.config.archaius.sources.ConfigCenterConfigurationSourceImpl$UpdateHandler.handle(ConfigCenterConfigurationSourceImpl.java:148)
   2021-03-04 11:18:54,426 [INFO] Updating remote config is done. revision has changed from default12482 to default org.apache.servicecomb.config.client.ParseConfigUtils.refreshConfigItems(ParseConfigUtils.java:91)
   
   consumer继续请求,provider抛异常
   2021-03-04 11:23:17,258 [ERROR] failed to execute ProviderQpsFlowControlHandler org.apache.servicecomb.common.rest.AbstractRestInvocation.checkQpsFlowControl(AbstractRestInvocation.java:187)
   java.lang.IllegalStateException: should not happen
   	at org.apache.servicecomb.qps.strategy.FixedWindowStrategy.isLimitNewRequest(FixedWindowStrategy.java:39)
   	at org.apache.servicecomb.qps.ProviderQpsFlowControlHandler.isLimitNewRequest(ProviderQpsFlowControlHandler.java:51)
   	at org.apache.servicecomb.qps.ProviderQpsFlowControlHandler.handle(ProviderQpsFlowControlHandler.java:47)
   	at org.apache.servicecomb.common.rest.AbstractRestInvocation.checkQpsFlowControl(AbstractRestInvocation.java:181)
   	at org.apache.servicecomb.common.rest.AbstractRestInvocation.scheduleInvocation(AbstractRestInvocation.java:141)
   	at org.apache.servicecomb.common.rest.RestProducerInvocation.invoke(RestProducerInvocation.java:52)
   	at org.apache.servicecomb.transport.rest.vertx.VertxRestDispatcher.onRequest(VertxRestDispatcher.java:219)
   	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1036)
   	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:131)
   	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
   	at org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.doEnd(RestBodyHandler.java:343)
   	at org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.end(RestBodyHandler.java:324)
   	at org.apache.servicecomb.transport.rest.vertx.RestBodyHandler.lambda$handle$0(RestBodyHandler.java:115)
   	at io.vertx.core.http.impl.HttpServerRequestImpl.onEnd(HttpServerRequestImpl.java:523)
   	at io.vertx.core.http.impl.HttpServerRequestImpl.handleEnd(HttpServerRequestImpl.java:509)
   	at io.vertx.core.http.impl.Http1xServerConnection.handleEnd(Http1xServerConnection.java:176)
   	at io.vertx.core.http.impl.Http1xServerConnection.handleContent(Http1xServerConnection.java:163)
   	at io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:140)
   	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
   	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
   	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:229)
   	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:163)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
   	at io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.channelRead(WebSocketServerExtensionHandler.java:101)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.vertx.core.http.impl.Http1xOrH2CHandler.end(Http1xOrH2CHandler.java:61)
   	at io.vertx.core.http.impl.Http1xOrH2CHandler.channelRead(Http1xOrH2CHandler.java:38)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
   	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
   	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)
   
   


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

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



[GitHub] [servicecomb-java-chassis] liubao68 closed issue #2274: provider指定服务限流策略从全局配置删除时,provider抛出异常,后续consumer请求全部异常

Posted by GitBox <gi...@apache.org>.
liubao68 closed issue #2274:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2274


   


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

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



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2274: provider指定服务限流策略从全局配置删除时,provider抛出异常,后续consumer请求全部异常

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


   Fixed in https://github.com/apache/servicecomb-java-chassis/pull/2287, 2.3.0


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

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