Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockException attr DegradeRule not support Serialiazable ? #1017

Closed
maxiaolong opened this issue Aug 26, 2019 · 11 comments
Closed

BlockException attr DegradeRule not support Serialiazable ? #1017

maxiaolong opened this issue Aug 26, 2019 · 11 comments
Labels
kind/discussion For further discussion kind/enhancement Category issues or prs related to enhancement.
Milestone

Comments

@maxiaolong
Copy link

maxiaolong commented Aug 26, 2019

sentinel core 1.6.3 jar BlockException attr DegradeRule not support Serialiazable ?

when dubbo interface method blocked throws DegradeException, and dubbo monitor interface send msg to monitor server dubbo interface , throw exception :

Exception in thread "ThreadPoolTaskExecutor-37" com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method collect in the service com.alibaba.dubbo.monitor.MonitorService. Tried 1 times of the providers [10.253.7.233:20888] (1/1) from the registry zk01.soa.internal.weimobdev.com:2181 on the consumer 172.19.39.97 using the dubbo version 2.7.0-weimob-RELEASE. Last error is: Failed to invoke remote method: collect, provider: dubbo://10.253.7.233:20888/com.alibaba.dubbo.monitor.MonitorService?anyhost=true&application=weimob.soa-monitor&check=false&default.dispatcher=all&default.retries=0&default.timeout=5000&dubbo=dubbo&generic=false&interface=com.alibaba.dubbo.monitor.MonitorService&loadbalance=roundrobin&methods=lookup,collect&owner=hui.zhang01&pid=5548&provider=weimob.soa-monitor&revision=dubbo&serverApplicationName=weimob.soa-monitor&side=provider&timestamp=1566799522772, cause: Failed to send message Request [id=491, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=collect, parameterTypes=[class com.alibaba.dubbo.monitor.support.InvokeLog], arguments=[InvokeLog [globalTicket=bb4915fb991e4b63adb727eefd535ef0, monitorTrackId=null, rpcId=0.1.1.2, rpcType=DUBBO, isSuccess=0, invokeType=consumer, providerApplication=saas.ec-goods-service, providerHost=172.21.247.39, providerHostPort=20880, providerVersion=null, consumerApplication=saas.ec-navigation-web, consumerHost=172.19.39.97, consumerHostPort=0, consumerVersion=null, groupName=null, service=com.weimob.saas.ec.goods.service.goods.B2CGoodsQueryService, method=queryGoodsDetailForNavigation, elapsed=84, concurrent=1, bizData=null, input=[Ljava.lang.Object;@3aa0dd19, output=null, invokeTime=Mon Aug 26 14:08:44 CST 2019, exception=com.alibaba.csp.sentinel.slots.block.SentinelRpcException: com.alibaba.csp.sentinel.slots.block.degrade.DegradeException, returnCode=null, returnMsg=null]], attachments={async=false, path=com.alibaba.dubbo.monitor.MonitorService, application=weimob.soa-monitor, dubboApplication=weimob.soa-monitor, interface=com.alibaba.dubbo.monitor.MonitorService, version=0.0.0, timeout=5000},consumerApplicationName=null]] to /10.253.7.233:20888, cause: Serialized class com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule must implement java.io.Serializable
 Java field: protected com.alibaba.csp.sentinel.slots.block.AbstractRule com.alibaba.csp.sentinel.slots.block.BlockException.rule
 Java field: private java.lang.Throwable java.lang.Throwable.cause
 Java field: private java.lang.Exception com.alibaba.dubbo.monitor.support.InvokeLog.exception
	at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:103)
	at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:261)
	at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:80)
	at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
	at com.alibaba.dubbo.common.bytecode.proxy97.collect(proxy97.java)
	at com.alibaba.dubbo.monitor.dubbo.DubboMonitor$MornitorThread.run(DubboMonitor.java:237)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to send message Request [id=491, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=collect, parameterTypes=[class com.alibaba.dubbo.monitor.support.InvokeLog], arguments=[InvokeLog [globalTicket=bb4915fb991e4b63adb727eefd535ef0, monitorTrackId=null, rpcId=0.1.1.2, rpcType=DUBBO, isSuccess=0, invokeType=consumer, providerApplication=saas.ec-goods-service, providerHost=172.21.247.39, providerHostPort=20880, providerVersion=null, consumerApplication=saas.ec-navigation-web, consumerHost=172.19.39.97, consumerHostPort=0, consumerVersion=null, groupName=null, service=com.weimob.saas.ec.goods.service.goods.B2CGoodsQueryService, method=queryGoodsDetailForNavigation, elapsed=84, concurrent=1, bizData=null, input=[Ljava.lang.Object;@3aa0dd19, output=null, invokeTime=Mon Aug 26 14:08:44 CST 2019, exception=com.alibaba.csp.sentinel.slots.block.SentinelRpcException: com.alibaba.csp.sentinel.slots.block.degrade.DegradeException, returnCode=null, returnMsg=null]], attachments={async=false, path=com.alibaba.dubbo.monitor.MonitorService, application=weimob.soa-monitor, dubboApplication=weimob.soa-monitor, interface=com.alibaba.dubbo.monitor.MonitorService, version=0.0.0, timeout=5000},consumerApplicationName=null]] to /10.253.7.233:20888, cause: Serialized class com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule must implement java.io.Serializable
 Java field: protected com.alibaba.csp.sentinel.slots.block.AbstractRule com.alibaba.csp.sentinel.slots.block.BlockException.rule
 Java field: private java.lang.Throwable java.lang.Throwable.cause
 Java field: private java.lang.Exception com.alibaba.dubbo.monitor.support.InvokeLog.exception
	at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:108)
	at com.alibaba.dubbo.remoting.transport.AbstractClient.send(AbstractClient.java:270)
	at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:51)
	at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:112)
	at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:91)
	at com.alibaba.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.request(ReferenceCountExchangeClient.java:81)
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:96)
	at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:149)
	at com.weimob.cat.dubbo.support.CatTransactionFilter.invoke(CatTransactionFilter.java:53)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.csp.sentinel.adapter.dubbo.DubboAppContextFilter.invoke(DubboAppContextFilter.java:41)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.csp.sentinel.adapter.dubbo.SentinelDubboConsumerFilter.invoke(SentinelDubboConsumerFilter.java:62)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.weimob.dubbo.generic.utils.logger.LoggerFilter.invoke(LoggerFilter.java:22)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:103)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:53)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.weimob.cat.dubbo.support.AppNameAppendFilter.invoke(AppNameAppendFilter.java:16)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.TraceContextFilter.invoke(TraceContextFilter.java:32)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:49)
	at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
	at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74)
	at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53)
	at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:79)
	... 8 more
