机器上多网卡 DubbX 注册的问题

DubbX多网卡的问题:
机器上有两个ip地址:192.168.6.57 , /218.68.250.*
Zookeeper 注册机器的ip地址为 192.168.6.24

错误的注册信息:


[img]http://dl2.iteye.com/upload/attachment/0124/6101/a8bb2757-3cb6-3c8b-baec-47432411de4e.png[/img]


需要注册信息为:
[27/04/17 02:30:17:017 CST] localhost-startStop-1 INFO zookeeper.ZookeeperRegistry: [DUBBO] Load registry store file /root/.dubbo/dubbo-registry-192.168.6.24.cache, d
ata: {annotationConfig/com.alibaba.dubbo.demo.user.facade.UserRestService=empty:// 192.168.6.57:****/com.alibaba.dubbo.demo.user.facade.UserRestService?anyhost=true&a
pplication=demo-provider-dubbox&category=configurators&check=false&dubbo=2.8.4&generic=false&group=annotationConfig&interface=com.alibaba.dubbo.demo.user.facade.UserRes
tService&methods=getUser,registerUser&optimizer=com.alibaba.dubbo.demo.SerializationOptimizerImpl&organization=dubbox&owner=programmer&pid=27531&revision=2.8.4&serializ
ation=kryo&side=provider×tamp=1493274448604&validation=true, com.alibaba.dubbo.demo.user.facade.UserRestService=empty:// 192.168.6.57:9999/dubbo-demo-provider/com
.alibaba.dubbo.demo.user.facade

怎样解决呢,就需要绑定dubbo的ip。 需要在 中添加host=”192.168.6.57”
1.
修改后:



这样就可以了。
启动日志:


[img]http://dl2.iteye.com/upload/attachment/0124/6103/6bbca02a-aff5-39a5-8f98-e38e01ab2152.png[/img]

你可能感兴趣的:(dubbo)