sofastack/sofa-rpc-node

Docker swarm, 通过zookeeper得到rpc服务器地址后无法连接

nichliu opened this issue · 1 comments

container 的网络
eth0 Link encap:Ethernet HWaddr 02:42:0A:FF:01:96
inet addr:10.255.1.150 Bcast:10.255.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:164 errors:0 dropped:0 overruns:0 frame:0
TX packets:118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18204 (17.7 KiB) TX bytes:16597 (16.2 KiB)

eth1 Link encap:Ethernet HWaddr 02:42:0A:00:2B:81
inet addr:10.0.43.129 Bcast:10.0.43.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:994842 errors:0 dropped:0 overruns:0 frame:0
TX packets:1557577 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:88179528 (84.0 MiB) TX bytes:124562996 (118.7 MiB)

eth0 被自动注册到zookeeper去了, 但是只有eth1 才能够顺利访问。
如何在注册的时候选择注册哪个网络啊?

publishAddress option fixed the issue