adamfritzsche Posted June 28, 2021 Share Posted June 28, 2021 A few months ago out of the blue my docker containers were unable to communicate between each other using the local subnet I am using (192.168.1.0/24). I can reach them via any other device on the subnet no problem. After a large struggle, I found that they will communicate via the docker subnet? (172.17.0.XXX). This provided an immediate solution but not an answer to what happened as I have had this setup for several years without issue. The issue using the docker subnet (or whatever it is actually referred to) is that the IP changes randomly and then I have to go through a bunch of dockers to reflect these changes. Any ideas to a solution, one way or another? Quote Link to comment
FreeMan Posted June 29, 2021 Share Posted June 29, 2021 Did you do an upgrade recently? There was a change in the default behavior of docker networking - even for existing docker installs. I don't recall if it was the 6.8 or 6.9 release that did this, but I noted similar issues. If you look at the Docker page, you should see that many/all of them are on a 172.* subnet. Can't explain all the details to you, I'm sure someone will stop by who can, but it was intentional and it did cause me a few headaches. Ended up having to reconfigure a few things from the 172.* network to the 192.168.* IP address to talk "back" to the server that way. Quote Link to comment
adamfritzsche Posted July 10, 2021 Author Share Posted July 10, 2021 Any other advice on this? It is rather frustrating. Using the 172.* subnet works, but the ip's for the dockers on this subnet are not static, so I am constantly having breaks in the communication between dockers and have to go into them and change the ip's around when they end up changing at random. Quote Link to comment
Squid Posted July 10, 2021 Share Posted July 10, 2021 Are the containers all using bridge networking, or on a separate docker network? As you already noticed, using 172.* is definitely not how you want to do things. Quote Link to comment
adamfritzsche Posted July 10, 2021 Author Share Posted July 10, 2021 Yes, most of them are using bridge. Quote Link to comment
Squid Posted July 10, 2021 Share Posted July 10, 2021 Then you reference within the app the host IP address and the port # (eg: from Radarr) Quote Link to comment
adamfritzsche Posted July 11, 2021 Author Share Posted July 11, 2021 Right. That is how I had it for years, no issue. All of a sudden dockers will not communicate with each other using the Host IP and I fail to understand why. I can and do access these dockers via the host ip and corresponding port from anywhere else, except another docker. This was my previous setup, which no longer works. Now to get them to work I have to use this, which is problematic. Quote Link to comment
adamfritzsche Posted July 27, 2021 Author Share Posted July 27, 2021 Any further ideas on why this is happening? Quote Link to comment
Slarti123 Posted August 6, 2022 Share Posted August 6, 2022 Reviving this old threat as I experience the same issue. Updated Unraid to 6.10 and now the dockers run in the subnet 172.17.0.X. My actual LAN is in 192.168.178.X I have some docker in bridge or host mode which works, but I do have some as br0 with static IPs in the range of 192.168.178.X. The br0s now cannot find the dockers in host or bridge mode, anymore. Everything worked fine before and I am not very keen to change all settings in some of the clients, etc. Any way to just bring the docker network behaviour back to how it used to be in my environment? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.