1. 程式人生 > >Dubbo入門

Dubbo入門

AI tar try ava say 適配 using 訂閱 dem

在學習dubbo快速入門時踩的坑http://dubbo.apache.org/books/dubbo-admin-book/

根據官網教程使用默認的Multicast 註冊中心,在consumer消費者訂閱時出現了com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service com.alibaba.dubbo.demo.DemoService. No provider available for the service com.alibaba.dubbo.demo.DemoService from registry 224.5.6.7:1234 on the consumer 192.168.137.1 using the dubbo version 2.0.0. Please check if the providers have been started and registered.異常

此時因為Provider在註冊時,出現了多個ip,打開cmd窗口,使用ipconfig查看ip信息,裏面有多個ip包括ppp適配器,以太網適配器,vm虛擬機適配器等等,這個時候需要關閉ppp適配器(用撥號上網的斷掉就好了),vm虛擬機適配器等,留下一個以太網適配器,裏面的ip應是provider註冊時等級的ip和consumer訂閱時需要的ip。

檢測方法,使用每個ip地址在日誌文件裏面搜索,查看是否出現多個ip

Dubbo入門