Caused by: java.lang.RuntimeException: Serialized class com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule must implement java.io.Serializable
 Java field: protected com.alibaba.csp.sentinel.slots.block.AbstractRule com.alibaba.csp.sentinel.slots.block.BlockException.rule
 Java field: private java.lang.Throwable java.lang.Throwable.cause
 Java field: private java.lang.Exception com.alibaba.dubbo.monitor.support.InvokeLog.exception
	at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:315)
	at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeInstance(JavaSerializer.java:263)
	at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:227)
	at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:408)
	at com.alibaba.dubbo.common.serialize.support.hessian.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:92)
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.encodeRequestData(DubboCodec.java:186)
	at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:236)
	at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:75)
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:39)
	at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:81)
	at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66)
	at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
	at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:292)
	at com.alibaba.dubbo.remoting.transport.netty.NettyHandler.writeRequested(NettyHandler.java:99)
	at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:254)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
	at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
	at org.jboss.netty.channel.Channels.write(Channels.java:704)
	at org.jboss.netty.channel.Channels.write(Channels.java:671)
	at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:348)
	at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:98)
	... 36 more
Caused by: java.lang.RuntimeException: Serialized class com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule must implement java.io.Serializable
 Java field: protected com.alibaba.csp.sentinel.slots.block.AbstractRule com.alibaba.csp.sentinel.slots.block.BlockException.rule
 Java field: private java.lang.Throwable java.lang.Throwable.cause
14:08:51 ERROR com.weimob.ec.navigation.exception.GlobalExceptionHandler (GlobalExceptionHandler.java:33)- BaseException occurred,globalTicket -> [bb4915fb991e4b63adb727eefd535ef0]
	at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:315)
	at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeInstance(JavaSerializer.java:263)
com.weimob.ec.navigation.exception.NavigationException: com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method queryGoodsDetailForNavigation in the service com.weimob.saas.ec.goods.service.goods.B2CGoodsQueryService. Tried 1 times of the providers [172.21.247.39:20880] (1/2) from the registry zk01.soa.internal.weimobdev.com:2181 on the consumer 172.19.39.97 using the dubbo version 2.7.0-weimob-RELEASE. Last error is: com.alibaba.csp.sentinel.slots.block.degrade.DegradeException
	at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:227)
	at com.weimob.ec.navigation.service.third.ThirdGoodsService.queryGoodsDetail(ThirdGoodsService.java:164) ~[classes/:?]
	at com.alibaba.com.caucho.hessian.io.ThrowableSerializer.writeObject(ThrowableSerializer.java:69)
	at com.weimob.ec.navigation.service.third.ThirdGoodsService$$FastClassBySpringCGLIB$$fc6135c0.invoke(<generated>) ~[classes/:?]
	at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:408)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:313)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	... 58 more
