Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build.ps1 gives "Failed to connect to go.microsoft.com port 443: Timed out" #333

Closed
3 tasks done
gthvidsten opened this issue Jul 6, 2020 · 2 comments
Closed
3 tasks done

Comments

@gthvidsten
Copy link

gthvidsten commented Jul 6, 2020

ISSUE

.\Build.ps1 script fails when trying to build mssql-developer image

  • I have tried with the latest version of Docker for Windows (Stable or Edge) or Docker Enterprise.
  • Windows version is at least 1809 / ltsc2019.
  • Windows has the latest updates installed.

Expected behavior

.\Build.ps1 succeeds in creating images

Actual behavior

.\Build.ps1 fails when trying to build the mssql-developer image

Additional information

It seems that when the script tries to build the "mssql-developer" image, it tries to run the following command from the Dockerfile:

Step 5/8 : RUN New-Item -Path 'C:\\install' -ItemType 'Directory' | Out-Null;     curl.exe -sS -L -o C:\\install\\SQL.exe 'https://go.microsoft.com/fwlink/?linkid=840945';     curl.exe -sS -L -o C:\\install\\SQL.box 'https://go.microsoft.com/fwlink/?linkid=840944';     Start-Process -FilePath 'C:\\install\\SQL.exe' -ArgumentList '/qs', '/x:C:\install\setup' -NoNewWindow -Wait;     Start-Process -FilePath 'C:\\install\\setup\\setup.exe' -ArgumentList '/q', '/ACTION=Install', '/INSTANCENAME=MSSQLSERVER', '/FEATURES=SQLEngine', '/UPDATEENABLED=0', '/SQLSVCACCOUNT=\"NT AUTHORITY\System\"', '/SQLSYSADMINACCOUNTS=\"BUILTIN\ADMINISTRATORS\"', '/TCPENABLED=1', '/NPENABLED=0', '/IACCEPTSQLSERVERLICENSETERMS' -NoNewWindow -Wait;     Stop-Service MSSQLSERVER;     Set-ItemProperty -Path 'HKLM:\software\microsoft\microsoft sql server\mssql14.MSSQLSERVER\mssqlserver\supersocketnetlib\tcp\ipall' -Name 'tcpdynamicports' -Value '';     Set-ItemProperty -Path 'HKLM:\software\microsoft\microsoft sql server\mssql14.MSSQLSERVER\mssqlserver\supersocketnetlib\tcp\ipall' -Name 'tcpport' -Value 1433;     Set-ItemProperty -Path 'HKLM:\software\microsoft\microsoft sql server\mssql14.MSSQLSERVER\mssqlserver' -Name 'LoginMode' -Value 2;     curl.exe -sS -L -o C:\\install\\DacFramework.msi 'https://download.microsoft.com/download/9/2/2/9228AAC2-90D1-4F48-B423-AF345296C7DD/EN/x64/DacFramework.msi';     Start-Process -FilePath 'msiexec.exe' -ArgumentList '/i', 'C:\\install\\DacFramework.msi', '/quiet', '/norestart' -NoNewWindow -Wait;     Remove-Item -Path 'C:\\install' -Recurse -Force;

This causes the following output:

curl: (7) Failed to connect to go.microsoft.com port 443: Timed out
curl: (7) Failed to connect to go.microsoft.com port 443: Timed out
Start-Process : This command cannot be run due to the error: The system cannot
find the file specified.
At line:1 char:319
+ ... id=840944'; Start-Process -FilePath 'C:\\install\\SQL.exe' -ArgumentL ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOp
   erationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.C
   ommands.StartProcessCommand

Followed by this output:

Failed: docker image build --isolation 'hyperv' --memory 4GB --build-arg BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2019 --tag 'mssql-developer:2017-windowsservercore-lts
c2019' 'C:\Projects\3rdParty\SitecoreDockerImages\windows\dependencies\mssql-developer-2017'
At C:\Projects\3rdParty\SitecoreDockerImages\modules\SitecoreImageBuilder\1.0.0\Public\Invoke-Build.ps1:234 char:74
+ ... here-Object { $_ } | ForEach-Object { throw "Failed: $buildCommand" }
+                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Failed: docker ...developer-2017':String) [], RuntimeException
    + FullyQualifiedErrorId : Failed: docker image build --isolation 'hyperv' --memory 4GB --build-arg BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2019 --tag 'mssql-devel
   oper:2017-windowsservercore-ltsc2019' 'C:\Projects\3rdParty\SitecoreDockerImages\windows\dependencies\mssql-developer-2017'

So it seems like curl is not able to connect to, and download, the two SQL installation files found on https://go.microsoft.com.
However, if I copy the URLs from log output and try them in my browser they work just fine, so there's nothing wrong with the URLs or my internet connection.

This is on a brand new clone of this repository, so there shouldn't be any problems with old files.

  • Output from docker info:
Client:
 Debug Mode: false

Server:
 Containers: 3
  Running: 0
  Paused: 0
  Stopped: 3
 Images: 6
 Server Version: 19.03.8
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: hyperv
 Kernel Version: 10.0 18363 (18362.1.amd64fre.19h1_release.190318-1202)
 Operating System: Windows 10 Pro Version 1909 (OS Build 18363.900)
 OSType: windows
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.93GiB
 Name: ITUMX-GTH
 ID: OC66:XLNL:V4AC:TYWC:OZQZ:7EBI:AMEL:RX77:Y5NJ:SLHB:LGHK:U74N
 Docker Root Dir: C:\ProgramData\Docker
 Debug Mode: true
  File Descriptors: -1
  Goroutines: 27
  System Time: 2020-07-06T16:20:50.1758845+02:00
  EventsListeners: 1
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
  • Are you running inside a virtualized Windows machine or physical:
    Physical

Steps to reproduce the behavior

  1. Clone the repository into a new folder
  2. Execute .\Build.ps1 -SitecoreUsername <username> -SitecorePassword <password> -Topology "xp"
@gthvidsten
Copy link
Author

This seems to have fixed itself after a reboot.
I still don't think the issue should've appeared in the first place, though, so I believe something still needs looking in to and leave this to the discretion of the admins :)

@pbering
Copy link
Contributor

pbering commented Jul 7, 2020

Hi there, it sounds like you have been hit with a somewhat common issue where containers losses internet access, seems to happen mostly on machines that switches between ethernet, wifi and/or active VPN connections. There is a workaround here: docker/for-win#2760 (comment) that can help counter the problem.

@pbering pbering closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants