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

localDevEnv.ps1: Error when running: ALTER DATABASE [CRONUS] SET ONLINE #103

Closed
achim-t opened this issue May 5, 2022 · 67 comments
Closed
Labels
Fix Ready Fix Ready

Comments

@achim-t
Copy link

achim-t commented May 5, 2022

Scenario 1, Step 10

F5 in VS Code:

  _                     _   _____             ______
 | |                   | | |  __ \           |  ____|
 | |     ___   ___ __ _| | | |  | | _____   __ |__   _ ____   __
 | |    / _ \ / __/ _` | | | |  | |/ _ \ \ / /  __| | '_ \ \ / /
 | |____ (_) | (__ (_| | | | |__| |  __/\ V /| |____| | | \ V /
 |______\___/ \___\__,_|_| |_____/ \___| \_/ |______|_| |_|\_/

This script will create a docker based local development environment for your project.

NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
If this fails, you can setup a cloud based development environment by running cloudDevEnv.ps1

All apps and test apps will be compiled and published to the environment in the development scope.
The script will also modify launch.json to have a Local Sandbox configuration point to your environment.

Checking .github\AL-Go-Settings.json
Reading .github\AL-Go-Settings.json
Checking .AL-Go\settings.json
Reading .AL-Go\settings.json
Checking .github\.settings.json
Checking .AL-Go\.settings.json
Checking .AL-Go\ataeschner.settings.json
Checking System Requirements

Container name
--------------
Please enter the name of the container to create (default bcserver) algo
algo selected

Authentication mechanism for container
--------------------------------------
a Windows Authentication
b Username/Password authentication

Select authentication mechanism for container (default b)
Username/Password authentication selected

LicenseFileUrl
--------------
When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps

Local path or a secure download URL to license file  (default none)
none selected

Downloading BcContainerHelper latest version
Using 7zip
BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
Checking .github\AL-Go-Settings.json
Reading .github\AL-Go-Settings.json
Checking .AL-Go\settings.json
Reading .AL-Go\settings.json
Checking .github\localDevEnv.settings.json
Checking .AL-Go\localDevEnv.settings.json
Checking .AL-Go\ataeschner.settings.json
Checking type
Checking appFolders and testFolders
Application Dependency 19.0.0.0
Checking artifact setting
Downloading artifacts from https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
Updating app- and test Dependencies
Analyzing Test App Dependencies
WARNING: No test apps found in testFolders in .AL-Go\settings.json
  _____                               _
 |  __ \                             | |
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name               localDevEnv
Container name              algo
Image name
ArtifactUrl                 https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
SasToken                    Not Specified
BcAuthContext               Not Specified
Environment
ReUseContainer              False
KeepContainer               True
Auth                        UserPassword
Credential                  Specified
CompanyName
MemoryLimit                 8G
Enable Task Scheduler       False
Assign Premium Plan         False
Install Test Runner         False
Install Test Framework      False
Install Test Libraries      False
Install Perf. Toolkit       False
InstallOnlyReferencedApps   True
generateDependencyArtifact  False
CopySymbolsFromContainer    False
enableCodeCop               False
enableAppSourceCop          False
enableUICop                 False
enablePerTenantExtensionCop True
doNotPerformUpgrade         False
uninstallRemovedApps        False
escapeFromCops              False
doNotBuildTests             False
doNotRunTests               True
doNotRunBcptTests           False
useDefaultAppSourceRuleSet  False
rulesetFile
azureDevOps                 False
gitLab                      False
gitHubActions               False
License file                Not specified
CodeSignCertPfxFile         Not specified
CodeSignCertPfxPassword     Not specified
CodeSignCertIsSelfSigned    False
KeyVaultCertPfxFile         Not specified
KeyVaultCertPfxPassword     Not specified
KeyVaultClientId
BuildOutputFile             C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\BuildOutput.txt
TestResultsFile             C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\TestResults.xml
BcptTestResultsFile         C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\bcptTestResults.json
TestResultsFormat           JUnit
AdditionalCountries
PackagesFolder
OutputFolder
BuildArtifactFolder
CreateRuntimePackages       False
AppVersion
AppBuild                    0
AppRevision                 0
Install Apps
- None
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\MySpecialApp
Test application folders
- None
BCPT Test application folders
- None
Custom CodeCops
- None

  _____       _ _ _                                          _        _
 |  __ \     | | (_)                                        (_)      (_)
 | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___
 |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
 | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
 |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
                           __/ |   __/ |                                                 __/ |
                          |___/   |___/                                                 |___/

Pulling mcr.microsoft.com/businesscentral:10.0.20348.643

Pulling generic image took 2 seconds

   _____                _   _                               _        _
  / ____|              | | (_)                             | |      (_)
 | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __
 | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
 | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |
  \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
                                     __/ |
                                    |___/

BcContainerHelper is version 3.0.7
BcContainerHelper is running as administrator
Hyper-V is Enabled
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container algo
Removing algo from container hosts file
Removing algo-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\algo
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container algo
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40114
Platform: 20.0.37114.40052
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine:c:\sources"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\algo\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container algo from image mcr.microsoft.com/businesscentral:10.0.20348.643
13efafcf541a721bb3cb236216a1ad5b5bf69713f4d4028d42e00a6a89904033
Waiting for container algo to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40114\us\BusinessCentral-US.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is algo
PublicDnsName is algo
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40114\us\BusinessCentral-US.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is algo
PublicDnsName is algo
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 3367781c-2e3e-4b8c-b9df-3b56ee41f0bc
Run-AlPipeline Telemetry Correlation Id: a548a9e5-4182-48fe-a105-574897d800c6
Removing BcContainerHelper
Press ENTER to close this window:

I can create other BC containers, this script works fine:

$accept_eula = $true

$auth = "UserPassword"
$credential = get-credential -UserName $env:USERNAME -Message "Using $auth Authentication. Please enter your Windows credentials."
$artifactUrl = Get-BCArtifactUrl -country de 
$containerName = "runtest4"
$licenseFile = "##############"
New-BcContainer -accept_eula `
                -containerName $containerName `
                -artifactUrl $artifactUrl `
                -auth $auth `
                -credential $credential `
                -licenseFile $licenseFile `
                -updateHosts `
                -isolation hyperv `
                -assignPremiumPlan `
                -multitenant:$false 
