1、dubbo zookeeper注册中心provider的ip地址为内网ip,导致consumer连不上

我用的阿里云的服务器,host默认配置了内网ip,注销或删除即可

vim /etc/hosts

2、linux提示内存不够

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000785a00000

解决办法

dubbo的启动脚本,可以设置jvm参数,修改 -Xms和-Xmx为1g,问题解决

3、 com.alibaba.dubbo.remoting.RemotingException: Fail to decode request due to: RpcInvocation [methodName=getById, parameterTypes=[], arguments=null, attachments={dubbo=2.8.4, input=245, path=com.mobjia.content.facade.ContentBasicDubboService, version=0.0.0}]

参数使用了long,改成了Long,参数须继承java.io.Serializable

4、Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2017-03-28 09:36:38.285, end time: 2017-03-28 09:36:44.295, client elapsed: 497 ms, server elapsed: 5513 ms, timeout: 6000 ms, request: Request [id=0, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=getById, parameterTypes=[class java.lang.Long], arguments=[153], attachments={path=com.mobjia.content.facade.ContentBasicDubboService, interface=com.mobjia.content.facade.ContentBasicDubboService, timeout=6000, version=0.0.0}]]

超时了,调整超时时间。

<dubbo:provider delay="-1" timeout="60000" retries="0"/>

5、com.alibaba.dubbo.rpc.RpcException: Forbid consumer 192.168.201.105 access service com.mobjia.set.facade.SetTestFacade from registry 127.0.0.1:2181 use dubbo version 2.8.4, Please check registry access list (whitelist/blacklist)

没有provider会导致该异常

6、Failed to check the status of the service com.mobjia.set.facade.SetBasicRestService. No provider available for the service com.mobjia.set.facade.SetBasicRestService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=mobjia-web&dubbo=2.8.4&interface=com.mobjia.set.facade.SetBasicRestService&methods=getSetBasic,getString,getSetBasicList&organization=mobjia&owner=lyp&pid=9328&revision=1.0&side=consumer&timestamp=1491446741230&validation=false to the consumer 192.168.201.105 use dubbo version 2.8.4

参见:https://dangdangdotcom.github.io/dubbox/rest.html

在一般应用中,我们建议将annotation放到服务实现类,这样annotation和java实现代码位置更接近,更便于开发和维护。另外更重要的是,我们一般倾向于避免对接口的污染,保持接口的纯净性和广泛适用性。

但是,如后文所述,如果我们要用dubbo直接开发的消费端来访问此服务,则annotation必须放到接口上。

如果接口和实现类都同时添加了annotation,则实现类的annotation配置会生效,接口上的annotation被直接忽略。

需要把注释放到接口上。

7、java.lang.ClassNotFoundException: org.jboss.resteasy.client.jaxrs.ClientHttpEngine

没有resteasy jar包

8、 Line 9 in XML document from class path resource [META-INF/dubbo/dubbo-consumer.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 77; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明。

网上有说没有导入dubbo jar包。

我用eclipse clean以后可以了

9、 无法读取方案文档 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd', 原因为 1) 无法找到文档; 2) 无法读取文档; 3) 文档的根元素不是 <xsd:schema>。

同8

10、java.Lang.OutOfMemoryError  内存不足

调整linux线程数默认配置

vim  /etc/security/limit.d

计算用户可用的线程数:

ulimit -u

cat /proc/meminfo |grep MemTotal

线程数=MemTotal/128

dubbo常见错误的更多相关文章

  1. dubbo 常见错误 通配符的匹配很全面, 但无法找到元素 'dubbo:application' java.lang.reflect.MalformedParameterizedTypeException 通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明。 Unsupported major.minor version 52.0 (unable to l

    dubbo 常见错误 1. Caused by: java.lang.reflect.MalformedParameterizedTypeException 启动时报错,原因是dubbo 依赖 spr ...

  2. dubbo 常见错误

    1. Caused by: java.lang.reflect.MalformedParameterizedTypeException 或 Caused by: java.lang.NoSuchMet ...

  3. 初识JAVA(二)(送给Java和安卓初学者)----常见错误

    博主接着上篇的来讲哦,以后的更新中,博主会出一些练习题,有兴趣的可以做做然后吧代码粘贴到下面,大家可以一起研究学习,一起进步,本篇文章主要讲的是: 一.常见错误 二.连接上篇一起的训练 无论是什么方向 ...

  4. ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock

    ubuntu 常见错误--Could not get lock /var/lib/dpkg/lock 通过终端安装程序sudo apt-get install xxx时出错:E: Could not ...

  5. coreseek常见错误原因及解决方法

    coreseek常见错误原因及解决方法 Coreseek 中文全文检索引擎 Coreseek 是一款中文全文检索/搜索软件,以GPLv2许可协议开源发布,基于Sphinx研发并独立发布,专攻中文搜索和 ...

  6. Android Fragment使用(二) 嵌套Fragments (Nested Fragments) 的使用及常见错误

    嵌套Fragment的使用及常见错误 嵌套Fragments (Nested Fragments), 是在Fragment内部又添加Fragment. 使用时, 主要要依靠宿主Fragment的 ge ...

  7. C语言初学者代码中的常见错误与瑕疵(23)

    见:C语言初学者代码中的常见错误与瑕疵(23)

  8. struts2.5框架使用通配符指定方法常见错误

    struts2.5框架使用通配符指定方法(常见错误) 在学习struts框架时经常会使用到通配符调用方法,如下: <package name="shop" namespace ...

  9. .Net常见错误

    常见错误 #1: 把引用当做值来用,或者反过来 C++ 和其他很多语言的程序员,习惯了给变量赋值的时候,要么赋单纯的值,要么是现有对象的引用.然而,在C# 中,是值还是引用,是由写这个对象的程序员决定 ...

随机推荐

  1. 为什么分布式一定要有Redis?

    这篇文档是读了一个公众号的文章后修改后复制,以前的学习深度不够,现在还是理解不够,以后再写文档,继续加深. 一:说明 1.说明 考虑到绝大部分写业务的程序员,在实际开发中使用 Redis 的时候,只会 ...

  2. SQL注入——SQL Injection

    本文部分内容转自:https://www.cnblogs.com/rush/archive/2011/12/31/2309203.html http://www.diybl.com/course/7_ ...

  3. jsp的c标签使用

    http://blog.csdn.net/chabale/article/details/9406437

  4. Harmonic Number(调和级数+欧拉常数)

    In mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers ...

  5. TF之RNN:TF的RNN中的常用的两种定义scope的方式get_variable和Variable—Jason niu

    # tensorflow中的两种定义scope(命名变量)的方式tf.get_variable和tf.Variable.Tensorflow当中有两种途径生成变量 variable import te ...

  6. 连接mysql数据库时提示2003 can't connect to MySQL server on ip(10060)的解决办法

    今天部署 JavaWeb 项目到云服务器,突然出现can t connect to MySQL server on ip的问题 经过了一些检查,认为很有可能是防火墙的原因.下面是检查的具体操作: 因为 ...

  7. HDU 2426 Interesting Housing Problem (最大权完美匹配)【KM】

    <题目链接> 题目大意: 学校里有n个学生和m个公寓房间,每个学生对一些房间有一些打分,如果分数为正,说明学生喜欢这个房间,若为0,对这个房间保持中立,若为负,则不喜欢这个房间.学生不会住 ...

  8. 003.Keepalived搭建LVS高可用集群

    一 基础环境 1.1 IP规划 OS:CentOS 6.8 64位 节点类型 IP规划 主机名 类型 主 Director Server eth0:172.24.8.10 DR1 公共IP eth1: ...

  9. lvs负载均衡概述

  10. scrapy 安装

    windows 1.wheelpip install wheel2.lxmlhttp://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml3.PyOpensslhttp ...