Caused by: java.lang.RuntimeException: Serialized class com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule must implement java.io.Serializable
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
 Java field: protected com.alibaba.csp.sentinel.slots.block.AbstractRule com.alibaba.csp.sentinel.slots.block.BlockException.rule
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:315)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeInstance(JavaSerializer.java:263)
	at com.weimob.ec.navigation.service.third.ThirdGoodsService$$EnhancerBySpringCGLIB$$5bbfb80f.queryGoodsDetail(<generated>) ~[classes/:?]
	at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:227)
	at com.weimob.ec.navigation.facade.GoodsFacadeService.queryGoodsDetail(GoodsFacadeService.java:187) ~[classes/:?]
	at com.alibaba.com.caucho.hessian.io.ThrowableSerializer.writeObject(ThrowableSerializer.java:69)
	at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:408)
	at com.weimob.ec.navigation.facade.GoodsFacadeService.getGoodsDetail(GoodsFacadeService.java:111) ~[classes/:?]
	at com.weimob.ec.navigation.facade.GoodsFacadeService$$FastClassBySpringCGLIB$$f00263d3.invoke(<generated>) ~[classes/:?]
	at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:313)
	... 63 more
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.13.RELEASE.jar:4.3.13.RELEASE]
Caused by: java.lang.IllegalStateException: Serialized class com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule must implement java.io.Serializable
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.alibaba.com.caucho.hessian.io.SerializerFactory.getDefaultSerializer(SerializerFactory.java:261)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:233)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:406)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:313)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	... 68 more
	at com.weimob.ec.navigation.facade.GoodsFacadeService$$EnhancerBySpringCGLIB$$6a5b2628.getGoodsDetail(<generated>) ~[classes/:?]
	at com.weimob.ec.navigation.controller.GoodsController.getGoodsDetailV2(GoodsController.java:93) ~[classes/:?]
	at com.weimob.ec.navigation.controller.GoodsController$$FastClassBySpringCGLIB$$97940f86.invoke(<generated>) ~[classes/:?]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) ~[spring-aop-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at com.weimob.ec.navigation.controller.GoodsController$$EnhancerBySpringCGLIB$$bdb39121.getGoodsDetailV2(<generated>) ~[classes/:?]
	at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_211]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) [servlet-api.jar:?]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [servlet-api.jar:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.42]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.42]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.42]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.42]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.42]
	at com.weimob.ec.navigation.commons.spring.NaviTraceFilter.doFilter(NaviTraceFilter.java:94) [ec-navigation-common-utils-1.0.1-SNAPSHOT.jar:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.42]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.42]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.42]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.42]
	at com.alibaba.csp.sentinel.adapter.servlet.CommonFilter.doFilter(CommonFilter.java:91) [sentinel-web-servlet-1.6.3.jar:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.42]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.42]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) [catalina.jar:8.5.42]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.42]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) [catalina.jar:8.5.42]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) [catalina.jar:8.5.42]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.42]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) [catalina.jar:8.5.42]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.42]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:8.5.42]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) [tomcat-coyote.jar:8.5.42]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.42]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808) [tomcat-coyote.jar:8.5.42]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) [tomcat-coyote.jar:8.5.42]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.42]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_211]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_211]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.42]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method queryGoodsDetailForNavigation in the service com.weimob.saas.ec.goods.service.goods.B2CGoodsQueryService. Tried 1 times of the providers [172.21.247.39:20880] (1/2) from the registry zk01.soa.internal.weimobdev.com:2181 on the consumer 172.19.39.97 using the dubbo version 2.7.0-weimob-RELEASE. Last error is: com.alibaba.csp.sentinel.slots.block.degrade.DegradeException
	at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:103) ~[dubbo-2.7.0-weimob-RELEASE.jar:2.7.0-weimob-RELEASE]
	at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:261) ~[dubbo-2.7.0-weimob-RELEASE.jar:2.7.0-weimob-RELEASE]
	at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:80) ~[dubbo-2.7.0-weimob-RELEASE.jar:2.7.0-weimob-RELEASE]
	at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52) ~[dubbo-2.7.0-weimob-RELEASE.jar:2.7.0-weimob-RELEASE]
	at com.alibaba.dubbo.common.bytecode.proxy1.queryGoodsDetailForNavigation(proxy1.java) ~[dubbo-2.7.0-weimob-RELEASE.jar:2.7.0-weimob-RELEASE]
	at com.weimob.ec.navigation.service.third.ThirdGoodsService.queryGoodsDetail(ThirdGoodsService.java:162) ~[classes/:?]
	... 75 more
