Kalyan
Kalyan

Reputation: 1940

docker error in windows container read tcp : wsarecv: An existing connection was forcibly closed by the remote host

i am using the latest version of docker for windows. the linux container goes smoothly but i am getting below problem

wsarecv: An existing connection was forcibly closed by the remote host.

it occurs for fetching some specific image from repos. In my case i am fetching microsoft/aspnet. i have created a docker file and trying to built my custom image.I have followed the repository instruction for creating a docker file. the picture is given below

enter image description here

after this state i am getting this forcibly closed by remote host error.

my dockerfile content is

FROM microsoft/aspnet:4.7
ARG site_root=.
ADD ${site_root} /inetpub/wwwroot

Upvotes: 10

Views: 19087

Answers (3)

Satish Kumar Nadarajan
Satish Kumar Nadarajan

Reputation: 196

To Debug: Check the blocked connections. Try unblock internet on the machine, before you whitelist the urls one by one.

Allow the below urls- from windows firewall, any corp proxies, corp firewall

  1. "*.docker.io"
  2. "*.docker.com"
  3. "*.microsoft.com" - windows update dependencies for windows containers
  4. "*.mscr.io" -again for microsoft container registries

Worked in my case. Could be more to whitelist, depending on what you are trying to pull.

Upvotes: 0

Nathan Clement
Nathan Clement

Reputation: 1195

I had been consistently encountering this error from inside a corporate network. We added mcr.microsoft.com to a firewall white-list, and everything worked as intended.

Upvotes: 3

nshouppuohsn
nshouppuohsn

Reputation: 119

I am not sure exactly why this one worked, as I was trying to do a pull of a couple microsoft images. But in Settings > General > Expose daemon on tcp://localhost:2375 without TLS, worked for me. Following that I reverted the change but nice to have that on in the back-pocket. Might be related to firewall settings in Windows. I am using Win 10 Professional.

Upvotes: 4

Related Questions