zookeeper dubbo 配置错误总结

学者使用zookeeper 、dubbo 但是在配置文件以及客户端连接的时候出现了如下问题,下面来看看解决方法

1、spring配置文件dubbo标签报错

解决方法:选择windows–>preferrence–>xml->xmlcatalog–>add->catalog entry –>file system,选择模版文件后,修改key值为“http://code.alibabatech.com/schema/dubbo/dubbo.xsd”,然后在eclipse中文件报错处点击右键“validate”。

模板下载地址:http://download.csdn.net/detail/qh_java/9652469

模板下载地址:模板下载地址

2、配置好后服务端能起来,但是客户获取服务端服务时一直报异常

异常信息如下:

[java]view plaincopyprint?

2012-12-3110:51:41,562-[TS] INFO main-EventThread org.I0Itec.zkclient.ZkClient – zookeeper state changed (Disconnected)

2012-12-3110:51:43,008-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Opening socket connection to server /17.22.17.1:2181. Will not attempt to authenticate using SASL (unknown error)

2012-12-3110:51:43,009-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Socket connection established to /17.22.17.1:2181, initiating session

2012-12-3110:51:43,011-[TS] WARN main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxnSocket – Connected to an old server; r-o mode will be unavailable

2012-12-3110:51:43,011-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Session establishment complete on server /17.22.17.1:2181, sessionid =0x13b8a23254100be, negotiated timeout =6000

2012-12-3110:51:43,012-[TS] INFO main-EventThread org.I0Itec.zkclient.ZkClient – zookeeper state changed (SyncConnected)

2012-12-3110:51:47,012-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Client session timed out, have not heard from server in 4002msforsessionid0x13b8a23254100be, closing socket connection and attempting reconnect

2012-12-31 10:51:41,562-[TS] INFO main-EventThread org.I0Itec.zkclient.ZkClient – zookeeper state changed (Disconnected)

2012-12-31 10:51:43,008-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Opening socket connection to server /17.22.17.1:2181. Will not attempt to authenticate using SASL (unknown error)

2012-12-31 10:51:43,009-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Socket connection established to /17.22.17.1:2181, initiating session

2012-12-31 10:51:43,011-[TS] WARN main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxnSocket – Connected to an old server; r-o mode will be unavailable

2012-12-31 10:51:43,011-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Session establishment complete on server /17.22.17.1:2181, sessionid = 0x13b8a23254100be, negotiated timeout = 6000

2012-12-31 10:51:43,012-[TS] INFO main-EventThread org.I0Itec.zkclient.ZkClient – zookeeper state changed (SyncConnected)

2012-12-31 10:51:47,012-[TS] INFO main-SendThread(17.22.17.1:2181) org.apache.zookeeper.ClientCnxn – Client session timed out, have not heard from server in 4002ms for sessionid 0x13b8a23254100be, closing socket connection and attempting reconnect

解决办法: 这个异常出现的原因是zookeeper使用的版本不一致导致的,所以建议安装的zookeeper、客户端的zookeeper架包以及服务端的zookeeper架包使用相同版本的就ok!

两个错误参考文章:

第一个错误:http://blog.csdn.net/small_cai/article/details/50511785

第二个错误:http://blog.csdn.net/azhao_dn/article/details/8469680

愿意了解或者源码的朋友直接求求交流分享技术:2042849237

更多详细源码参考来源:http://minglisoft.cn/technology

    原文作者:安琪拉_4b7e
    原文地址: https://www.jianshu.com/p/3cb3172cef94
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