@freddydk
Copy link
Collaborator

freddydk commented May 5, 2022

Does the working script also work if you remove -multitenant:$false?

@achim-t
Copy link
Author

achim-t commented May 5, 2022

Yes.

@freddydk
Copy link
Collaborator

freddydk commented May 5, 2022

Could you share the output from running the second script (the working one) for me to compare?

@achim-t
Copy link
Author

achim-t commented May 5, 2022

BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 3.0.7
BcContainerHelper is running as administrator
Hyper-V is Enabled
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Downloading application artifact /sandbox/20.0.37253.40140/de
Downloading C:\Users\ataeschner\AppData\Local\Temp\c5722c9b-a103-42b5-aad0-d1480dcdbedd.zip
Unpacking application artifact to tmp folder using 7zip
Downloading platform artifact /sandbox/20.0.37253.40140/platform
Downloading C:\Users\ataeschner\AppData\Local\Temp\0893919f-8075-4daa-bbaf-49c40d89612c.zip
Unpacking platform artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40140\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40140\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40140\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.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40140
Platform: 20.0.37114.40119
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using hyperv isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- license.flf
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
37a4edbf1367bb699d90f45ee6394666143314a783b5a78ae8c46bc1ec2c085a
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40140/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40140\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40140\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40140\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40140\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40140\de\BusinessCentral-DE.bak
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'
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40140\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40140\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40140\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40140\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40140\platform
c:\dl\sandbox\20.0.37253.40140\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40140\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40140\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.0.37253.40140\de\Extensions
Copying Applications
C:\dl\sandbox\20.0.37253.40140\platform\Applications
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40140\de\Applications.DE
Starting Business Central Service Tier
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 110 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
WARNING: Container starts with TimeZone = Mitteleuropäische Zeit, which is not recognized in the list of TimeZones.
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 3B3959E8864FF8362277CD09C7D0889148ECFD11
DNS identity runtest4
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Enabling Financials User Experience
Using license file 'c:\run\my\license.flf'
Import License
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating ataeschner as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements. 
It should be at least 8 characters long and contain at least one uppercase 
letter, one lowercase letter, and one number.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ATAESCHNER
Container IP Address: 172.30.202.140
Container Hostname  : runtest4
Container Dns Name  : runtest4
Web Client          : http://runtest4/BC/?tenant=default
Dev. Server         : http://runtest4
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting runtest4 to 172.30.202.140 in host hosts file
Setting runtest4-default to 172.30.202.140 in host hosts file
Setting runtest4-default to 172.30.202.140 in container hosts file

Files:
http://runtest4:8080/ALLanguage.vsix

Container Total Physical Memory is 8.5Gb
Container Free Physical Memory is 5.5Gb

Initialization took 25 seconds
Ready for connections!
Reading CustomSettings.config from runtest4
Creating Desktop Shortcuts for runtest4
Container runtest4 successfully created

Use:
Get-BcContainerEventLog -containerName runtest4 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName runtest4 to get debug information about the container
Enter-BcContainer -containerName runtest4 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName runtest4 to remove the container again
docker logs runtest4 to retrieve information about URL's again

@freddydk
Copy link
Collaborator

freddydk commented May 5, 2022

Thanks - will investigate and get back

@freddydk freddydk added the Under Investigation Issue is under investigation label May 5, 2022
@freddydk
Copy link
Collaborator

freddydk commented May 5, 2022

The big difference here is that the working one is using hyperv isolation
could you delete the line with isolation hyperv in the working one and add this line:
-myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1")

and then share the output?

@achim-t
Copy link
Author

achim-t commented May 5, 2022

$accept_eula = $true

$auth = "UserPassword"
$credential = get-credential -UserName $env:USERNAME -Message "Using $auth Authentication. Please enter your Windows credentials."
$artifactUrl = Get-BCArtifactUrl -country de 
$containerName = "runtest4"
$licenseFile = "C:\Users\ataeschner\Desktop\fin.flf"
New-BcContainer -accept_eula `
                -containerName $containerName `
                -artifactUrl $artifactUrl `
                -auth $auth `
                -credential $credential `
                -licenseFile $licenseFile `
                -updateHosts `
                -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1")
                -assignPremiumPlan 
BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Downloading application artifact /sandbox/20.0.37253.40150/de
Downloading C:\Users\ataeschner\AppData\Local\Temp\4c2a1947-2f39-4680-be03-6b2dc98cc9c2.zip
Unpacking application artifact to tmp folder using 7zip
Downloading platform artifact /sandbox/20.0.37253.40150/platform
Downloading C:\Users\ataeschner\AppData\Local\Temp\1ce8eaae-50f5-44e2-8fa0-5bce4ef182fd.zip
Unpacking platform artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40150\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40150\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40150\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.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40150
Platform: 20.0.37114.40119
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
82ac717f6cecbe896caa82c8bfdb6dc01c2fa800fccb1ec2f15d586335f1cacc
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40150/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40150\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40150/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40150\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: b93b6872-c022-47f2-97db-10e1cf7c8848
Initialization of container runtest4 failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...runtest4 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container runtest4 failed
 


@freddydk
Copy link
Collaborator

freddydk commented May 5, 2022

Great, thank - and once more (added some debug info)

@achim-t
Copy link
Author

achim-t commented May 5, 2022

BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40150
Platform: 20.0.37114.40119
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
f2218c13a3d179617f734781e55e8591197082a634d3c303c063568b53684330
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40150/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40150\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40150/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40150\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40150\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40150\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 1b7e750c-f37e-4b8f-8664-f093a7d09362
Initialization of container runtest4 failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...runtest4 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container runtest4 failed

@freddydk
Copy link
Collaborator

freddydk commented May 5, 2022

Getting closer - could you add another override:

-myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1",
"https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/SetupDatabase.ps1")

I guess this is what they call remote debugging...

@achim-t
Copy link
Author

achim-t commented May 6, 2022

Those 10 retries take a long time.

$accept_eula = $true

$auth = "UserPassword"
$credential = get-credential -UserName $env:USERNAME -Message "Using $auth Authentication. Please enter your Windows credentials."
$artifactUrl = Get-BCArtifactUrl -country de 
$containerName = "runtest4"
$licenseFile = "C:\Users\ataeschner\Desktop\fin.flf"
New-BcContainer -accept_eula `
                -containerName $containerName `
                -artifactUrl $artifactUrl `
                -auth $auth `
                -credential $credential `
                -licenseFile $licenseFile `
                -updateHosts `
                -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1", "https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/SetupDatabase.ps1")
                -assignPremiumPlan 
BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40190
Platform: 20.0.37114.40159
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\SetupDatabase.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- SetupDatabase.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
1dfb28c68e53f81e8e40406cebcfe23ee6a63bb152148c19e7aa61297d6ffaa6
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40190\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40190\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting......... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting............... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting.................. - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting..................... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................ - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting........................... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 04c42333-1fb7-45a6-8c2c-d5d8ef37101f
Initialization of container runtest4 failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...runtest4 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container runtest4 failed

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

Removed the 10 retries and removed the attempt to determine collation.
retry?

(Thanks a million for the help)

@achim-t
Copy link
Author

achim-t commented May 6, 2022

BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40190
Platform: 20.0.37114.40159
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\SetupDatabase.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- SetupDatabase.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
a6dd4e5ff1da7d12e7e732a6ed2ca5f05a3f34a9e09771b2c05af1abb47e3a4e
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40190\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40190\de\BusinessCentral-DE.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 35c9120b-312f-4494-afb5-fa1a2865dc42
Initialization of container runtest4 failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...runtest4 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container runtest4 failed

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

@achim-t
Copy link
Author

achim-t commented May 6, 2022

New-BcContainer -accept_eula `
                -containerName $containerName `
                -artifactUrl $artifactUrl `
                -auth $auth `
                -credential $credential `
                -licenseFile $licenseFile `
                -updateHosts `
                -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1", "https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/SetupDatabase.ps1","https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/navinstall.ps1")
                -assignPremiumPlan 
BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40190
Platform: 20.0.37114.40159
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\SetupDatabase.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\navinstall.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- navinstall.ps1
- SetupDatabase.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
68312761c34f06447984da07c801f0b007fd6640a429ecccadcce6635174861d
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: f05e34e1-601a-4466-87ab-795d8ee2449c
Initialization of container runtest4 failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...runtest4 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container runtest4 failed

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

OK, so I removed the collation thingy - but now it crashes on restore DB
Now I inserted a sleep for 5 minutes to see whether this is a race condition.
A 5 minute sleep is obviously not the solution if this works - but just an indication whether this is a timing issue.
Could you try once more?

@achim-t
Copy link
Author

achim-t commented May 6, 2022

I don't think that took 5 minutes.

BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40190
Platform: 20.0.37114.40159
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\SetupDatabase.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\navinstall.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- navinstall.ps1
- SetupDatabase.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
d8140a6081653404adf47dd8cfe46a2a2760849ea4343b15701fea8b2a756b42
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules

Status   Name               DisplayName                           
------   ----               -----------                           
Running  MSSQL$SQLEXPRESS   SQL Server (SQLEXPRESS)               
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40190/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40190\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40190\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules

Status   Name               DisplayName                           
------   ----               -----------                           
Running  MSSQL$SQLEXPRESS   SQL Server (SQLEXPRESS)               
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Exception was: User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\my\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\my\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\my\SetupDatabase.ps1: line 171
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 2610e637-fd8c-437b-95fe-20c12d1d9562
Initialization of container runtest4 failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...runtest4 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container runtest4 failed

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

Could you remove navinstall and setupdatabase from the myscripts and add

"https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/start.ps1"

instead?

@achim-t
Copy link
Author

achim-t commented May 6, 2022

I found these four errors in the event logs (of the host).

exec's CreateProcess() failed [namespace=moby module=libcontainerd container=d8140a6081653404adf47dd8cfe46a2a2760849ea4343b15701fea8b2a756b42 exec=19de398489c25f202adf9fce05ae340bcfef53354a43ca2687bd8ee7a971c70d error=container d8140a6081653404adf47dd8cfe46a2a2760849ea4343b15701fea8b2a756b42 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The user name or password is incorrect. (0x52e)]

Error running exec 19de398489c25f202adf9fce05ae340bcfef53354a43ca2687bd8ee7a971c70d in container: container d8140a6081653404adf47dd8cfe46a2a2760849ea4343b15701fea8b2a756b42 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The user name or password is incorrect. (0x52e)

exec's CreateProcess() failed [module=libcontainerd namespace=moby container=d8140a6081653404adf47dd8cfe46a2a2760849ea4343b15701fea8b2a756b42 exec=35709ca0116b223cbfd4d11f4176a2df7c528f32fe486a7d11c23d87a470c2f1 error=container d8140a6081653404adf47dd8cfe46a2a2760849ea4343b15701fea8b2a756b42 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The user name or password is incorrect. (0x52e)]

Error running exec 35709ca0116b223cbfd4d11f4176a2df7c528f32fe486a7d11c23d87a470c2f1 in container: container d8140a6081653404adf47dd8cfe46a2a2760849ea4343b15701fea8b2a756b42 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The user name or password is incorrect. (0x52e)

Do you try to use my entered authentication? Because the password I supply to New-BcContainer differs from my user account's.

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

I create a user inside the container - but it doesn't get to that.
Did you try the latest override (start) - did that give these entries?

@achim-t
Copy link
Author

achim-t commented May 6, 2022

Still running that one.

The entries were created on the previous try (also the ones before that). Notice how the container-id matches to the script output.

@achim-t
Copy link
Author

achim-t commented May 6, 2022

Apparently stuck at this step.

PS C:\Users\ataeschner> $auth = "UserPassword"
$credential = get-credential -UserName $env:USERNAME -Message "Using $auth Authentication. Please enter your Windows credentials."
$artifactUrl = Get-BCArtifactUrl -country de 
$containerName = "runtest4"
$licenseFile = "C:\Users\ataeschner\Desktop\fin.flf"
New-BcContainer -accept_eula `
                -containerName $containerName `
                -artifactUrl $artifactUrl `
                -auth $auth `
                -credential $credential `
                -licenseFile $licenseFile `
                -updateHosts `
                -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1", "https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/start.ps1")
                -assignPremiumPlan 
BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Downloading application artifact /sandbox/20.0.37253.40208/de
Downloading C:\Users\ataeschner\AppData\Local\Temp\3fa2557f-ee6c-4935-9a64-432cf6bb27db.zip
Unpacking application artifact to tmp folder using 7zip
Downloading platform artifact /sandbox/20.0.37253.40208/platform
Downloading C:\Users\ataeschner\AppData\Local\Temp\4796dda9-23aa-4855-8d9e-f9bdd6878a18.zip
Unpacking platform artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40208\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40208\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.37253.40208\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.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40208
Platform: 20.0.37114.40159
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\start.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- SetupVariables.ps1
- start.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
5111023db7dbf4ae93a9824dfd08a62f3dddd9426bcc7c77d09482ff7fc0a3a4
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40208/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40208\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40208\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40208\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40208\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40208\de\BusinessCentral-DE.bak
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40208/de
Using installer from 
Copying Platform Artifacts
c:\dl\sandbox\20.0.37253.40208\platform
Copying Application Artifacts
Copying Database
Copying ConfigurationPackages
c:\dl\sandbox\20.0.37253.40208\de\ConfigurationPackages
Copying Extensions
c:\dl\sandbox\20.0.37253.40208\de\Extensions
Copying Applications.*
c:\dl\sandbox\20.0.37253.40208\de\Applications.*
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

Could you try to re-add navinstall to myscripts
I have removed the multi-threaded copy - which should allow me to see were exactly it fails.

@achim-t
Copy link
Author

achim-t commented May 6, 2022

Stuck again.

PS C:\Users\ataeschner> New-BcContainer -accept_eula `
                -containerName $containerName `
                -artifactUrl $artifactUrl `
                -auth $auth `
                -credential $credential `
                -licenseFile $licenseFile `
                -updateHosts `
                -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1", "https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/start.ps1","https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/navinstall.ps1")
                -assignPremiumPlan 

BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40208
Platform: 20.0.37114.40159
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\start.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\navinstall.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- navinstall.ps1
- SetupVariables.ps1
- start.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
e48e2f717c38023e685d50aa6add471fb1675530407f81e6f9bf4743e9a6eb98
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40208/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40208\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40208\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40208\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40208\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40208\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40208\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40208\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40208\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40208\platform
c:\dl\sandbox\20.0.37253.40208\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
'C:\dl\sandbox\20.0.37253.40208\de\ConfigurationPackages'
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40208\de\ConfigurationPackages
'C:\dl\sandbox\20.0.37253.40208\platform\Test Assemblies'
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40208\platform\Test Assemblies
''
''
'C:\dl\sandbox\20.0.37253.40208\de\Extensions'
Copying Extensions
C:\dl\sandbox\20.0.37253.40208\de\Extensions
'C:\dl\sandbox\20.0.37253.40208\platform\Applications'
Copying Applications
C:\dl\sandbox\20.0.37253.40208\platform\Applications
'C:\dl\sandbox\20.0.37253.40208\de\Applications.DE'
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40208\de\Applications.DE
''
Copying dependencies
Copying ReportBuilder
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40208/de
Using installer from 
Copying Platform Artifacts
c:\dl\sandbox\20.0.37253.40208\platform
Copying Application Artifacts
Copying Database
Copying ConfigurationPackages
c:\dl\sandbox\20.0.37253.40208\de\ConfigurationPackages
Copying Extensions
c:\dl\sandbox\20.0.37253.40208\de\Extensions
Copying Applications.*
c:\dl\sandbox\20.0.37253.40208\de\Applications.*
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

Looks like it crashed during reportbuilder copy - i removed that now
You can re-run

@achim-t
Copy link
Author

achim-t commented May 6, 2022

BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40208
Platform: 20.0.37114.40159
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\start.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\navinstall.ps1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- navinstall.ps1
- SetupVariables.ps1
- start.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
49779ff8826550679bd22d89685f4075889f86ad3ff0bed9b4f131c6c5ec78f6
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40208/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40208\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40208\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40208\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40208\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40208\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40208\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40208\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40208\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40208\platform
c:\dl\sandbox\20.0.37253.40208\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
'C:\dl\sandbox\20.0.37253.40208\de\ConfigurationPackages'
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40208\de\ConfigurationPackages
'C:\dl\sandbox\20.0.37253.40208\platform\Test Assemblies'
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40208\platform\Test Assemblies
''
''
'C:\dl\sandbox\20.0.37253.40208\de\Extensions'
Copying Extensions
C:\dl\sandbox\20.0.37253.40208\de\Extensions
'C:\dl\sandbox\20.0.37253.40208\platform\Applications'
Copying Applications
C:\dl\sandbox\20.0.37253.40208\platform\Applications
'C:\dl\sandbox\20.0.37253.40208\de\Applications.DE'
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40208\de\Applications.DE
''
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40208\de\BusinessCentral-DE.bak
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40208/de
Using installer from 
Copying Platform Artifacts
c:\dl\sandbox\20.0.37253.40208\platform
Copying Application Artifacts
Copying Database
Copying ConfigurationPackages
c:\dl\sandbox\20.0.37253.40208\de\ConfigurationPackages
Copying Extensions
c:\dl\sandbox\20.0.37253.40208\de\Extensions
Copying Applications.*
c:\dl\sandbox\20.0.37253.40208\de\Applications.*
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available
Waiting for c:\$tmp$\Applications.*\E\Any.Source.zip to be available

@freddydk
Copy link
Collaborator

freddydk commented May 6, 2022

Then we are back at database collation failing.
I will try to collect the infos from all these outputs and work on adding some resilience over the weekend (need to run now)
I am very thankful to have somebody who can repro this problem consistently - if you are OK with trying a couple of times more next week - it would be great.
Thanks

@achim-t
Copy link
Author

achim-t commented May 6, 2022

Yeah, sure.

@freddydk
Copy link
Collaborator

freddydk commented May 7, 2022

If you could retry with this parameters, I should know whether it is possible to fix this.

 -myscripts @("https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/HelperFunctions.ps1", "https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/start.ps1","https://raw.githubusercontent.com/microsoft/nav-docker/master/override/issue2434/navinstall.ps1")

@achim-t
Copy link
Author

achim-t commented May 9, 2022

Generic time out.

image

@freddydk
Copy link
Collaborator

freddydk commented May 9, 2022

If you run the script as administrator - will it then complete successfully?
And does that change anything on the web client?
Did you try to clean cookies etc. in the browser?

@achim-t
Copy link
Author

achim-t commented May 9, 2022

Running as admin doesn't produce an error. The web client is still not available.

I used a new incognito browser window, so there shouldn't be any cookies saved. A simple curl to http://runtest4/BC also times out.

BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
BcContainerHelper is version 3.0.7
BcContainerHelper is running as administrator
Hyper-V is Enabled
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40301
Platform: 20.0.37114.40239
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\HelperFunctions.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\start.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\navinstall.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\navstart.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\SetupWebClient.ps1
Downloading C:\ProgramData\BcContainerHelper\Extensions\runtest4\my\NAVWebClientManagement.psm1
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.flf
- MainLoop.ps1
- navinstall.ps1
- navstart.ps1
- NAVWebClientManagement.psm1
- SetupNavUsers.ps1
- SetupVariables.ps1
- SetupWebClient.ps1
- start.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
f3fa9e51ab37b1c785ce0a34078e2b7fa2cd744468a4721f075cc6baa9d0cf2c
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40301/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40301\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40301\platform
c:\dl\sandbox\20.0.37253.40301\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40301\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40301\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.0.37253.40301\de\Extensions
Copying Applications
C:\dl\sandbox\20.0.37253.40301\platform\Applications
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40301\de\Applications.DE
Copying dependencies
Copying ReportBuilder
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40301/de
Using installer from 
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40301\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40301\platform
c:\dl\sandbox\20.0.37253.40301\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40301\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40301\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.0.37253.40301\de\Extensions
Copying Applications
C:\dl\sandbox\20.0.37253.40301\platform\Applications
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40301\de\Applications.DE
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
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 116 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 51D82E7F415189D2D3B5FBEA80C6267E0DFDBC6E
DNS identity runtest4
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
a
b
c
New-NAVWebServerInstance -PublishFolder C:\Program Files\Microsoft Dynamics NAV\200\Web Client\WebPublish -WebServerInstance BC -Server localhost -ServerInstance BC -ClientServicesCredentialT
ype NavUserPassword -ClientServicesPort 7046 -WebSitePort 80
1
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
d
e
f
g
Enabling Financials User Experience
Using license file 'c:\run\my\license.flf'
Import License
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating ataeschner as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements. 
It should be at least 8 characters long and contain at least one uppercase 
letter, one lowercase letter, and one number.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ATAESCHNER
Container IP Address: 172.30.204.113
Container Hostname  : runtest4
Container Dns Name  : runtest4
Web Client          : http://runtest4/BC/?tenant=default
Dev. Server         : http://runtest4
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting runtest4 to 172.30.204.113 in host hosts file
Setting runtest4-default to 172.30.204.113 in host hosts file
Setting runtest4-default to 172.30.204.113 in container hosts file

Files:
http://runtest4:8080/ALLanguage.vsix

Container Total Physical Memory is 31.7Gb
Container Free Physical Memory is 7.1Gb

Initialization took 65 seconds
Ready for connections!
Reading CustomSettings.config from runtest4
Creating Desktop Shortcuts for runtest4
Container runtest4 successfully created

Use:
Get-BcContainerEventLog -containerName runtest4 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName runtest4 to get debug information about the container
Enter-BcContainer -containerName runtest4 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName runtest4 to remove the container again
docker logs runtest4 to retrieve information about URL's again

@freddydk
Copy link
Collaborator

freddydk commented May 9, 2022

I can see that all the failing samples were also running as non administrator - just to make sure that running as administrator doesn't actually fix everything - could you try to remove the myscripts totally and re-run as admin (but still without hyperv)

@achim-t
Copy link
Author

achim-t commented May 9, 2022

BcContainerHelper is version 3.0.7
BcContainerHelper is running as administrator
Hyper-V is Enabled
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container runtest4
Removing runtest4 from container hosts file
Removing runtest4-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\runtest4
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container runtest4
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40301
Platform: 20.0.37114.40239
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest4\my:
- AdditionalOutput.ps1
- license.flf
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest4 from image mcr.microsoft.com/businesscentral:10.0.20348.643
aa8446e5756ab3af3ad2caeee04b6a0a65608943e004a1a692431058f66fa7b7
Waiting for container runtest4 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40301/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40301\de\BusinessCentral-DE.bak
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Initializing...
Setting host.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint D5E911AB74C8409A4522A6503E31CA233C5537FC
DNS identity runtest4
Modifying Service Tier Config File with Instance Specific Settings
Service Tier doesn't exist / is not installed
at <ScriptBlock>, C:\Run\navstart.ps1: line 153
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40301/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40301\de\BusinessCentral-DE.bak
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Initializing...
Setting host.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest4
PublicDnsName is runtest4
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint D5E911AB74C8409A4522A6503E31CA233C5537FC
DNS identity runtest4
Modifying Service Tier Config File with Instance Specific Settings
Service Tier doesn't exist / is not installed
at <ScriptBlock>, C:\Run\navstart.ps1: line 153
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: aaac0812-31ee-4071-a5f3-65909b41579b
Initialization of container runtest4 failed
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Wait-NavContainerReady.ps1:42 Zeichen:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...runtest4 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container runtest4 failed
 

@freddydk
Copy link
Collaborator

freddydk commented May 9, 2022

Thanks - will try to collect all the learnings and get back

@freddydk
Copy link
Collaborator

freddydk commented May 9, 2022

Could you remove the -myscripts and use this instead:

-useGenericImage "$(Get-BestGenericImageName)-dev"

and then use a new name (not used before for the container) - like testforfk :-)

Thanks

@achim-t
Copy link
Author

achim-t commented May 9, 2022

New error message.

Webserver is not available, publishing apps works.

BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643-dev
Creating Container runtest6
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40301
Platform: 20.0.37114.40239
Generic Tag: 1.0.2.2
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest6\my:
- AdditionalOutput.ps1
- license.flf
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest6 from image mcr.microsoft.com/businesscentral:10.0.20348.643-dev
fbe6ff540c1e5fadb9293beaa7ac501187710f7f82003789b27c0047505a4a01
Waiting for container runtest6 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40301/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40301\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40301\platform
c:\dl\sandbox\20.0.37253.40301\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40301\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40301\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.0.37253.40301\de\Extensions
Copying Applications
C:\dl\sandbox\20.0.37253.40301\platform\Applications
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40301\de\Applications.DE
Copying dependencies
Copying ReportBuilder
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40301/de
Using installer from 
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40301\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40301\platform
c:\dl\sandbox\20.0.37253.40301\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40301\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40301\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.0.37253.40301\de\Extensions
Copying Applications
C:\dl\sandbox\20.0.37253.40301\platform\Applications
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40301\de\Applications.DE
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
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 122 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest6
PublicDnsName is runtest6
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint EB293E1BC002F281451C19D7C90278FA5E0DBAEB
DNS identity runtest6
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Using license file 'c:\run\my\license.flf'
Import License
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating ataeschner as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements. 
It should be at least 8 characters long and contain at least one uppercase 
letter, one lowercase letter, and one number.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ATAESCHNER
Container IP Address: 172.30.204.171
Container Hostname  : runtest6
Container Dns Name  : runtest6
Web Client          : http://runtest6/BC/?tenant=default
Dev. Server         : http://runtest6
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting runtest6 to 172.30.204.171 in host hosts file
Setting runtest6-default to 172.30.204.171 in host hosts file
Setting runtest6-default to 172.30.204.171 in container hosts file

Files:
http://runtest6:8080/ALLanguage.vsix

Container Total Physical Memory is 31.7Gb
Container Free Physical Memory is 12.3Gb

Initialization took 58 seconds
Ready for connections!
Reading CustomSettings.config from runtest6
container fbe6ff540c1e5fadb9293beaa7ac501187710f7f82003789b27c0047505a4a01 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The RPC server is unav
ailable. (0x6ba)
New-BcContainer Telemetry Correlation Id: 1290e091-2d68-4f72-b98a-9529f44785fa
ScriptHalted
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.7\ContainerHandling\Invoke-ScriptInNavContainer.ps1:114 Zeichen:17
+                 throw
+                 ~~~~~
    + CategoryInfo          : OperationStopped: (:) [], RuntimeException
    + FullyQualifiedErrorId : ScriptHalted

@achim-t
Copy link
Author

achim-t commented May 9, 2022

As admin: there is no error message in the console, but I can still see that error in the event log.

The container behaves the same.

@freddydk
Copy link
Collaborator

freddydk commented May 9, 2022

can you download http://runtest6:8080/ALLanguage.vsix from the container?

@achim-t
Copy link
Author

achim-t commented May 9, 2022

No, timed out.

@freddydk
Copy link
Collaborator

freddydk commented May 9, 2022

and with -isolation hyperv - webclient works and download as well?

@achim-t
Copy link
Author

achim-t commented May 9, 2022

Yes, both.

BcContainerHelper is version 3.0.7
BcContainerHelper is not running as administrator
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643-dev
Creating Container runtest6
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40301
Platform: 20.0.37114.40239
Generic Tag: 1.0.2.2
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using hyperv isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\Users\ataeschner\Desktop\fin.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\runtest6\my:
- AdditionalOutput.ps1
- license.flf
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container runtest6 from image mcr.microsoft.com/businesscentral:10.0.20348.643-dev
c819069a0276f979fe20d1d013b15f26b662ef691476d3c13becd850adb769b5
Waiting for container runtest6 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40301/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40301\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40301\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.0.37253.40301\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.0.37253.40301\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.0.37253.40301\platform
c:\dl\sandbox\20.0.37253.40301\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.0.37253.40301\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.0.37253.40301\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.0.37253.40301\de\Extensions
Copying Applications
C:\dl\sandbox\20.0.37253.40301\platform\Applications
Copying Applications.DE
C:\dl\sandbox\20.0.37253.40301\de\Applications.DE
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
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 111 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.162 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is runtest6
PublicDnsName is runtest6
WARNING: Container starts with TimeZone = Mitteleuropäische Zeit, which is not recognized in the list of TimeZones.
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 48489D73C9F0E88E4E2A64EA6831238AD018AB82
DNS identity runtest6
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Using license file 'c:\run\my\license.flf'
Import License
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating ataeschner as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements. 
It should be at least 8 characters long and contain at least one uppercase 
letter, one lowercase letter, and one number.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ATAESCHNER
Container IP Address: 172.30.197.57
Container Hostname  : runtest6
Container Dns Name  : runtest6
Web Client          : http://runtest6/BC/?tenant=default
Dev. Server         : http://runtest6
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting runtest6 to 172.30.197.57 in host hosts file
Setting runtest6-default to 172.30.197.57 in host hosts file
Setting runtest6-default to 172.30.197.57 in container hosts file

Files:
http://runtest6:8080/ALLanguage.vsix

Container Total Physical Memory is 8.5Gb
Container Free Physical Memory is 5.7Gb

Initialization took 25 seconds
Ready for connections!
Reading CustomSettings.config from runtest6
Creating Desktop Shortcuts for runtest6
Container runtest6 successfully created

Use:
Get-BcContainerEventLog -containerName runtest6 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName runtest6 to get debug information about the container
Enter-BcContainer -containerName runtest6 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName runtest6 to remove the container again
docker logs runtest6 to retrieve information about URL's again

@freddydk
Copy link
Collaborator

@achim-t - can we maybe setup a Teams call to investigate the WebClient issue.
I am unsure whether this is related to the other issue.

If possible, please email me at freddyk at microsoft dot com and give me a few suggested timeslots (30 min should be enough) I can pick between to do some investigations, thanks (excluding thursday and friday this week as I am OOF)

@achim-t
Copy link
Author

achim-t commented May 10, 2022

I sent an email from my work account.

@rafastrozyk
Copy link

Facing the same issue with localDevEnv.ps1

  _                     _   _____             ______
 | |                   | | |  __ \           |  ____|
 | |     ___   ___ __ _| | | |  | | _____   __ |__   _ ____   __
 | |    / _ \ / __/ _` | | | |  | |/ _ \ \ / /  __| | '_ \ \ / /
 | |____ (_) | (__ (_| | | | |__| |  __/\ V /| |____| | | \ V /
 |______\___/ \___\__,_|_| |_____/ \___| \_/ |______|_| |_|\_/

This script will create a docker based local development environment for your project.

NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
If this fails, you can setup a cloud based development environment by running cloudDevEnv.ps1

All apps and test apps will be compiled and published to the environment in the development scope.
The script will also modify launch.json to have a Local Sandbox configuration point to your environment.

Checking .github\AL-Go-Settings.json
Reading .github\AL-Go-Settings.json
Checking .AL-Go\settings.json
Reading .AL-Go\settings.json
Checking .github\.settings.json
Checking .AL-Go\.settings.json
Checking .AL-Go\rafal.strozyk.settings.json
Checking System Requirements

Container name
--------------
Please enter the name of the container to create (default bcserver)
bcserver selected

Authentication mechanism for container
--------------------------------------
a Windows Authentication
b Username/Password authentication

Select authentication mechanism for container (default b)
Username/Password authentication selected

LicenseFileUrl
--------------
When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps

Local path or a secure download URL to license file  (default none)
none selected

Downloading BcContainerHelper latest version
Using 7zip
BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
Checking .github\AL-Go-Settings.json
Reading .github\AL-Go-Settings.json
Checking .AL-Go\settings.json
Reading .AL-Go\settings.json
Checking .github\localDevEnv.settings.json
Checking .AL-Go\localDevEnv.settings.json
Checking .AL-Go\rafal.strozyk.settings.json
Checking type
Checking appFolders and testFolders
Application Dependency 19.0.0.0
Checking artifact setting
Downloading artifacts from https://bcartifacts.azureedge.net/sandbox/20.1.39764.40482/w1
Updating app- and test Dependencies
Analyzing Test App Dependencies
WARNING: No test apps found in testFolders in .AL-Go\settings.json
  _____                               _
 |  __ \                             | |
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name               localDevEnv
Container name              bcserver
Image name
ArtifactUrl                 https://bcartifacts.azureedge.net/sandbox/20.1.39764.40482/w1
SasToken                    Not Specified
BcAuthContext               Not Specified
Environment
ReUseContainer              False
KeepContainer               True
Auth                        UserPassword
Credential                  Specified
CompanyName
MemoryLimit                 8G
Enable Task Scheduler       False
Assign Premium Plan         False
Install Test Runner         False
Install Test Framework      False
Install Test Libraries      False
Install Perf. Toolkit       False
InstallOnlyReferencedApps   True
generateDependencyArtifact  False
CopySymbolsFromContainer    False
enableCodeCop               False
enableAppSourceCop          False
enableUICop                 False
enablePerTenantExtensionCop True
doNotPerformUpgrade         False
uninstallRemovedApps        False
escapeFromCops              False
doNotBuildTests             False
doNotRunTests               True
doNotRunBcptTests           False
useDefaultAppSourceRuleSet  False
rulesetFile
azureDevOps                 False
gitLab                      False
gitHubActions               False
License file                Not specified
CodeSignCertPfxFile         Not specified
CodeSignCertPfxPassword     Not specified
CodeSignCertIsSelfSigned    False
KeyVaultCertPfxFile         Not specified
KeyVaultCertPfxPassword     Not specified
KeyVaultClientId
BuildOutputFile             C:\Users\rafal.strozyk\Dropbox\Visual Studio Code Projects\BC-getsix-extensions\BuildOutput.txt
TestResultsFile             C:\Users\rafal.strozyk\Dropbox\Visual Studio Code Projects\BC-getsix-extensions\TestResults.xml
BcptTestResultsFile         C:\Users\rafal.strozyk\Dropbox\Visual Studio Code Projects\BC-getsix-extensions\bcptTestResults.json
TestResultsFormat           JUnit
AdditionalCountries
PackagesFolder
OutputFolder
BuildArtifactFolder
CreateRuntimePackages       False
AppVersion
AppBuild                    0
AppRevision                 0
Install Apps
- None
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\Users\rafal.strozyk\Dropbox\Visual Studio Code Projects\BC-getsix-extensions\getsix Extensions
Test application folders
- None
BCPT Test application folders
- None
Custom CodeCops
- None

  _____       _ _ _                                          _        _
 |  __ \     | | (_)                                        (_)      (_)
 | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___
 |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
 | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
 |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
                           __/ |   __/ |                                                 __/ |
                          |___/   |___/                                                 |___/

INFO: Windows 10 21H1/21H2 images are not yet available, using 2004 as these are found to work better than 20H2 on 21H1/21H2
Pulling mcr.microsoft.com/businesscentral:10.0.19041.1415

Pulling generic image took 4 seconds

   _____                _   _                               _        _
  / ____|              | | (_)                             | |      (_)
 | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __
 | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
 | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |
  \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
                                     __/ |
                                    |___/

BcContainerHelper is version 3.0.7
BcContainerHelper is running as administrator
Hyper-V is Enabled
Host is Microsoft Windows 10 Pro - 21H2
Docker Client Version is 20.10.14
Docker Server Version is 20.10.14
Removing container bcserver
Removing bcserver from container hosts file
Removing bcserver-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\bcserver
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.19041.1415
Creating Container bcserver
Style: sandbox
Multitenant: Yes
Version: 20.1.39764.40482
Platform: 20.0.39668.40349
Generic Tag: 1.0.2.1
Container OS Version: 10.0.19041.1415 (2004)
Host OS Version: 10.0.19044.1645 (21H2)
WARNING: Host OS is 21H1 and Container OS is 2004, defaulting to process isolation. If you experience problems, add -isolation hyperv.
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Users\rafal.strozyk\Dropbox\Visual Studio Code Projects\BC-getsix-extensions:c:\sources"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bcserver from image mcr.microsoft.com/businesscentral:10.0.19041.1415
c4ff9c9cc75efa7dc54db03fd35458d8afc251d5891845204d429df3f49bbfd8
Waiting for container bcserver to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.1.39764.40482/w1
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\Program Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.1.39764.40482\w1\BusinessCentral-W1.bak
Initializing...
Setting host.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.25.240.1 in container hosts file
Starting Container
Hostname is bcserver
PublicDnsName is bcserver
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.1.39764.40482/w1
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\Program Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.1.39764.40482\w1\BusinessCentral-W1.bak
Initializing...
Setting host.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.25.240.1 in container hosts file
Starting Container
Hostname is bcserver
PublicDnsName is bcserver
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 868ccbf0-fc6f-42fe-ba81-eaae47409f46
Run-AlPipeline Telemetry Correlation Id: b2585c99-4546-4f4e-9d15-05d10976bf67
Removing BcContainerHelper`

@freddydk
Copy link
Collaborator

@rafastrozyk - if you modify the .github\AL-Go-Settings.json and add a property called:

"bcContainerHelperVersion":  "preview"

then you should be able to retry and succeed.

@rafastrozyk
Copy link

Thanks, a step forward. Yet another error:

   _____                _   _                               _        _
  / ____|              | | (_)                             | |      (_)
 | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __
 | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
 | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |
  \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
                                     __/ |
                                    |___/

BcContainerHelper is version 3.0.8-preview593
BcContainerHelper is running as administrator
Hyper-V is Enabled
Host is Microsoft Windows 10 Pro - 21H2
Docker Client Version is 20.10.14
Docker Server Version is 20.10.14
Removing entires from hosts
Removing bcserver from container hosts file
Removing bcserver-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\bcserver
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.19041.1415
Creating Container bcserver
Style: sandbox
Multitenant: Yes
Version: 20.1.39764.40482
Platform: 20.0.39668.40349
Generic Tag: 1.0.2.1
Container OS Version: 10.0.19041.1415 (2004)
Host OS Version: 10.0.19044.1645 (21H2)
WARNING: Host OS is 21H1 and Container OS is 2004, defaulting to process isolation. If you experience problems, add -isolation hyperv.
Using process isolation
WARNING: Using process isolation on Windows Desktop OS with generic image version prior to 1.0.2.4 or NAV/BC versions prior to 15.0, might require you to use HyperV isolation or disable Windows Defender while creating the container
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Users\rafal.strozyk\Dropbox\Visual Studio Code Projects\BC-getsix-extensions:c:\sources"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bcserver from image mcr.microsoft.com/businesscentral:10.0.19041.1415
be3897aaa4344b25ba358bdc46c0af61d9f1aac4fc67b3dd64753e3233266076
Waiting for container bcserver to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.1.39764.40482/w1
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\Program Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.1.39764.40482\w1\BusinessCentral-W1.bak
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Initializing...
Setting host.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.25.240.1 in container hosts file
Starting Container
Hostname is bcserver
PublicDnsName is bcserver
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 202CB741FC577D50FB1255199783351FA0F6D3CF
DNS identity bcserver
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to False
Service Tier doesn't exist / is not installed
at <ScriptBlock>, C:\Run\navstart.ps1: line 153
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.1.39764.40482/w1
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\Program Files
c:\dl\sandbox\20.1.39764.40482\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.1.39764.40482\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.1.39764.40482\w1\BusinessCentral-W1.bak
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Initializing...
Setting host.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.8.100 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.25.240.1 in container hosts file
Starting Container
Hostname is bcserver
PublicDnsName is bcserver
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 202CB741FC577D50FB1255199783351FA0F6D3CF
DNS identity bcserver
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to False
Service Tier doesn't exist / is not installed
at <ScriptBlock>, C:\Run\navstart.ps1: line 153
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: c4f27967-13c7-4e84-8363-42a9fd2307f0
Run-AlPipeline Telemetry Correlation Id: 3d8f5928-25cd-41b9-8b2f-3e75e527ca99
Removing BcContainerHelper
Initialization of container bcserver failed
At C:\Users\rafal.strozyk\AppData\Local\Temp\21a3f2b3-da5b-45e3-9bf0-da7015c2b606\BcContainerHelper\ContainerHandling\Wait-NavContainerReady.ps1:42 char:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...bcserver failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container bcserver failed

@freddydk
Copy link
Collaborator

Ok, I was expecting the latest preview containerhelper to use the preview generic image - that didn't happen.
I will investigate and get back shortly.

@freddydk
Copy link
Collaborator

If you add this property to the .github\AL-Go-Settings.json

"genericImageName":  "mcr.microsoft.com/businesscentral:{0}-dev"

then it should select the preview.

in 1-2 weeks from now - you can remove these two properties again as things will be out of preview.

Sorry for the inconvenience.

@rafastrozyk
Copy link

It worked, thanks a lot!

@freddydk
Copy link
Collaborator

I have another partner with the same problem, where the web client isn't accessible.
Next version of containerhelper will check the health of the web client after creation and attempt one reboot if the webclient isn't accessible.

@freddydk freddydk added Fix Ready Fix Ready Ships in a future version and removed Under Investigation Issue is under investigation labels May 28, 2022
@freddydk
Copy link
Collaborator

Shipped in v1.5 (and ContainerHelper 3.0.10)

@freddydk
Copy link
Collaborator

@achim-t - thanks for all the help on this

@achim-t
Copy link
Author

achim-t commented May 30, 2022

My pleasure.

I can confirm it is working now.

freddydk added a commit that referenced this issue Nov 2, 2022
'Collect changes from freddydk/*@main'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Ready Fix Ready
Projects
None yet
Development

No branches or pull requests

3 participants