问题处理:nested exception is com.alibaba.dubbo.rpc.RpcException: Failed t o invoke the method findPage

调用后台接口时,代码报了下错误:

严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed t
o invoke the method findPage in the service com.service.BrandService. Tried 3 times of the providers [172.16.94.115:20881] (1/1) from the registry 192.168.25.129:2181 on the consum
er 172.16.94.115 using the dubbo version 2.8.4. Last error is: Invoke remote method timeout. method: findPage, provider: dubbo://172.16.94.115:20881/com.service.BrandService?anyhos
t=true&application=tystore-manager-web&check=false&dubbo=2.8.4&generic=false&interface=com.service.BrandService&methods=add,findById,update,findPage,delete,findAll&pid=15116&revisi
on=1.0-SNAPSHOT&side=consumer&timestamp=1624929883885, cause: Waiting server-side response timeout. start time: 2021-06-29 09:25:49.385, end time: 2021-06-29 09:25:50.386, client e
lapsed: 0 ms, server elapsed: 1001 ms, timeout: 1000 ms, request: Request [id=17, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findPage, pa
rameterTypes=[class com.pojo.TbBrand, class java.lang.Integer, class java.lang.Integer], arguments=[com.pojo.TbBrand@7268b2f8, 1, 10], attachments={path=com.service.BrandService, i
nterface=com.service.BrandService, version=0.0.0}]], channel: /172.16.94.115:53263 -> /172.16.94.115:20881] with root cause
com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout. start time: 2021-06-29 09:25:49.385, end time: 2021-06-29 09:25:50.386, client elapsed: 0 ms, ser
ver elapsed: 1001 ms, timeout: 1000 ms, request: Request [id=17, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=findPage, parameterTypes=[cla
ss com.pojo.TbBrand, class java.lang.Integer, class java.lang.Integer], arguments=[com.pojo.TbBrand@7268b2f8, 1, 10], attachments={path=com.service.BrandService, interface=com.serv
ice.BrandService, version=0.0.0}]], channel: /172.16.94.115:53263 -> /172.16.94.115:20881

在检查过以下内容后:

  1. POJO序列化
  2. 本地IP与服务IP
  3. dubbo运行状态
  4. 关闭防火墙

最后的原因居然是服务器性能不够,响应时间长,自动超时

@Service(
        interfaceName = "com.service.BrandService",
        timeout = 600000)

在service上设置超时时间后,便正常了,,,,

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值