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 ...
随机推荐
- 洛谷.4238.[模板]多项式求逆(NTT)
题目链接 设多项式\(f(x)\)在模\(x^n\)下的逆元为\(g(x)\) \[f(x)g(x)\equiv 1\ (mod\ x^n)\] \[f(x)g(x)-1\equiv 0\ (mod\ ...
- 第一章--Go与web应用
Go语言构建web应用的特性 可扩展 可维护 模块化 高性能 HTTP简介 HTTP是一种无状态.由文本构成的请求-响应(request-response)协议,这种协议使用的是客户端-服务器(cli ...
- Codeforces Round #352 (Div. 1) B. Robin Hood 二分
B. Robin Hood 题目连接: http://www.codeforces.com/contest/671/problem/B Description We all know the impr ...
- 前端换mac可以参考搭一下简单的环境
1. 安装brew套件管理器 安装向导请点击,注意的地方,mac必须先设置一个密码.装好之后就可以安装各种套件. 2. 安装nvm管理node版本 brew install nvm 安装完成之后nvm ...
- 我们为什么需要Map-Reduce?
在讨论我们是否真的需要Map-Reduce这一分布式计算技术之前,我们先面对一个问题,这可以为我们讨论这个问题提供一个直观的背景. 问题 我们先从最直接和直观的方式出发,来尝试解决这个问题: 先伪一下 ...
- 设置ubuntu 终端显示路径长度
~/.bashrc 这个文件记录了用户终端配置. 打开~/.bashrc 这个文件 $: sudo vim ~/.bashrc 找到 将蓝色的w由小写改成大写,可以表示只显示当前目录名称.
- Tasker to detect and vibrate once the ougoing call is being answered
I happen to find that for GSM standard phone, call duration would be created into sql database only ...
- SCSI Pass-Through Interface Tool
http://code.msdn.microsoft.com/SCSI-Pass-Through-a906ceef/sourcecode?fileId=59048&pathId=1919073 ...
- Linux内核中container_of函数详解
http://www.linuxidc.com/Linux/2016-08/134481.htm
- [Node.js]OS模块
摘要 Node.js有很多工具模块,比如os,path,net,dns,domain模块.这里先介绍os模块的使用方法.os模块提供了一些基本的系统操作函数. os模块 引入os模块 var os=r ...