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

404 error downloading sandbox-16.5.15922.0-gb #1252

Closed
rdebath opened this issue Aug 27, 2020 · 15 comments
Closed

404 error downloading sandbox-16.5.15922.0-gb #1252

rdebath opened this issue Aug 27, 2020 · 15 comments

Comments

@rdebath
Copy link

rdebath commented Aug 27, 2020

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

Describe the issue
The container helper gets a 404 error downloading current "SecondToLastMajor" platform artifact.
Looks like someone has let you down.

Scripts used to create container and cause the issue

$navurl = (Get-BCArtifactUrl -select SecondToLastMajor -country $country -storageAccount bcinsider -sasToken $sasToken)

New-NavContainer `
          -verbose `
          -alwaysPull `
          -accept_eula `
          -containerName navserver `
          -useBestContainerOS `
		  -updateHosts `
          -Credential $creds `
          -assignPremiumPlan `
          -AdditionalParameters @(
            "-v c:\temp:c:\temp", "-v c:\tvt:c:\tvt"
            "--network=tlan", "--ip 10.13.74.97"
            ) `
          -auth NavUserPassword `
          -licenseFile 'C:\tvt\tvtfin.flf' `
          -imagename navimage `
          -artifactUrl $navurl

Full output of scripts

Fetching artifact name
URL  [REMOVED]
Set user as TVision
Calling nav-containerhelper to create new container
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_OperatingSystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_OperatingSystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
NavContainerHelper is version 0.7.0.26
NavContainerHelper is running as administrator
Host is Microsoft  - 1909
Docker Client Version is 19.03.12
Docker Server Version is 19.03.12
ArtifactUrl and ImageName specified
Fetching all docker images
Image navimage:sandbox-16.5.15922.0-gb doesn't exist
Building image navimage:sandbox-16.5.15922.0-gb based on https://bcinsider.azureedge.net/sandbox/16.5.15922.0/gb
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_OperatingSystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_OperatingSystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
Pulling latest image mcr.microsoft.com/dynamicsnav:10.0.18363.1016-generic
10.0.18363.1016-generic: Pulling from dynamicsnav
Generic Tag: 0.1.0.19
Container OS Version: 10.0.18363.1016 (1909)
Host OS Version: 10.0.18363.1016 (1909)
Downloading platform artifact /sandbox/16.5.15922.0/platform
Downloading C:\Users\TVision\AppData\Local\Temp\2da0748d-a30c-468d-863b-327f7384a6fb.zip
Retrying download...
Downloading C:\Users\TVision\AppData\Local\Temp\2da0748d-a30c-468d-863b-327f7384a6fb.zip
Download-File : Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not
Found."
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.7.0.26\Misc\Download-Artifacts.ps1:173 char:29
+ ...             Download-File -sourceUrl $platformUrl -destinationFile $p ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Download-File], MethodInvocationException
    + FullyQualifiedErrorId : WebException,Download-File

$ 
...

Additional context

  • Works with other versions.
@freddydk
Copy link
Contributor

I can see that that build has a problem - there are newer builds available, which are working - if you re-run you will likely get 15931 or 15935

@NKarolak
Copy link

For DE, I am still getting 15922. Do you know when the newer builds will be available?

@rdebath
Copy link
Author

rdebath commented Aug 28, 2020

Yes, The last GB version is also still 15922.

I was waiting 24 hours in the hope that it would build again, though it looks like my (sacrificial) Window Docker PC has died again so I'm probably going to have to wait til Monday.

@freddydk
Copy link
Contributor

I have deleted the faulty version 15922 (the one without a platform)
I will fix Get-BcArtifactUrl to only return versions where country (and platform) is present - next version.

I have emailed our build team (who are responsible for publishing artifacts) that all country versions are not present.
Grabbing w1 gives you 15952, but de and gb are now 15905.

@NKarolak
Copy link

Confirmed, thank you Freddy.

@Rukkulakki
Copy link

As I am propably experiencing the same problem, I will write it here. I was testing the Download-Artifacts and the -includePlatform will regularly give you a 404 Not found error.
So for instance:
Download-Artifacts -artifactUrl (Get-BCArtifactUrl -country dk -type OnPrem -version 15.0.0.0 -select Closest) runs fine, while
Download-Artifacts -artifactUrl (Get-BCArtifactUrl -country dk -type OnPrem -version 15.0.0.0 -select Closest) -includePlatform gives you error

Download-File : Exception calling "DownloadFile" with "2" argument(s): "Fjernserveren returnerede en fejl: (404) Ikke fundet."
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.7.0.23\Misc\Download-Artifacts.ps1:206 char:45

  • ... Download-File -sourceUrl $url -destinationFile $path -tim ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Download-File], MethodInvocationException
    • FullyQualifiedErrorId : WebException,Download-File

@jwikman
Copy link
Contributor

jwikman commented Aug 28, 2020

I will fix Get-BcArtifactUrl to only return versions where country (and platform) is present - next version.

@freddydk if you do this change - are there any other routine in place that will catch these kind of issues with the builds? At least now you get notified by partners if something fails. We do not want to run our pipelines on old build for weeks without someone being notified that the builds are failing.

You shouldn't need to email the build team about these kinds of problem, they should know already and be working on a fix. :)

btw, still get 404 error for platform for Swedish nextminor.
https://bcinsider.azureedge.net/sandbox/16.5.15946.0/se
https://bcinsider.azureedge.net/sandbox/16.5.15946.0/platform

@freddydk
Copy link
Contributor

The error with 15946 and the missing platform should be fixed with the checkin I just made.
The problem occured Wednesday evening - this issue was reported Thursday morning - I don't know when the build team would have discovered this without this issue - but it wouldn't take weeks.

@freddydk
Copy link
Contributor

@Rukkulakki - the issue you are facing here is probably what I talk about here: https://freddysblog.com/2020/08/18/one-of-these-days/
update the containerhelper and it should work

@Rukkulakki
Copy link

p

The issue sounds much like the one I am facing, but unfurtunately an update did not help

PS C:\Windows\system32> Update-Module navcontainerhelper

PS C:\Windows\system32> Download-Artifacts -artifactUrl (Get-BCArtifactUrl -country dk -type OnPrem -version 15.3.0.0 -select Closest) -includePlatform
Downloading application artifact /onprem/15.3.40074.40822/dk
Downloading C:\Users\sh\AppData\Local\Temp\66fe41c0-0f8f-4316-adce-a71aeec8b2b3.zip
Unpacking application artifact to tmp folder using Expand-Archive
c:\bcartifacts.cache\onprem\15.3.40074.40822\dk
Downloading platform artifact /onprem/15.3.40074.40822/platform
Downloading C:\Users\sh\AppData\Local\Temp\33e68813-ff18-481d-9948-afa7fce716d6.zip
Unpacking platform artifact to tmp folder using Expand-Archive
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\onprem\15.3.40074.40822\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
Downloading c:\bcartifacts.cache\onprem\15.3.40074.40822\platform\Prerequisite Components\Microsoft Report Viewer 2015\ReportViewer.msi
Downloading c:\bcartifacts.cache\onprem\15.3.40074.40822\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Download-File : Exception calling "DownloadFile" with "2" argument(s): "Fjernserveren returnerede en fejl: (404) Ikke fundet."
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.7.0.23\Misc\Download-Artifacts.ps1:206 char:45

  • ... Download-File -sourceUrl $url -destinationFile $path -tim ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Download-File], MethodInvocationException
    • FullyQualifiedErrorId : WebException,Download-File

PS C:\Windows\system32> get-installedmodule navcontainerhelper

Version Name Repository Description


0.7.0.26 navcontainerhelper PSGallery PowerShell module

@Rukkulakki
Copy link

Works in the bccontainerhelper.

PS C:\Windows\system32> install-module bccontainerhelper -AllowClobber

PS C:\Windows\system32> Download-Artifacts -artifactUrl (Get-BCArtifactUrl -country dk -type OnPrem -version 15.3.0.0 -select Closest) -includePlatform
c:\bcartifacts.cache\onprem\15.3.40074.40822\dk
c:\bcartifacts.cache\onprem\15.3.40074.40822\platform

@jwikman
Copy link
Contributor

jwikman commented Aug 28, 2020

Thanks @freddydk, The fix seems to work as intended 👍

Now 16.5.15905.0 is used as Next Minor instead of 16.5.15946.0 that failed on platform.

Lets hope that the build team has some routine for securing this going forward. ;-)

@freddydk
Copy link
Contributor

@Rukkulakki did you remember to restart containerhelper after update - else it won't work.
Potentially also Flush-ContainerHelperCache (even though your issue seems not to be this)

@Rukkulakki
Copy link

@freddydk I think I even tried restarting the entire powershell application, but something must have gone wrong at my end.
Went to try it again to recreate, but now after uninstalling bccontainerhelper, navcontainerhelper was at version 0.7.0.23.
Update-Module navcontainerhelper -> Restart application -> Retry -> And platform works like a charm.

@freddydk
Copy link
Contributor

I do recommend using bccontainerhelper though:-)
navcontainerhelper is "parked"

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

No branches or pull requests

5 participants