想问一下
我在imooc-dubbo-item-service 的配置为如下
<dubbo:registry protocol=“zookeeper” address=“192.168.1.104:2181”></dubbo:registry>
<dubbo:protocol name=“dubbo” port=“20880”></dubbo:protocol>
然后在imooc-dubbo-order-service的配置如下
<dubbo:registry protocol="zookeeper" address="192.168.1.104:2181"></dubbo:registry>
<!-- 定义暴露服务的端口号 -->
<dubbo:protocol name="dubbo" port="20881"></dubbo:protocol>
然后在web里面为
<dubbo:application name="imooc-dubbo-web"></dubbo:application>
<!-- 注册中心的配置,用于消费者的监听 -->
<dubbo:registry protocol="zookeeper" address="192.168.1.104:2181"></dubbo:registry>
但是报了:
[DUBBO] Failed to start NettyClient DESKTOP-NUVE2DI/192.168.56.1 connect to the server /192.168.56.1:20881 (check == false, ignore and retry later!), cause: client(url: dubbo://192.168.56.1:20881/com.imooc.order.service.OrdersService?anyhost=true&application=imooc-dubbo-web&check=false&codec=dubbo&dubbo=2.5.3&heartbeat=60000&init=true&interface=com.imooc.order.service.OrdersService&methods=createOrder,getOrder&pid=5776&retries=3&revision=0.0.1-SNAPSHOT&side=consumer×tamp=1547473047591) failed to connect to server /192.168.56.1:20881, error message is:connection timed out, dubbo version: 2.5.3, current host: 192.168.56.1
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://192.168.56.1:20881/com.imooc.order.service.OrdersService?anyhost=true&application=imooc-dubbo-web&check=false&codec=dubbo&dubbo=2.5.3&heartbeat=60000&init=true&interface=com.imooc.order.service.OrdersService&methods=createOrder,getOrder&pid=5776&retries=3&revision=0.0.1-SNAPSHOT&side=consumer×tamp=1547473047591) failed to connect to server /192.168.56.1:20881, error message is:connection timed out
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.doConnect(NettyClient.java:124)