I need some help for solving a problem with Docker Network and accessing containers among themselves.
First let me tell you about my simple docker environment based on Ubuntu and a native installed Docker environment.
I have created an extra networks to chain several containers. The containers within this networks has fixed IP4 network addresses. So they should be able to know and access each other.
In front of these networks I have setup an NGINX-Proxy to access these containers from outside. The NGINX is assigned to each networks and also the bridge network.
Ok... everthing is fine and works but sometimes I have the problem that some containers could not be reached an I get following errors within the nginx-log:
2019/05/02 07:39:26 [error] 37#37: *29825 connect() failed (113: No route to host) while connecting to upstream, client: 213.182.2.102, server: ####.###.works, request: "GET /favicon.ico HTTP/2.0", upstream: "http://172.19.0.26:80/favicon.ico", host: "####.###.works", referrer: "https://####.###.works/preview/index.html?url=https://####.###.works/public/page/4291/preview?2019-04-30%2009:29:53"
2019/05/02 07:39:26 [warn] 37#37: *29825 upstream server temporarily disabled while connecting to upstream, client: 213.182.2.102, server: ####.###.works, request: "GET /favicon.ico HTTP/2.0", upstream: "http://172.19.0.26:80/favicon.ico", host: "####.###.works", referrer: "https://####.###.works/preview/index.html?url=https://fendt-wm-api.geneva.works/public/page/4291/preview?2019-04-30%2009:29:53"
...
Result is that the container could not be reached and responses with no content.
To find the issue I simply tried to ping the IP 172.19.0.26 from the docker-host and also from inside of some containers.
PING 172.19.0.26 (172.19.0.26) 56(84) bytes of data.
64 bytes from 172.19.0.26: icmp_seq=1 ttl=64 time=0.180 ms
64 bytes from 172.19.0.26: icmp_seq=2 ttl=64 time=0.067 ms
64 bytes from 172.19.0.26: icmp_seq=3 ttl=64 time=0.067 ms
From 172.19.0.14 icmp_seq=1 Destination Host Unreachable
64 bytes from 172.19.0.26: icmp_seq=5 ttl=64 time=0.061 ms
From 172.19.0.14 icmp_seq=4 Destination Host Unreachable
From 172.19.0.14 icmp_seq=6 Destination Host Unreachable
64 bytes from 172.19.0.26: icmp_seq=8 ttl=64 time=0.131 ms
At all tries I was wondering why the requested ping was answered from 172.19.014 instead from 172.19.0.26?
I think this will be the key-issue why the access to the container fails sometimes.
I invested now several days for research an investigations. I also searched stackoverflow but I don't have found any solutions which fits to my issue.
Has anybody an idea what happens here?
BR Markus