1

I used the Azure portal to create an Azure ACS for windows containers yesterday 4/19/17. I find that whenever I deploy to it the container can't reach the internet for 2-3 minutes. I logged in to one of the nodes and manual created a container from the same image and it instantly can access the internet.

One difference I see is that the kubernetes owned containers contain an additional transparentNet where the plain docker container only has a nat network.

This is the test code I'm running

 static void Main(string[] args)
    {
        var connectedStopWatch = new Stopwatch();
        var disconnectedStopWatch = new Stopwatch();
        while (true)
        {
            try
            {
                using (var wc = new WebClient())
                {
                    wc.DownloadString("http://google.com");
                    connectedStopWatch.Start();
                }
                Console.WriteLine($"Connected for {connectedStopWatch.ElapsedMilliseconds} ms");
            }
            catch (WebException e)
            {
                connectedStopWatch.Stop();
                disconnectedStopWatch.Start();
                Console.WriteLine($"Disconnected for {disconnectedStopWatch.ElapsedMilliseconds} ms");
            }
            Thread.Sleep(5000);
        }
    }

Dockerfile

FROM microsoft/windowsservercore
COPY ConnectionTest.exe /
ENTRYPOINT ConnectionTest.exe

Does anyone know what could be causing the delay in accessing the internet from the container?

Jack Woodward
  • 455
  • 4
  • 20
  • Azure takes a while to setup and propagate the required artifacts, which you just don't use when you just launch the container with Docker. – Norbert Apr 20 '17 at 19:34
  • any idea what those artifacts would be or if there is a way to see what I'm waiting for? The cluster itself has been up and running for over a day. – Jack Woodward Apr 20 '17 at 19:46
  • During startup type kubectl describe to see what resources it is allocating. There are also delays displayed there. – Norbert Apr 20 '17 at 20:20
  • so I did that, and I can post the results but the gist is that nothing changes except for first seen/last seen times between initial deploy and when calls to google start succeeding. – Jack Woodward Apr 20 '17 at 21:55

1 Answers1

0

This is a known issue tracked here: https://github.com/Azure/acs-engine/issues/519. We are testing a fix for this issue here, but will soon integrate into acs-engine: https://github.com/JiangtianLi/acs-engine/commits/jiangtli-winnat.

A Howe
  • 122
  • 2
  • This bug seems to still exist. I have a brand new ACS Windows cluster and am seeing delays in outbound connectivity from my container apps. I also see periodic drops in connectivity, with either timeouts or "System.Net.Http.WinHttpException: The server name or address could not be resolved". How should this sort of bug be reported? – BrettRobi Sep 07 '17 at 22:22