Caused by: com.alibaba.csp.sentinel.slots.block.SentinelRpcException: com.alibaba.csp.sentinel.slots.block.degrade.DegradeException
Caused by: com.alibaba.csp.sentinel.slots.block.degrade.DegradeException
@linlinisme
Copy link
Collaborator

The Dubbo Serialization need to Object implement java.io.Serializable Interface. May be you can translate the Degrade Object to json string as a temporary a solved way.

@sczyh30 sczyh30 added the kind/question Category issues related to questions or problems label Aug 26, 2019
@jasonjoo2010
Copy link
Collaborator

For better separated design you'd better deal the BlockException in your integration. Because clients don't expect it and maybe don't have it be referenced.

@cdfive
Copy link
Collaborator

cdfive commented Aug 26, 2019

@linlinisme @jasonjoo2010 @sczyh30

The Dubbo Serialization need to Object implement java.io.Serializable Interface. May be you can translate the Degrade Object to json string as a temporary a solved way.

For better separated design you'd better deal the BlockException in your integration. Because clients don't expect it and maybe don't have it be referenced.

Agree with them, if have a unified way to handle BlockException, it will be better.

But considering as a common scene, how about making the DegradeRule or AbstractRule implements java.io.Serializable, for that if user didn't deal with BlockException, just using default, no serialize problem occured.

@jasonjoo2010
Copy link
Collaborator

@linlinisme @jasonjoo2010 @sczyh30

The Dubbo Serialization need to Object implement java.io.Serializable Interface. May be you can translate the Degrade Object to json string as a temporary a solved way.

For better separated design you'd better deal the BlockException in your integration. Because clients don't expect it and maybe don't have it be referenced.

Agree with them, if have a unified way to handle BlockException, it will be better.

But considering as a common scene, how about making the DegradeRule or AbstractRule implements java.io.Serializable, for that if user didn't deal with BlockException, just using default, no serialize problem occured.

But what will happen if there is no BlockException in consumer side? We should only expose common class through RPC invocation. (eg. RuntimeException) So it still need to be deal or repack.

@cdfive
Copy link
Collaborator

cdfive commented Aug 27, 2019

what will happen if there is no BlockException in consumer side?

Dubbo ExceptionFilter has handled this circumstance, it will convert BlockException to string message and wrap to RuntimeException.
If using default but throw deserialize problem, seems unfriendly.

@jasonjoo2010
Copy link
Collaborator

what will happen if there is no BlockException in consumer side?

Dubbo ExceptionFilter has handled this circumstance, it will convert BlockException to string message and wrap to RuntimeException.
If using default but throw deserialize problem, seems unfriendly.

Yelp.
Kind of acceptable thing.
But there may be too much information in BlockException I guess. We should tag the information which needn't serialize/deserialize into transient.

@cdfive
Copy link
Collaborator

cdfive commented Aug 27, 2019

But there may be too much information in BlockException I guess. We should tag the information which needn't serialize/deserialize into transient

@jasonjoo2010 Yes, it needs to be considered and provide useful information.

@jasonjoo2010
Copy link
Collaborator

But there may be too much information in BlockException I guess. We should tag the information which needn't serialize/deserialize into transient

@jasonjoo2010 Yes, it needs to be considered and provide useful information.

Totally agree. And in my opinion we can just skip the serialization of all the information which won't be required remotely.
So who will give it a shot? And is there more opinion, @linlinisme?

@linlinisme
Copy link
Collaborator

But there may be too much information in BlockException I guess. We should tag the information which needn't serialize/deserialize into transient

@jasonjoo2010 Yes, it needs to be considered and provide useful information.

Totally agree. And in my opinion we can just skip the serialization of all the information which won't be required remotely.
So who will give it a shot? And is there more opinion, @linlinisme?

It depends on what the user wants to get from the exception and what we can offer. In fact, in addition to providing which rule triggers this exception, we seem to be unable to provide other meaningful things. The exception stack here is meaningless to the user, and we have also removed it, populating it with the exception itself. So I think we might provide serialization of the rules, and then determine which serialization fields are needed for each type of rule. DegradeRule, AuthorityRule I think it has met the requirements, FlowRule, ParamFlowRule may need to be sorted out.

@wzg923
Copy link
Contributor

wzg923 commented Sep 23, 2020

#1065

@sczyh30
Copy link
Member

sczyh30 commented Jan 18, 2021

Resolved in #1794

@sczyh30 sczyh30 closed this as completed Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/discussion For further discussion kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

No branches or pull requests

6 participants