Closed tg73 closed 5 years ago
@tg73, such kind of problems could be caused by issue with MTU setting in docker network. Related issues could be found there:
So try settings MTU value to 1400 on your docker host machine and check whether it helps.
@dtretyakov, thanks for your expert tip - adjusting the MTU to 1400 on the container's virtual interface has fixed the problem. From my reading of the various pages you linked (and docker documentation), there is no way to configure docker to apply this MTU as a general default (specifically, this is a Windows Containers problem). In my scenario, because I'm already using a custom image, I added the following to my Dockerfile
:
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
CMD Get-NetIPInterface | Where-Object -FilterScript { $_.InterfaceAlias -like 'vEthernet (Ethernet)*' } | Set-NetIPInterface -NlMtuBytes 1400 ; \
./BuildAgent/run-agent.ps1
This ensures that any new container instance gets the correct MTU setting.
After an otherwise successful build, I'm getting failures with the
NuGet Publish
step. I'm usingNuGet.exe
version 4.7.1, and a image based onjetbrains/teamcity-agent:2018.1.1-windowsservercore-1803
(with added Windows SDK for debugging tools to support symbol server plugin). I am running the build agent image as a swarm of scale 1 (for testing), with default networking. The log looks like this:Host
redacted.redactedinternaldomain
is a ProGet server running within our internal network as a standalone server (no docker involved). The actual domain name does not end in.local
(I'm aware of some issues with that suffix).Running the exact same
nuget push
from a powershell console on the Windows Server 2016 docker host machine works as expected.If I obtain a powershell console on the running docker container and run the exact same
nuget push
explicitly (with the correct-ApiKey
argument added), I get the same error. However, runningnuget list -Source http://redacted.redactedinternaldomain/nuget/internal
works as expected. I find this quite puzzling: from testing on a Windows 10 desktop with Fiddler,nuget list
issues a set of HTTP GET requests, and receives responses;nuget push
issues a single HTTP PUSH and receives a response. From looking at firewall logs on the docker host Windows Server (disclaimer: I am not a networking expert), several incoming UDP packets get blocked when I issue thenuget push
- almost as if the firewall does not recognise the incoming UDP packets as being part of an established outbound connection. Why this would differ forpush
vslist
I have no idea.It would be good to know if the
NuGet Publish
step is working for other people under similar conditions.