I am currently working on a uni project which includes multiple services running in docker containers. Some have to register at a directory node. However, this fails with a
java.net.NoRouteToHostException for each container that wants to connect to the directory node.
I then tried to double check by spawning another container. Resolving and pinging other containers is no issue, but whenever I try to actually connect to the other container(s), it fails with a similar error message as above.
After some digging I think the issue is the firewall:
https://success.docker.com/article/firewalld-problems-with-container-to-container-network-communications (Although here it is said to add
trusted the device seems to be re-added to
public after a reboot, but adding the same rule to public as well doesn't change anything)
https://forums.docker.com/t/no-route-to-host-network-request-from-container-to-host-ip-port-published-from-other-container/39063/6 (Note here, that I tried to add this rule via the GUI, but I think I added the described rule correctly)
But none of the proposed solutions seem to work - even after a reboot.
The weird part is, that everything seems to work on my Fedora laptop, which has no further firewall settings added just for docker AFAIK, and also my colleagues (Ubuntu/Fedora) do not have any issues with docker's networking. This is the reason why I'm posting this here instead of the docker forum or similar...
Has anyone of you experienced the same issue?
Thanks for your help!