microsoft / nav-arm-templates

ARM (Azure Resource Manager) templates for Microsoft Dynamics NAV
MIT License
54 stars 55 forks source link

Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (401) Unauthorized." #160

Closed JeppeBylov closed 3 years ago

JeppeBylov commented 3 years ago

I've been trying to create three instances of VMs with the aka.ms/getbc ARM template, but each time i get this error: Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (401) Unauthorized."

Here is the full log:

<font color="Green">8:15:35 PM Starting initialization</font>
<font color="Gray">8:15:35 PM Running Windows Server 2019 Datacenter</font>
<font color="Gray">8:15:35 PM Initialize, user: gvtest$</font>
<font color="Gray">8:15:35 PM TemplateLink: https://raw.githubusercontent.com/Microsoft/nav-arm-templates/master/getbc.json</font>
<font color="Gray">8:15:53 PM Installing PowerShellGet 2.2.1</font>
<font color="Gray">8:16:15 PM Installing Internet Information Server (this might take a few minutes)</font>
<font color="Gray">8:18:03 PM Downloading C:\inetpub\wwwroot\default.aspx</font>
<font color="Gray">8:18:03 PM Downloading C:\inetpub\wwwroot\status.aspx</font>
<font color="Gray">8:18:04 PM Downloading C:\inetpub\wwwroot\line.png</font>
<font color="Gray">8:18:04 PM Downloading C:\inetpub\wwwroot\Microsoft.png</font>
<font color="Gray">8:18:04 PM Downloading C:\inetpub\wwwroot\web.config</font>
<font color="Gray">8:18:04 PM Creating Connect.rdp</font>
<font color="Gray">8:18:04 PM Turning off IE Enhanced Security Configuration</font>
<font color="Gray">8:18:04 PM Downloading c:\myfolder\SetupWebClient.ps1</font>
<font color="Gray">8:18:05 PM Downloading c:\demo\SetupDesktop.ps1</font>
<font color="Gray">8:18:05 PM Downloading c:\demo\SetupNavContainer.ps1</font>
<font color="Gray">8:18:05 PM Downloading c:\demo\SetupVm.ps1</font>
<font color="Gray">8:18:05 PM Downloading c:\demo\SetupStart.ps1</font>
<font color="Gray">8:18:06 PM Downloading c:\demo\restartContainers.ps1</font>
<font color="Gray">8:18:06 PM Downloading C:\DEMO\Install-VS2017Community.ps1</font>
<font color="Gray">8:18:08 PM Restarting computer and start Installation tasks</font>
<font color="Gray">8:20:30 PM SetupStart, User: gvtest$</font>
<font color="Gray">8:20:34 PM Installing Latest Business Central Container Helper from PowerShell Gallery</font>
<font color="Gray">8:20:58 PM Using BcContainerHelper version 1.0.13</font>
<font color="Gray">8:20:58 PM Installing Az module</font>
<font color="Gray">8:24:08 PM Installing AzureAD module</font>
<font color="Gray">8:24:23 PM Installing SqlServer module</font>
<font color="Gray">8:24:57 PM Register RestartContainers Task to start container delayed</font>
<font color="Gray">8:24:58 PM Launch SetupVm</font>
<font color="Gray">8:25:03 PM SetupVm, User: vmadmin</font>
<font color="Gray">8:25:05 PM Starting docker</font>
<font color="Gray">8:25:06 PM Enabling Docker API</font>
<font color="Gray">8:25:07 PM Enabling File Download in IE</font>
<font color="Gray">8:25:07 PM Enabling Font Download in IE</font>
<font color="Gray">8:25:07 PM Show hidden files and file types</font>
<font color="Gray">8:25:07 PM Disabling Server Manager Open At Logon</font>
<font color="Gray">8:25:07 PM Add Import bccontainerhelper to PowerShell profile</font>
<font color="Gray">8:25:07 PM Adding Landing Page to Startup Group</font>
<font color="Gray">8:25:10 PM Pulling mcr.microsoft.com/dynamicsnav:10.0.17763.1577-generic (this might take some time)</font>
<font color="Gray">8:25:16 PM 10.0.17763.1577-generic: Pulling from dynamicsnav</font>
<font color="Gray">8:25:16 PM 4612f6d0b889: Already exists</font>
<font color="Gray">8:25:16 PM 680bbdbacf1b: Already exists</font>
<font color="Gray">8:25:16 PM 4e3beecdf45e: Pulling fs layer</font>
<font color="Gray">8:25:16 PM b8e7341e04d6: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 9ef9abd183e6: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 4ef826278438: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 813b68b60fc7: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 5522e2288ed3: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 5533abc6c2ca: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 5c9291d668d5: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 2954bb9ab782: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 75b51560926b: Pulling fs layer</font>
<font color="Gray">8:25:16 PM a47b5aa915ae: Pulling fs layer</font>
<font color="Gray">8:25:16 PM e35af2103925: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 05226bf06156: Pulling fs layer</font>
<font color="Gray">8:25:16 PM e9f6b2cab1c3: Pulling fs layer</font>
<font color="Gray">8:25:16 PM ca6a7e44004b: Pulling fs layer</font>
<font color="Gray">8:25:16 PM 4ef826278438: Waiting</font>
<font color="Gray">8:25:16 PM 813b68b60fc7: Waiting</font>
<font color="Gray">8:25:16 PM 5522e2288ed3: Waiting</font>
<font color="Gray">8:25:16 PM 5533abc6c2ca: Waiting</font>
<font color="Gray">8:25:16 PM 5c9291d668d5: Waiting</font>
<font color="Gray">8:25:16 PM 2954bb9ab782: Waiting</font>
<font color="Gray">8:25:16 PM 75b51560926b: Waiting</font>
<font color="Gray">8:25:16 PM a47b5aa915ae: Waiting</font>
<font color="Gray">8:25:16 PM e35af2103925: Waiting</font>
<font color="Gray">8:25:16 PM 05226bf06156: Waiting</font>
<font color="Gray">8:25:16 PM e9f6b2cab1c3: Waiting</font>
<font color="Gray">8:25:16 PM ca6a7e44004b: Waiting</font>
<font color="Gray">8:25:16 PM 9ef9abd183e6: Verifying Checksum</font>
<font color="Gray">8:25:16 PM 9ef9abd183e6: Download complete</font>
<font color="Gray">8:25:20 PM 4ef826278438: Verifying Checksum</font>
<font color="Gray">8:25:20 PM 4ef826278438: Download complete</font>
<font color="Gray">8:25:20 PM 813b68b60fc7: Verifying Checksum</font>
<font color="Gray">8:25:20 PM 813b68b60fc7: Download complete</font>
<font color="Gray">8:25:20 PM 5522e2288ed3: Verifying Checksum</font>
<font color="Gray">8:25:20 PM 5522e2288ed3: Download complete</font>
<font color="Gray">8:25:20 PM 5533abc6c2ca: Verifying Checksum</font>
<font color="Gray">8:25:20 PM 5533abc6c2ca: Download complete</font>
<font color="Gray">8:25:20 PM 5c9291d668d5: Verifying Checksum</font>
<font color="Gray">8:25:20 PM 5c9291d668d5: Download complete</font>
<font color="Gray">8:25:20 PM b8e7341e04d6: Verifying Checksum</font>
<font color="Gray">8:25:20 PM b8e7341e04d6: Download complete</font>
<font color="Gray">8:25:21 PM 75b51560926b: Verifying Checksum</font>
<font color="Gray">8:25:21 PM 75b51560926b: Download complete</font>
<font color="Gray">8:25:21 PM 4e3beecdf45e: Verifying Checksum</font>
<font color="Gray">8:25:21 PM 4e3beecdf45e: Download complete</font>
<font color="Gray">8:25:22 PM e35af2103925: Verifying Checksum</font>
<font color="Gray">8:25:22 PM e35af2103925: Download complete</font>
<font color="Gray">8:25:23 PM 05226bf06156: Verifying Checksum</font>
<font color="Gray">8:25:23 PM 05226bf06156: Download complete</font>
<font color="Gray">8:25:23 PM e9f6b2cab1c3: Download complete</font>
<font color="Gray">8:25:24 PM ca6a7e44004b: Verifying Checksum</font>
<font color="Gray">8:25:24 PM ca6a7e44004b: Download complete</font>
<font color="Gray">8:25:25 PM a47b5aa915ae: Download complete</font>
<font color="Gray">8:25:27 PM 2954bb9ab782: Verifying Checksum</font>
<font color="Gray">8:25:27 PM 2954bb9ab782: Download complete</font>
<font color="Gray">8:30:18 PM 4e3beecdf45e: Pull complete</font>
<font color="Gray">8:31:57 PM b8e7341e04d6: Pull complete</font>
<font color="Gray">8:31:57 PM 9ef9abd183e6: Pull complete</font>
<font color="Gray">8:32:51 PM 4ef826278438: Pull complete</font>
<font color="Gray">8:32:52 PM 813b68b60fc7: Pull complete</font>
<font color="Gray">8:32:52 PM 5522e2288ed3: Pull complete</font>
<font color="Gray">8:32:53 PM 5533abc6c2ca: Pull complete</font>
<font color="Gray">8:32:53 PM 5c9291d668d5: Pull complete</font>
<font color="Gray">8:34:18 PM 2954bb9ab782: Pull complete</font>
<font color="Gray">8:34:19 PM 75b51560926b: Pull complete</font>
<font color="Gray">8:34:51 PM a47b5aa915ae: Pull complete</font>
<font color="Gray">8:34:51 PM e35af2103925: Pull complete</font>
<font color="Gray">8:34:52 PM 05226bf06156: Pull complete</font>
<font color="Gray">8:34:52 PM e9f6b2cab1c3: Pull complete</font>
<font color="Gray">8:34:53 PM ca6a7e44004b: Pull complete</font>
<font color="Gray">8:34:53 PM Digest: sha256:de39ba7d92d0bab9e8ccfef544f1833352926857822cd2145ccb2b381f307ecb</font>
<font color="Gray">8:34:53 PM Status: Downloaded newer image for mcr.microsoft.com/dynamicsnav:10.0.17763.1577-generic</font>
<font color="Gray">8:34:53 PM Installing Visual C++ Redist</font>
<font color="Gray">8:35:04 PM Installing SQL Native Client</font>
<font color="Gray">8:35:06 PM Installing OpenXML 2.5</font>
<font color="Gray">8:37:55 PM Creating Aad Apps for Office 365 integration</font>
<font color="Gray">8:38:19 PM Using artifactUrl https://bcartifacts.azureedge.net/onprem/17.1.18256.18792/w1</font>
<font color="Gray">8:38:19 PM Country w1</font>
<font color="Gray">8:38:19 PM Version 17.1.18256.18792</font>
<font color="Gray">8:38:19 PM Locale en-US</font>
<font color="Gray">8:38:19 PM Running container (this might take some time)</font>
<font color="Red">8:38:22 PM Container output</font>
<font color="Red">8:38:22 PM Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (401) Unauthorized."</font>
<font color="Red">8:38:22 PM at Download-File, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\1.0.13\Misc\Download-File.ps1: line 53</font>
<font color="Red">8:38:22 PM at New-BcImage, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\1.0.13\ContainerHandling\New-NavImage.ps1: line 370</font>
<font color="Red">8:38:22 PM at New-BcContainer, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\1.0.13\ContainerHandling\New-NavContainer.ps1: line 522</font>
<font color="Red">8:38:22 PM at <ScriptBlock>, C:\demo\SetupNavContainer.ps1: line 340</font>
<font color="Red">8:38:22 PM at <ScriptBlock>, C:\demo\setupVm.ps1: line 296</font>
freddydk commented 3 years ago

This is your license file URL, which is wrong. In PowerShell you should be able to use:

Download-File -sourceUrl $url -destinationFile c:\temp\license.flf

with the URL you specify.