mac机器本地dubbo服务访问不到的问题

环境情况:

zookeeper , dubbo 服务端  dubbo 客户端 都安装在本地.

配置的地址都是127.0.0.1

但是客户端 不能调用到服务端.报

[ERROR] 2017-07-24 16:15:50.067 com.alibaba.dubbo.remoting.transport.AbstractClient  [DUBBO] Failed to start NettyClient /10.8.0.130 connect to the server /10.8.0.130:20880 (check == false, ignore and retry later!), cause: client(url: dubbo://10.8.0.130:20880/com.hupun.crm.template.TemplateInterface?anyhost=true&application=erp-dubbo-client&check=false&codec=dubbo&default.check=false&default.delay=-1&default.retries=0&default.timeout=120000&delay=-1&dubbo=2.5.3&heartbeat=60000&interface=com.hupun.crm.template.TemplateInterface&methods=queryTemplatesCount,auditTemplate,queryTemplates&pid=9604&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1500884146530) failed to connect to server /10.8.0.130:20880 client-side timeout 3000ms (elapsed: 3043ms) from netty client 10.8.0.130 using dubbo version 2.5.3, dubbo version: 2.5.3, current host: 10.8.0.130

com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://10.8.0.130:20880/com.hupun.crm.template.TemplateInterface?anyhost=true&application=erp-dubbo-client&check=false&codec=dubbo&default.check=false&default.delay=-1&default.retries=0&default.timeout=120000&delay=-1&dubbo=2.5.3&heartbeat=60000&interface=com.hupun.crm.template.TemplateInterface&methods=queryTemplatesCount,auditTemplate,queryTemplates&pid=9604&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1500884146530) failed to connect to server /10.8.0.130:20880 client-side timeout 3000ms (elapsed: 3043ms) from netty client 10.8.0.130 using dubbo version 2.5.3

at com.alibaba.dubbo.remoting.transport.netty.NettyClient.doConnect(NettyClient.java:127)

at com.alibaba.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:280)

at com.alibaba.dubbo.remoting.transport.AbstractClient.<init>(AbstractClient.java:103)

at com.alibaba.dubbo.remoting.transport.netty.NettyClient.<init>(NettyClient.java:61)

at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.connect(NettyTransporter.java:37)

at com.alibaba.dubbo.remoting.Transporter$Adpative.connect(Transporter$Adpative.java)

 

这个错.

 

 

显示的地址不对.

 

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

ether ac:bc:32:a8:f0:4f 

inet6 fe80::aebc:32ff:fea8:f04f%en0 prefixlen 64 scopeid 0x4 

inet 10.192.7.250 netmask 0xfffff800 broadcast 10.192.7.255

nd6 options=1<PERFORMNUD>

media: autoselect

status: active

utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500

inet 10.8.0.130 --> 10.8.0.129 netmask 0xffffffff 

mac 下找到 10.8.0.130 这个地址.  

为什么不是 10.192.7.250 的呢?  将服务端注册的地址修改为 10.192.7.250

客户端就能正常访问到了.

 

相关推荐