microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
376 stars 243 forks source link

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

Open bennyvanlyssebettens opened 1 month ago

bennyvanlyssebettens commented 1 month ago

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue Pulling the latest image mcr.microsoft.com/businesscentral:ltsc2022 fails (time after time, after time) Scripts used to create container and cause the issue

New-BcImage -artifactUrl $artifactUrl -baseImage $baseImage -imageName $imageName -includeTestToolkit -includeTestLibrariesOnly

Full output of scripts

BcContainerHelper version 6.0.19
WinRM service is not running, will not try to use WinRM sessions
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on Windows, PowerShell 5.1.22621.3880
Image: businesscentral/onprem:24.3.21374.21517-w1-ltsc2022
businesscentral/onprem:24.3.21374.21517-w1-ltsc2022
Building image businesscentral/onprem:24.3.21374.21517-w1-ltsc2022 based on mcr.microsoft.com/businesscentral:ltsc2022 with https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/onprem/24.3.21374.21517/w1
Pulling latest image mcr.microsoft.com/businesscentral:ltsc2022
New-BcImage Telemetry Correlation Id: ddcd8ed5-d4e5-4e31-8727-13ddfa291e01
DockerDo : Error response from daemon: Get "https://mcr.microsoft.com/v2/": read tcp [2a02:1812:402:b500:8c0:2734:c223:8bf]:54307->[2603:1061:f:101::10]:443: wsarecv: An existing connection was forcibly c
losed by the remote host.
ExitCode: 1
Commandline: docker pull  mcr.microsoft.com/businesscentral:ltsc2022
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.19\ContainerHandling\New-NavImage.ps1:338 char:21
+ ...                  DockerDo -command pull -imageName $baseImage | Out-N ...
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo

PS C:\WINDOWS\system32> 

Additional context

stefanJeady commented 1 month ago

Also facing this exact issue.

freddydk commented 1 month ago

can you perform this command manually: docker pull mcr.microsoft.com/businesscentral:ltsc2022

bennyvanlyssebettens commented 1 month ago

Hi, I don't have this only when I want to pull images from MS, but also frequently when I clone/sync repo's on Azure Devops. So I started with some investigations... It seems I have all these errors only when I'm working "straight" on my providers connection. When I use one of my clients VPN's of the McAfee VPN service, all is ok.

Conclusion: Not related to BCContainerHelper or even Docker

stefanJeady commented 1 month ago

Can confirm, when using a VPN the issue goes away, however some of our VPN's also have the same issue.