Docker Community Forums

Share and learn in the Docker community.

No route to host, but ping works...?


(Ray Statham) #1

Hello All,

My environment of multiple containers has been working perfectly for over 10 months untill today. In each on my containers running upon the same host I’m seeing the following: -

Trying 172.17.0.1…
telnet: connect to address 172.17.0.1: No route to host

Docker Bridge

[root@0001ED logs]# ip addr show docker0
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 02:42:10:f7:de:0b brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 scope global docker0
valid_lft forever preferred_lft forever

Example container

root@4973b44e5b69:/# ip addr show eth0
20: eth0@if21: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:03 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.3/16 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::42:acff:fe11:3/64 scope link
valid_lft forever preferred_lft forever

Example container gateway

root@4973b44e5b69:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 172.17.0.1 0.0.0.0 UG 0 0 0 eth0
172.17.0.0 * 255.255.0.0 U 0 0 0 eth0

Ping test within the container

root@4973b44e5b69:/# ping 172.17.0.1
PING 172.17.0.1 (172.17.0.1) 56(84) bytes of data.
64 bytes from 172.17.0.1: icmp_seq=1 ttl=64 time=0.090 ms
64 bytes from 172.17.0.1: icmp_seq=2 ttl=64 time=0.073 ms

Telnet test within the container

root@4973b44e5b69:/# /var/log/apache2/telnet 172.17.0.1 9000
Trying 172.17.0.1…
telnet: connect to address 172.17.0.1: No route to host

This is a Redhat 7.5 server, with Docker 1.13.1 and the firewall has been disabled.

Any guidance on this issue would be appreciated. Thank you