Docker Community Forums

Share and learn in the Docker community.

Routing mesh not working docker 20.10 Ubunut

My docker environment has 2 nodes (1 master and 1 worker). When I deploy to either node in the swarm, I can only access that containers app from the socket of the node it is hosted on. I.E. If I deploy the app on the worker node I cannot access it from the master node (only from the worker node). I have all ports open that are needed for the swarm (TCP: 2375, 2377, 4789, 7946 and UDP 7946). However, this routing mesh does not seem to work for me.

Is there any one who can help me figure out how to troubleshoot this? Maybe someone has run into this and has some pointers? Thx.

Some best practices with Windows containers: MicrosoftDocs/Virtualization-Documentation#818
You can set default logging driver to all Docker hosts so you don’t need specify it separately for all containers.
Environment variable ASPNETCORE_ENVIRONMENT gives me hint that your applications are ASP.NET Core based so unless your application really needs something Windows specific features I highly recommend to use Linux version of these images. It sounds bit weird idea but based on my two years experience with Linux and Windows containers I still highly recommend it.
Kestrel web server which is used by .NET Core have been supported to publish directly to internet starting from version 2.1 but I would still recommend to consider configuration where you run example NGINX as reverse proxy front of it and make it running on Linux nodes even if your applications are running on Windows nodes.
Consider to use Portainer instead of Swarmpit. It example have support for native Windows containers which is missing from Swarmpit and especially their agent deployment is very interesting as you can manage Linux and Windows containers from one UI and even connect multiple Swarms to it if needed.
If you need Windows containers then consider to get Microsoft Premier Support contract (if you don’t have it yet).
Microsoft recommends to use host mode in production
You can find me with same nick from Docker and Portainer Slacks if you want hear some real world examples how this stuff works on production.