Hi:
I have reference the article:“Cross-host intercontainer communication trouble”, but it can’t to solve my problem.
i hava two host,every host have one network adapter.
HOST A: ip: 192.168.1.26 (running rancher/server and rancher/agent)
ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:50:56:ab:27:4f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.26/24 brd 192.168.1.255 scope global ens32
HOST B: ip:192.168.1.27 (running rancher/agent )
ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:50:56:ab:6b:7e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.27/24 brd 192.168.1.255 scope global ens32
( h3c fw dnat : 112.112.112.1:8080—>192.168.1.26:8080)
On Host A:
docker run -d --restart=always -p 8080:8080 rancher/server
open the url: 112.112.112.1:8080
then add host A:
sudo docker run -e CATTLE_AGENT_IP=192.168.1.26
-d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v0.9.2 http://112.112.112.1:8080/v1/scripts/1889F6AEE8DAE97968BC:1457794800000:A4rZOfxsh2yVvTzUtRpXLXnNms
then add host B:
sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v0.9.2 http://112.112.112.1:8080/v1/scripts/52A2A908C43C77A0B7E4:1457791200000:oJ9DZ0VHpVnwDg0lpXxg1o7mu9M
my problem is:
Containers started on the same host can ping each other, but containers on different hosts do not see each other.
I can’t confirm whether I started rancher-agent :-e CATTLE_AGENT_IP= 192.168.1.26
please help me?thanks.