You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "beastqin (via GitHub)" <gi...@apache.org> on 2023/06/30 07:32:52 UTC

[GitHub] [dubbo] beastqin opened a new issue, #12632: triple 协议 stub 调用无法捕获自定义异常甚至 RpcException

beastqin opened a new issue, #12632:
URL: https://github.com/apache/dubbo/issues/12632

   version:dubbo 3.2.2
   现象:使用 triple 协议 + IDL(protobuf stub),provider 端抛出`RpcException` 后,consumer 端无法捕获具体的 `code`,统一为Unknown,同理自定义异常也被处理为 Unknow RpcException。
   
   Provider 端异常抛出代码:
   ```java
      @Override
       public ListFollowersResponse listFollowers(ListFollowersOptions request) {
           throw new RpcException(BIZ_EXCEPTION, "test exception");
       }
   ```
   Consumer 端日志打印:debug get rpc ex: org.apache.dubbo.rpc.StatusRpcException: UNKNOWN : test exception
   
   因为比较疑惑,Dubbo 3.2.0 版本开始 Triple 协议支持回传自定义异常,所以扒了下原因:
   ```java
               if (hasStub) {
                   listener = new StubAbstractServerCall(invoker, TripleServerStream.this,
                       frameworkModel,
                       acceptEncoding, serviceName, originalMethodName, executor);
               } else {
                   listener = new ReflectionAbstractServerCall(invoker, TripleServerStream.this,
                       frameworkModel, acceptEncoding, serviceName, originalMethodName, filters,
                       executor);
               }
   ```
   看上去 TripleServerStream 在存在 stub 被调用时,会选用默认关闭 Exception Wrapper 的序列化选项的 StubAbstractServerCall。
   所以,使用 IDL 调用是无法处理自定义异常吗?以及标准的 RpcException 的处理似乎也有问题。后续会解决这个问题吗?


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ closed issue #12632: triple 协议 stub 调用无法捕获自定义异常甚至 RpcException

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #12632: triple 协议 stub 调用无法捕获自定义异常甚至 RpcException
URL: https://github.com/apache/dubbo/issues/12632


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] icodening commented on issue #12632: triple 协议 stub 调用无法捕获自定义异常甚至 RpcException

Posted by "icodening (via GitHub)" <gi...@apache.org>.
icodening commented on issue #12632:
URL: https://github.com/apache/dubbo/issues/12632#issuecomment-1618316047

   @beastqin 可以尝试使用`3.2.3`,相关PR https://github.com/apache/dubbo/pull/12446


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #12632: triple 协议 stub 调用无法捕获自定义异常甚至 RpcException

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12632:
URL: https://github.com/apache/dubbo/issues/12632#issuecomment-1617125571

   @EarthChen @icodening PTAL


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] deific commented on issue #12632: triple 协议 stub 调用无法捕获自定义异常甚至 RpcException

Posted by "deific (via GitHub)" <gi...@apache.org>.
deific commented on issue #12632:
URL: https://github.com/apache/dubbo/issues/12632#issuecomment-1619657981

   我也遇到这个问题,使用3.2.3也不行,会报超时异常。
   `2023-07-04 15:13:43.305  WARN 11230 --- [imeout-thread-1] o.a.dubbo.common.timer.HashedWheelTimer  :  [DUBBO] An exception was thrown by TimerTask., dubbo version: 3.2.3, current host: 192.168.1.24, error code: 0-19. This may be caused by , go to https://dubbo.apache.org/faq/0/19 to find instructions. 
   
   java.util.concurrent.RejectedExecutionException: null
   	at org.apache.dubbo.common.threadpool.ThreadlessExecutor.execute(ThreadlessExecutor.java:101) ~[dubbo-3.2.3.jar:3.2.3]
   	at org.apache.dubbo.rpc.protocol.tri.DeadlineFuture$TimeoutCheckTask.run(DeadlineFuture.java:153) ~[dubbo-3.2.3.jar:3.2.3]
   	at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:653) ~[dubbo-3.2.3.jar:3.2.3]
   	at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:732) ~[dubbo-3.2.3.jar:3.2.3]
   	at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:454) ~[dubbo-3.2.3.jar:3.2.3]
   	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]`


-- 
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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org