Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2016-07-20 16:27:34.873, end time: 2016-07-20 16:27:39.895, client elapsed: 0 ms
方案一:
重启dubbo连接 zookeeper
方案二:
经压测,greys跟踪得知,是dubbo的monitor的问题。主要超时的方法是dubbo的getIP方法,monitor每次收集数据的时候都要根据域名获取zk的IP,这一步耗时很长。
public String getIp() {
if (ip == null) {
ip = NetUtils.getIpByHost(host);
}
return ip;
}
现在改了dubbo的源码,monitor每次收集数据的时候不获取zk的ip,直接用域名。增加如下方法,
public String toServiceString(boolean useIP){
return buildString(true, false, useIP, true);
}
修改AbstractMonitorFactory的方法
public Monitor getMonitor(URL url) {
url = url.setPath(MonitorService.class.getName()).addParameter(Constants.INTERFACE_KEY, MonitorService.class.getName());
String key = url.toServiceString(false);
LOCK.lock();
try {
Monitor monitor = MONITORS.get(key);
if (monitor != null) {
return monitor;
}
monitor = createMonitor(url);
if (monitor == null) {
throw new IllegalStateException("Can not create monitor " + url);
}
MONITORS.put(key, monitor);
return monitor;
} finally {
// 释放锁
LOCK.unlock();
}
}
Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2016-07-20 16:27:34.873, end time: 2016-07-20 16:27:39.895, client elapsed: 0 ms的更多相关文章
- 关于dubbo服务产生异常之:Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer.
简单来说就是dubbo超时,因为dubbo默认的时间是500ms,超过这个时间它会重新访问service层,最多尝试三次. 所以我在测试的时候日志显示出来的异常为……timeout……. 开始设置开始 ...
- dubbo 响应超时异常: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout.
因为dubbo默认的时间是500ms,超过这个时间它会重新请求服务层,最多尝试三次. 如果数据量比较大就不行了显示出来的异常为timeout. 在服务提供端设置timeout=1200000 并且加了 ...
- dubbo报com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout. start time: 2020-03-28 23:08:50.342, end time: 2020-03-28 23:08:51.344,
当进行debug 启动项目报 dubbo remotiong timeout ,默认1一秒,要在spring配置文件中,dubbo配置中dubbo:service配置timeout属性,如下图配置10 ...
- com.alibaba.dubbo.remoting.TimeoutException
maven项目 update clean install 重启 服务消费者
- org/apache/curator/RetryPolicy at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperTransporter.connect(CuratorZookeeperTransporter.java:26)
使用dubbo服务,启动项目报错: org/apache/curator/RetryPolicy at com.alibaba.dubbo.remoting.zookeeper.curator.Cur ...
- com.alibaba.dubbo.remoting.RemotingException: Failed to bind NettyServer on /192.168.1.13:20881, cause: Failed to bind to: /0.0.0.0:20881
抛出的异常如上,解决方案是:根据异常信息确定是端口被占用,排查项目是否启动之后没有关闭,在windows命令行中运行如下命令:netstat -ano 检查端口占用的情况,根据pid在任务管理器中杀死 ...
- 报错 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException的解决放案
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/loveliness_peri/artic ...
- [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.rpc ...
- com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method解决方法
报错日记: Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: getUserAuthLeve ...
随机推荐
- android 定时, 延时 任务
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha 倒计时类 用 倒计时定时器CountDownTimer 延迟类 CountDownT ...
- Linux下gcc与g++用法以及编写makefile
1. gcc与g++编译流程: 1) 编译流程: 2) 预处理:生成.i的预处理文件. Ø 只激活预处理,这个不生成文件,需要把它重定向一个输出文件. ...
- SpringBoot+SpringSecurity+Thymeleaf认证失败返回错误信息踩坑记录
Spring boot +Spring Security + Thymeleaf认证失败返回错误信息踩坑记录 步入8102年,现在企业开发追求快速,Springboot以多种优秀特性引领潮流,在众多使 ...
- Git_Bug分支
软件开发中,bug就像家常便饭一样.有了bug就需要修复,在Git中,由于分支是如此的强大,所以,每个bug都可以通过一个新的临时分支来修复,修复后,合并分支,然后将临时分支删除. 当你接到一个修复一 ...
- Git_工作区和暂存区
Git和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念. 先来看名词解释. 工作区(Working Directory):就是你在电脑里能看到的目录,比如我的learngit文件夹就是一个工 ...
- SQLiteSpy - A fast and compact GUI database manager for SQLite
http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index SQLiteSpy is a fast and compact GUI dat ...
- 追踪CPU跑满
http://blog.donghao.org/2014/04/24/%e8%bf%bd%e8%b8%aacpu%e8%b7%91%e6%bb%a1/
- 我对NHibernate的感受(2):何必到处都virtual
上一篇主要是在夸NHibernate实现的好,而这篇就完全是来抱怨的了.NHiberante有个毛病,就是如果是和数据库产生映射的类,就要求所有的public成员和protected成员必须是virt ...
- 报错:无法将类型"System.Data.EntityState"隐式转换为"System.Data.Entity.EntityState"
报错:无法将类型"System.Data.EntityState"隐式转换为"System.Data.Entity.EntityState". 出错语句停留 ...
- ARC 特性
ResultVC *myResultVC = [[ResultVC alloc]initWithNibName:@"ResultVC" bundle:nil]; [self.vie ...