How to let boot2docker to talk to coreos (in vagrant)

Hi experts,

I have coreos in vagrant (with IP address 172.17.8.101) installed on my macbook, then I install boot2docker as well with ip 192.168.59.103

I start a web service container in coreos, and I can access via http://172.17.8.101:8080 from my macbook directly.

Now if I ssh to boot2docker (boot2docker ssh), and try to connect to that port, I got error : No route to host

docker@boot2docker:~$ telnet 172.17.8.101 8080
telnet: can't connect to remote host (172.17.8.101): No route to host
docker@boot2docker:~$

What can I do to make it work?

edit: my bad, sorry, from host.
$ telnet $(boot2docker ip) 8080

it should work though, whats your container?

docker@boot2docker:~$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS               NAMES
540f9003290d        redis               "/entrypoint.sh redi"   58 seconds ago      Up 58 seconds       6379/tcp            some-redis
docker@boot2docker:~$ docker inspect 54 | grep IP
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "IPAddress": "172.17.0.8",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null


docker@boot2docker:~$ telnet 172.17.0.8 6379
info
$1883
# Server
redis_version:3.0.3
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:bf300626cfd5c55b
redis_mode:standalone
os:Linux 4.0.7-boot2docker x86_64
arch_bits:64

I can confirm, from coreos (172.17.8.101) I can connect to boot2docker’s port.

But I can’t connect boot2docker to coreos, not sure if it related firewall setup in coreos.

Greetings,

could you share some more info? docker ps -a or something? else, have you tried using telnet 0.0.0.0 8080 instead?

yes, i test with telnet.