10

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
Kalyan
  • 1,880
  • 11
  • 35
  • 62
  • Please post your dockerfile content. But it looks like a network issue. – jannis Oct 05 '18 at 10:35
  • Thanks @jannis for your reply i have added dockerfile content in post – Kalyan Oct 05 '18 at 11:04
  • 3
    What AV (anti-virus) are you using? Try to disabling all AV on your system. – Gregory Suvalian Oct 05 '18 at 11:40
  • Just verified as WFM so I guess this is a network issue. Quoting [this](https://github.com/docker/machine/issues/2318#issuecomment-157553333): "Any unusual networking configuration on your computer? Proxy? VPN? Firewall? Antivirus?" – jannis Oct 05 '18 at 12:32
  • I've tried again and again and finally it downloaded what I wanted. – Rumid Oct 07 '19 at 12:33

3 Answers3

4

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.

nshouppuohsn
  • 119
  • 1
  • 4
  • Bizarrely, enabling and then disabling this option fixed my problem - or it could be a coincidence, but I'm happy either way :) – Peter Morris Jul 10 '19 at 18:26
3

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.

Nathan Clement
  • 1,103
  • 2
  • 18
  • 30
0

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.