com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method XXX in the service
问题log
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method getExpressGoldOrderCount in the service com.xxx.xxx.IExpressGoldOrderService.
Tried 3 times of the providers [*.*.*.*:20880] \u00281/1\u0029 from the registry *.*.*.*:2181 on the consumer 172.16.134.115 using the
dubbo version 2.6.2. Last error is: Invoke remote method timeout. method: getExpressGoldOrderCount, provider: dubbo:
//*.*.*.*:20880/com.xxx.xxx.IExpressGoldOrderService?anyhost=true&application=zt-express&check=false&dubbo=2.6.2&generic=false&interface=com.xxx.xxx.IExpressGoldOrderService&methods=sumCancelAmount,getExpressGoldOrderList,updateExpressGoldOrder,insertExpressGoldOrder,getExpressGoldOrderCount&pid=8745®ister.ip=172.16.134.115&remote.timestamp=1572435096569&revision=master&side=consumer&timeout=8000×tamp=1572438031171&version=master, cause: Waiting server-side response timeout by scan timer. start time: 2019-10-30 20:20:58.558, end time: 2019-10-30 20:21:06.560, client elapsed: 1 ms, server elapsed: 8001 ms, timeout: 8000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=getExpressGoldOrderCount, parameterTypes=[interface java.util.Map], arguments=[{offset=0, pageNo=1, couponType=2, couponStatus=1, limit=20, pageSize=20, sort=desc, order=cancel_time}], attachments={path=com.xxx.xxx.IExpressGoldOrderService, interface=com.xxx.xxx.IExpressGoldOrderService, version=master, timeout=8000}]], channel: /172.16.134.115:51186 -\u003E /*.*.*.*:20880
错误分析
调用服务超时
排查
- 首先看dubbo连接是否正常,是否能ping通providers
- 其次看服务者providers是否正常;有没有报错
- 打印出providers调用的方法日志,看看是否连接成功
less 查日志的教训
菜鸟连接 less 菜鸟讲解
查日志 习惯性的使用less control+g 命令查看行尾,行尾并没有打印错误信息,错误的认为服务是正常的。然后去找其他连接超时问题。
迷途:延长超时时间timeout改为8000 因为 client elapsed: 1 ms, server elapsed: 8001 ms 服务花了8001,那应该是服务超时了,延长一点就行。(超时时间设置为8000ms,8000ms过了服务没有响应,服务端8001)
后来详细看providers日志 tail -fn -300 然后调用观察,发现有错误日志,数据库连接问题。
真相大白了,由于数据库连接问题,导致服务调用失败,不断尝试连接数据库,不断失败,对于消费者来说,是不知道的。
总结
日志分析时注意细节,经验还不够,需要更多的场景,更多的bug来丰富自己,加油!没有bug的程序猿不是好程序猿!
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method XXX in the service相关推荐
- com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method list in the service com.dream.servic
在启动项目的时候dubbo出现以下错误(大概是这样,一开始只是提示dubbo出错): DEBUG [http-bio-8080-exec-3] - DispatcherServlet with nam ...
- [TODO]com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method
异常信息如下: 2018-10-30 20:00:50.230 ERROR java.util.concurrent.ExecutionException: com.alibaba.dubbo.rp ...
- Dubbo:com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method 问题的解决
QUESTION:Dubbo:com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method 问题的解决? ANSWER: 一.原因: ...
- com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method解决方法
com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method解决方法 参考文章: (1)com.alibaba.dubbo.rp ...
- Dubbo:com.alibaba.dubbo.rpc.RpcException Failed to invoke the method 问题的解决
QUESTION:Dubbo:com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method 问题的解决 ANSWER: 一.原因: 1 ...
- 调用Dubbo报错: com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method 问题原因和解决办法
我们在使用Dubbo的过程中,时常会碰到这个异常.而有可能导致这个异常的原因是非常多的,排查起来比较困难.下面把如何排查该问题的思路整理了一下,目前我知道的会导致这个异常的原因分为以下几类: 1.需要 ...
- Failed to invoke the method xxx in the service com.xxx.xxx.XxxService. No provider available for the
转自 Caesar Liu 原文 问题描述 Dubbo应用启动成功 在Dubbo Admin可以看到服务状态为正常(存在提供者和消费者). Zookeeper所在服务器能ping通Dubbo应用所在服 ...
- Failed to invoke the method subscribe in the service com.alibaba.dubbo.registry.RegistryService
1 异常信息 今天在写 dubbo 文章的时候遇到一个问题,倒是折腾了几分钟,百思不得其解,最后终于发现了.异常信息如下: com.alibaba.dubbo.rpc.RpcException: Fa ...
- Failed to invoke the method sayHello in the service com.itheima.service.HelloService.
项目场景: 学Dubbo,运行测试provider和consumer 问题描述: 昨天晚上回寝室之前还正常运行,今天早上来开机后运行就报错 com.alibaba.dubbo.rpc.RpcExcep ...
最新文章
- R语言optim函数进行函数优化实战(和lm函数进行对比)
- Linux: debian/ubuntu下安装和使用Java 11
- Flat - Music scores and guitar tabs editor(乐谱编辑器)
- SpringBoot开发案例之整合Dubbo提供者(二)
- MONGOOSE – 让NODE.JS高效操作MONGODB(转载)
- awk工具的简单使用
- tolua打包Android后路径出错,unity+tolua 64位android崩溃排查过程记录
- DOTNET零碎要点---1.vb.net利用Oracle.DataAccess.dll链接Oracle数据库
- Nginx Unit 1.8.0 发布,动态 Web 应用服务器
- update关联其他表批量更新数据-跨数据库-跨服务器Update时关联表条件更新
- android中获取应用程序(包)的信息,Android中获取应用程序(包)的信息PackageManager的使用(一).doc...
- 数据结构——错误一览(概念类)
- 拒绝安利:安利的真相 丁黎
- PHP复习_PDO实战之实现注册邮件发送
- 通过手机控制蓝牙模块的实例
- 再见了 SELECT *!大厂的 MySQL 查询优化方案,确实牛逼!
- php随机分配班级座位,浅谈班级座位安排原则与方法
- 翻译:Swarm intelligence群体智慧
- 华为od机考题目-考古学家
- @Configuration Spring注解详解