Dubbox鏈接註冊中心常見錯誤


常見錯誤

1.在註冊中心找不到對應的服務java


java.lang.IllegalStateException: Failed to check the status of the service com.pinyougou.sellergoods.service.BrandService. No provider available for the service com.pinyougou.sellergoods.service.BrandService from the url zookeeper://192.168.25.129:2181/com.alibaba.dubbo.registry.RegistryService?application=pinyougou-manager-web&dubbo=2.8.4&interface=com.pinyougou.sellergoods.service.BrandService&methods=update,get,delete,selectOptionList,add,getListByPage&pid=3980&revision=0.0.1-SNAPSHOT&side=consumer×tamp=1501146823396 to the consumer 172.16.17.14 use dubbo version 2.8.4web

這種錯誤是服務層代碼沒有成功註冊到註冊中心致使,請檢查一下你的服務層代碼是否添加了@service註解,而且該註解的包必定是com.alibaba.dubbo.config.annotation包,不是org.springframework.stereotype.Service,這個地方極容易出錯。另外還有一個緣由就是你的服務層工程因爲某些緣由沒有正常啓動,也沒法註冊到註冊中內心。spring


2.沒法鏈接到註冊中心


org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:876)org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:98)org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:92)org.I0Itec.zkclient.ZkClient.<init>(ZkClient.java:80)微信

com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.<init>(ZkclientZookeeperClient.java:26)app


請檢查IP與端口是否填寫正確,檢查註冊中心是否正常啓動ide


長按圖片識別二維碼關注學習


 CSDN博客地址大數據



一個喜歡分享最新開發技術的公衆號,是我我的的公衆號,強烈推薦關注。url


關注後回覆1001,領取一整套JAVA和大數據相關學習資源以及精品教程spa




本文分享自微信公衆號 - 一點博客(xiaochen_182)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。

相關文章
相關標籤/搜索