Decode rpc invocation failed: null -> DecodeableRpcInvocation

发布于:2025-05-08 ⋅ 阅读:(82) ⋅ 点赞:(0)

异常情况

记录一下Dubbo调用异常
java.util.concurrent.ExecutionException: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2025-05-07 22:09:50.595, end time: 2025-05-07 22:09:51.606, client elapsed: 1 ms, server elapsed: 1010 ms, timeout: 1000 ms, request: Request [id=38, version=2.0.2, twoWay=true, event=false, broken=false, data=null], channel: /192.168.43.1:14457 -> /192.168.43.1:20880

本来以为是RPC服务提供端查询数据库超时,然后去配置服务执行超时时间
使用注解方式(Spring Boot):

解决方法

@DubboReference(timeout = 5000)
private YourService yourService;

但是问题依旧存在

错误警告

之后看了一下服务端的控制台,有一个警告 Decode rpc invocation failed 解码调用rpc失败,这就是我之前埋下的一个坑,在写一个数据库查询返回实体类的时没有实现Serializable接口,所以反序列化异常了,

2025-05-07 22:19:09.266 WARN 29952 — [20880-thread-29] o.a.d.r.p.dubbo.DecodeableRpcInvocation : [DUBBO] Decode rpc invocation failed: null, dubbo version: 3.1.5, current host: 192.168.43.1, error code: 4-20. This may be caused by , go to https://dubbo.apache.org/faq/4/20 to find instructions.

在这里插入图片描述
其实也不是,而是我加上了,但是由于原来的jar在使用,所以maven install的时候,本地仓库旧的jar包没被替换

在这里插入图片描述

官方FAQ

解决办法控制台也给出了Dubbo的官方FAQ地址
在这里插入图片描述


网站公告

今日签到

点亮在社区的每一天
去签到