Open WillNye opened 7 years ago
@WillNye swarm-mode on Windows doesn't support VIP based load-balancing. Can you try creating the service using --endpoint-mode=dns-rr
?
This will create the service with load-balancing done using DNS-RR.
Also, swarm-mode on Windows doesnt support Routing-mesh. You can instead publish the port using -p mode=host,target=x,published=y
.
@mavenugo
Sorry for the delay in response. I did try to do as you are suggesting and outlined on https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/swarm-mode but with no success. I've also tried several variations as mentioned in the comments with the link above.
Such as
docker service create --name test_asp --constraint node.platform.os==windows --detach=false --endpoint-mode=dnsrr --publish mode=host,target=80,published=7999 repo/aspnet-helloworld:latest
Hi, may I ask if you found solution for your problem? We have the same problem with our hybrid swarm. We can ping each linux container from the windows but we can not ping the service: For example: ping myservice --> does not work ping myservice.1 --> does work
On the other hand both ping commands work from another Linux container.
@tenigma Sadly, we wound up just abandoning efforts to dockerize our Windows apps. It really seems like swarm support with Windows and Linux just isn't there yet. I'm not sure what your situation is but if you're trying to serve your .Net apps over Nginx we just did a round robin within Nginx instead.
Something like:
upstream netApp {
server .NetContainerOne;
server .NetContainerTwo;
}
server {
listen 80;
server_name yoursite.com;
location / {
proxy_pass http://netApp;
proxy_next_upstream error http_500 http_502 http_503 http_504;
}
}
@WillNye Thanks for your answer. We are trying to dockerize some backend services and we wanted to use rabbitmq linux image. Our windows app cannot talk to service but can talk direct to a service container. I found some videos and this blog post (http://collabnix.com/building-hybrid-docker-swarm-mode-cluster-on-google-cloud-platform/) where they use "--endpoint-mode dnsrr". Tomorow we will try this and if it does not work we will try to switch to windows cluster only or switch to nats queue instead of rabbitmq.
Thanks again for your help.
Hi all, facing same issue with Windows Server with containers on Azure (Docker version 17.06.2-ee-6, build e75fdb8) and Ubuntu Server on Azure (Docker version 18.01.0-ce, build 03596f5) on the same swarm. So, containers hosted on Ubuntu can ping Windows container, but Windows hosted containers, unfortunately, cannot see Ubuntu hosted containers.
Please, any news about that? Thank you in advance
Does it work to curl the Linux container from inside the Windows container?
Hi, is there any update on this issue, I'm facing similar issue when I tried to run the dockerized .net core application on Windows container in swarm.
management:
image: service-a
ports:
- target: 4200
published: 4200
protocol: tcp
mode: host
secrets:
- cert_pass
environment:
- CERT_PASS=C:\ProgramData\Docker\secrets\cert_pass
volumes:
- .\servicea\certificates:c:\application\certificates
- .\servicea\environment:c:\application\environment
deploy:
endpoint_mode: dnsrr
I can see container is running and ports are active, verified using telnet and is able to connect to port 4200.
When I browsed the application from browser, I get error timeout as response.
curl http://localhost:4200/
from host machine is also failing with timeout.
But it is working fine when I logged into container and curl http://localhost:4200/
is successful.
When I pinged the container IP address, I can see that ping got "TTL expired in transit" for ping response. Does that indicate any issue with routing between host and container network?
We are trying to create a docker swarm that has a ASP.NET Docker service running on a Windows docker container that is served via an Nginx service running on an Ubuntu docker-machine. The problem is the Windows container is not properly responding to other services in the swarm. We have Django apps using the same Nginx service which are running great but the ASP.NET app is timing out.
We went into the Nginx container and successfully touched the ASP.NET container but when we went into the ASP.NET container requests were being sent to the correct IP but all requests time out.
Here is everything we know to this point:
Docker version 17.04.0-ce, build 4845c56 Running Windows Server 2016 - KB3150513 Disabled firewall to confirm it isn't an issue with ports Windows container running on docker instance directly on the Windows Server Ubuntu containers are on Ubuntu Docker machines Ubuntu services can ping Windows services but Windows services unable to reach Ubuntu Services Ubuntu-> Windows Windows ->X Ubuntu
Our Stack:
Nginx ifconfig:
Nginx ping ASP:
Nginx service inspect:
ASP Service:
ASP ping:
ASP service inspect: