microsoft / navcontainerhelper

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

New-BCContainer fails with nextMajor artifact #2909

Closed fvet closed 1 year ago

fvet commented 1 year ago

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

Describe the issue Trying to install the latest nextmajor, tried 3 times, any clue? The same script used to worked at least 2 weeks ago.

($sasToken variable is the one that expires on 2023-04-01)

Scripts used to create container and cause the issue

$containerName = 'nextmajor' 
$artifactUrl = Get-BcArtifactUrl -storageAccount 'bcinsider' -type 'Sandbox' -country 'us' -select 'Latest' -sasToken $sasToken

New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -includeTestToolkit:$includeTestToolkit `
    -licenseFile $licenseFile `
    -memoryLimit 8G `
    -updateHosts

Full output of scripts

PowerShell Extension v2023.1.0
Copyright (c) Microsoft Corporation.

https://aka.ms/vscode-powershell
Type 'help' to get help.

PS C:\Projects\Dynavision\Scripts> 
PS C:\Projects\Dynavision\Scripts\Development\Docker> . 'C:\Projects\Dynavision\Scripts\Development\Docker\nextmajor.ps1'
BcContainerHelper version 4.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 4.0.7
BcContainerHelper is running as administrator
Hyper-V is Disabled
UsePsSession is True
Host is Microsoft Windows 11 Pro - 21H2
Docker Client Version is 19.03.5
Docker Server Version is 19.03.5
Removing Session nextmajor
Removing container nextmajor
Removing entries from hosts
Removing nextmajor from container hosts file
Removing nextmajor-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\nextmajor
Downloading application artifact /sandbox/22.0.53072.0/us
https://bcinsider.azureedge.net/sandbox/22.0.53072.0/us?sv=2021-06-08&ss=b&srt=sco&spr=https&st=2022-09-15T00%3A00%3A00Z&se=2023-04-01T00%3A00%3A00Z&sp=rl&sig=rBQiC8y0zbuWC66i2BJcVhydR3XD2aaz47aJ6q6zEss%3D
Downloading C:\Users\frederic.vercaemst\AppData\Local\Temp\130e6537-939c-45ab-bb50-4b240cccce7e.zip
Unpacking application artifact to tmp folder using 7zip
Downloading platform artifact /sandbox/22.0.53072.0/platform
https://bcinsider.azureedge.net/sandbox/22.0.53072.0/platform?sv=2021-06-08&ss=b&srt=sco&spr=https&st=2022-09-15T00%3A00%3A00Z&se=2023-04-01T00%3A00%3A00Z&sp=rl&sig=rBQiC8y0zbuWC66i2BJcVhydR3XD2aaz47aJ6q6zEss%3D
Downloading C:\Users\frederic.vercaemst\AppData\Local\Temp\4262f394-6297-482d-81b5-dbca4385d0e6.zip
Unpacking platform artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\22.0.53072.0\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading c:\bcartifacts.cache\sandbox\22.0.53072.0\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.1487
Creating Container nextmajor
Style: sandbox
Multitenant: Yes
Version: 22.0.53072.0
Platform: 22.0.52991.0
Generic Tag: 1.0.2.13
Container OS Version: 10.0.20348.1487 (ltsc2022)
Host OS Version: 10.0.22000.1219 (21H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file *********************************************
Downloading C:\ProgramData\BcContainerHelper\Extensions\nextmajor\my\license.bclicense
Files in C:\ProgramData\BcContainerHelper\Extensions\nextmajor\my:
- AdditionalOutput.ps1
- license.bclicense
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container nextmajor from image mcr.microsoft.com/businesscentral:10.0.20348.1487
15b579c67a2a2bf7dcb47c467b7b330ef031f8493c7c4cf974b8ffcf13ed3f3f
Waiting for container nextmajor to be ready
Using artifactUrl https://bcinsider.azureedge.net/sandbox/22.0.53072.0/us
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\22.0.53072.0\platform\ServiceTier\Program Files
c:\dl\sandbox\22.0.53072.0\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\22.0.53072.0\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\22.0.53072.0\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\22.0.53072.0\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\22.0.53072.0\platform
c:\dl\sandbox\22.0.53072.0\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\22.0.53072.0\us\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\22.0.53072.0\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\22.0.53072.0\us\Extensions
Copying Applications
C:\dl\sandbox\22.0.53072.0\platform\Applications
Copying Applications.US
C:\dl\sandbox\22.0.53072.0\us\Applications.US
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Service 'Dynamics 365 Business Central Server [BC] (MicrosoftDynamicsNavServer$BC)' cannot be started due to the following error: Cannot start service MicrosoftDynamicsNavServer$BC on computer '.'.
at <ScriptBlock>, C:\Run\navinstall.ps1: line 327
at <ScriptBlock>, C:\Run\start.ps1: line 242
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcinsider.azureedge.net/sandbox/22.0.53072.0/us        
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\22.0.53072.0\platform\ServiceTier\Program Files
c:\dl\sandbox\22.0.53072.0\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\22.0.53072.0\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\22.0.53072.0\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\22.0.53072.0\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\22.0.53072.0\platform
c:\dl\sandbox\22.0.53072.0\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\22.0.53072.0\us\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\22.0.53072.0\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\22.0.53072.0\us\Extensions
Copying Applications
C:\dl\sandbox\22.0.53072.0\platform\Applications
Copying Applications.US
C:\dl\sandbox\22.0.53072.0\us\Applications.US
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Service 'Dynamics 365 Business Central Server [BC] (MicrosoftDynamicsNavServer$BC)' cannot be started due to the following error: Cannot start service MicrosoftDynamicsNavServer$BC on computer '.'.
at <ScriptBlock>, C:\Run\navinstall.ps1: line 327
at <ScriptBlock>, C:\Run\start.ps1: line 242
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 0ace9c52-05b7-414d-9c0c-069a58c81dbd
Initialization of container nextmajor failed
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.7\ContainerH 
andling\Wait-NavContainerReady.ps1:42 char:17
+ ...             throw "Initialization of container $containerName failed" ...  
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
    + CategoryInfo          : OperationStopped: (Initialization ...extmajor fai  
   led:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container nextmajor failed       

PS C:\Projects\Dynavision\Scripts\Development\Docker>
...

Additional context

freddydk commented 1 year ago

Please update your BcContainerHelper to latest version and retry

fvet commented 1 year ago

@freddydk That indeed fixed the issue, thanks a lot!