Here’s the situation.
I’m running a build from a docker container. (custom image of jetbrains/teamcity-agent)
This build contains a step ‘docker --host hostname build …’
hostname is the host machine running the build agent container.
Another container on the same host is running a nuget server (custom image of microsoft/aspnet:4.6.2)
Once the ‘docker --host build’ command completes, the nuget server remains running, but does not respond to requests on one of the network routes.
During the docker build process the server must be reachable because the build of the image requests nuget packages from this container, and the image build succeeds.
Restarting the nuget server container restores connectivity.
There are variations. Sometimes the nuget server cannot be reached from the host’s mapped ip and port (http://hostname:8880/nuget). Sometimes it cannot be reached from the other docker containers using the container name (http://containername/nuget). It seems to be random which one fails.
From the build agent:
docker --host version
API version: 1.33
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:00:02 2017
API version: 1.35 (minimum version 1.24)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:15:52 2017
I’ve compared the hosts IPV4 routes between working and not working, and they’re exactly the same. I don’t see any errors in the windows event logs.
I do see a lot of information messages like this around the time the image build is performed:
The operation 'Create' succeeded on nic D29E1B6E-FF87-4FB6-B024-E4B99F5E20CD--4DA005EC-7DA1-44A0-9C98-BBF4A32A7A61 (Friendly Name: ). NIC D29E1B6E-FF87-4FB6-B024-E4B99F5E20CD--4DA005EC-7DA1-44A0-9C98-BBF4A32A7A61 (Friendly Name: ) successfully connected to port 77C584F1-BA2B-4F9E-9A91-B81E171AA1AB (Friendly Name: 4da005ec-7da1-44a0-9c98-bbf4a32a7a61) on switch E46D9E7A-D520-4D6C-AE0F-D09ABA06E083(Friendly Name: nat). Networking driver in 87e744582d2721bd30f7a126fa084f665e5b6e06f8964254ae7a4b9ced847bea is loaded and the protocol version is negotiated to the most recent version (Virtual machine ID D29E1B6E-FF87-4FB6-B024-E4B99F5E20CD). NIC D29E1B6E-FF87-4FB6-B024-E4B99F5E20CD--4DA005EC-7DA1-44A0-9C98-BBF4A32A7A61 successfully disconnected from port . The operation 'Delete' succeeded on nic D29E1B6E-FF87-4FB6-B024-E4B99F5E20CD--4DA005EC-7DA1-44A0-9C98-BBF4A32A7A61 (Friendly Name: ). NIC 22339580-D21E-442C-B6F7-6C13084D3896--15D402D1-1A11-4F97-AE62-51D3F9DF697D successfully disconnected from port . The operation 'Delete' succeeded on nic 22339580-D21E-442C-B6F7-6C13084D3896--15D402D1-1A11-4F97-AE62-51D3F9DF697D (Friendly Name: ).
Any ideas on how to diagnose this?