【dubbo】No provider available from registry 127.0.0.1:2181 for service com.dubbo.api.service
頁(yè)面訪問(wèn):http://localhost:8062/add?a=111,報(bào)報(bào)錯(cuò)如下(消費(fèi)者服務(wù)也是報(bào)這種錯(cuò)):
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Sep 09 14:02:22 CST 2021
There was an unexpected error (type=Internal Server Error, status=500).
No provider available from registry 127.0.0.1:2181 for service com.dubbo.api.service.CostService on consumer 10.1.31.154 use dubbo version 2.6.2, please check status of providers(disabled, not registered or in blacklist).
錯(cuò)誤的意思是在服務(wù)消費(fèi)端的功能中調(diào)用服務(wù)提供端的邏輯時(shí)沒有發(fā)現(xiàn)服務(wù)提供者對(duì)象。主要就是服務(wù)提供方代碼的問(wèn)題了。
com.alibaba.dubbo.config.annotation.Service:用于標(biāo)注對(duì)外暴露的dubbo接口實(shí)現(xiàn)類。
org.springframework.stereotype.Service:用于標(biāo)注根據(jù)業(yè)務(wù)塊分離的Service的實(shí)現(xiàn)類,對(duì)應(yīng)的是業(yè)務(wù)層(如一個(gè)dubbo方法可能調(diào)用多個(gè)業(yè)務(wù)塊的service,這些service的實(shí)現(xiàn)類就用Spring的注解)。
參考鏈接:https://blog.csdn.net/zlbdmm/article/details/113974292
修改后運(yùn)行正常
?
總結(jié)
以上是生活随笔為你收集整理的【dubbo】No provider available from registry 127.0.0.1:2181 for service com.dubbo.api.service的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: ThinkSNS团队衍生产品你知道几个?
- 下一篇: SLB 负载均衡实践