Open LUDOBF opened 1 year ago
There seems to be a problem with running containers on this machine. Have you been able to run containers successfully before?
Yes i have. I just tested it again. I can run containers with the following command without problems:
$artifactUrl = Get-BcArtifactUrl -country us -select latest
New-BcContainer -accept_eula -containerName test -auth UserPassword -artifactUrl $artifactUrl -updateHosts -alwaysPull -isolation hyperv
I also noticed, when i restart my laptop i get another error first. After that i get the error i first posted.
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.
Reading .github\AL-Go-Settings.json
Reading .AL-Go\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 from CDN
Using 7zip
BcContainerHelper version 4.0.10
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Reading .github\AL-Go-Settings.json
Reading .AL-Go\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/21.3.51409.52252/us
Updating app- and test Dependencies
Analyzing Test App Dependencies
Checking project dependencies
Checking appDependencyProbingPaths
WARNING: No performance test apps found in bcptTestFolders in .AL-Go\settings.json
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/21.3.51409.52252/us
SasToken Not Specified
BcAuthContext Not Specified
Environment
ReUseContainer False
KeepContainer True
Auth UserPassword
Credential Specified
CompanyName
MemoryLimit 8G
FailOn error
TreatTestFailuresAsWarnings False
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
doNotPublishApps False
uninstallRemovedApps False
escapeFromCops False
doNotBuildTests False
doNotRunTests True
doNotRunBcptTests True
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
ContainerEventLogFile
TestResultsFile C:\Users\User\Documents\AL\app1\TestResults.xml
BcptTestResultsFile C:\Users\User\Documents\AL\app1\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\User\Documents\AL\app1\app1
Test application folders
- None
BCPT Test application folders
- None
Custom CodeCops
- None
_____ _ _ _ _ _
| __ \ | | (_) (_) (_)
| |__) | _| | |_ _ __ __ _ __ _ ___ _ __ ___ _ __ _ ___ _ _ __ ___ __ _ __ _ ___
| ___/ | | | | | | '_ \ / _` | / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
| | | |_| | | | | | | | (_| | | (_| | __/ | | | __/ | | | (__ | | | | | | | (_| | (_| | __/
|_| \__,_|_|_|_|_| |_|\__, | \__, |\___|_| |_|\___|_| |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
__/ | __/ | __/ |
|___/ |___/ |___/
Pulling mcr.microsoft.com/businesscentral:10.0.20348.1487
Pulling generic image took 3 seconds
_____ _ _ _ _
/ ____| | | (_) | | (_)
| | _ __ ___ __ _| |_ _ _ __ __ _ ___ ___ _ __ | |_ __ _ _ _ __ ___ _ __
| | | '__/ _ \/ _` | __| | '_ \ / _` | / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
| |____| | | __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | | __/ |
\_____|_| \___|\__,_|\__|_|_| |_|\__, | \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
__/ |
|___/
BcContainerHelper is version 4.0.10
BcContainerHelper is not running as administrator
UsePsSession is False
Host is Microsoft Windows 11 Pro - 21H2
Docker Client Version is 20.10.22
Docker Server Version is 20.10.22
Removing Desktop shortcuts
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.1487
Creating Container bcserver
Style: sandbox
Multitenant: Yes
Version: 21.3.51409.52252
Platform: 21.0.51393.51935
Generic Tag: 1.0.2.13
Container OS Version: 10.0.20348.1487 (ltsc2022)
Host OS Version: 10.0.22000.1455 (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\User\Documents\AL\app1: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.20348.1487
b4f481d29c43583ab7c38c60edf2863fd14b4c54a77243d91c09b84ee159ebdd
Waiting for container bcserver to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/21.3.51409.52252/us
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\21.3.51409.52252\platform\ServiceTier\Program Files
c:\dl\sandbox\21.3.51409.52252\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\21.3.51409.52252\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\21.3.51409.52252\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\21.3.51409.52252\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\21.3.51409.52252\platform
c:\dl\sandbox\21.3.51409.52252\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\21.3.51409.52252\us\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\21.3.51409.52252\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\21.3.51409.52252\us\Extensions
Copying Applications
C:\dl\sandbox\21.3.51409.52252\platform\Applications
Copying Applications.US
C:\dl\sandbox\21.3.51409.52252\us\Applications.US
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
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 138 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.1.86 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.1.86 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.22.160.1 in container hosts file
Starting Container
Hostname is bcserver
PublicDnsName is bcserver
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint F91B450101D1F7987F525B3F4B2795F284A20ADE
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
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
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 admin as SQL User and add to sysadmin
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.
Container IP Address: 172.22.160.52
Container Hostname : bcserver
Container Dns Name : bcserver
Web Client : http://bcserver/BC/?tenant=default
Dev. Server : http://bcserver
Dev. ServerInstance : BC
Dev. Server Tenant : default
Setting bcserver to 172.22.160.52 in host hosts file
Setting bcserver-default to 172.22.160.52 in host hosts file
Setting bcserver-default to 172.22.160.52 in container hosts file
Files:
http://bcserver:8080/ALLanguage.vsix
Container Total Physical Memory is 31.3Gb
Container Free Physical Memory is 14.7Gb
Initialization took 26 seconds
Ready for connections!
container b4f481d29c43583ab7c38c60edf2863fd14b4c54a77243d91c09b84ee159ebdd encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The RPC server is unavailable. (0x6ba)
New-BcContainer Telemetry Correlation Id: cd7fcb8e-ae48-45d7-9472-036fe3de90d3
Run-AlPipeline Telemetry Correlation Id: 667d5861-20b1-4a22-8e5a-4ddc10a7ba49
Removing BcContainerHelper
Error: Error executing script in Container
Stacktrace: bei Invoke-ScriptInBcContainer, C:\Users\User\AppData\Local\Temp\e7c652b2-d5ef-454b-9f1f-f9f2182bee09\BcContainerHelper\ContainerHandling\Invoke-ScriptInNavContainer.ps1: Zeile 269
182bee09\BcContainerHelper\ContainerHandling\New-NavContainer.ps1: Zeile 1936bei <ScriptBlock>, C:\Users\User\AppData\Local\Temp\e7c652b2-d5ef-454b-9f1f-f9f2182bee09\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 647bei <ScriptBlock>, C:\Users\User\AppData\Local\Temp\e7c652b2-d5ef-454b-9f1f-f9f2182bee09\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 840bei <ScriptBlock>, C:\Users\User\AppData\Local\Temp\e7c652b2-d5ef-454b-9f1f-f9f2182bee09\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 783bei <ScriptBlock>, C:\Users\User\AppData\Local\Temp\e7c652b2-d5ef-454b-9f1f-f9f2182bee09\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 766bei Run-AlPipeline, C:\Users\User\AppData\Local\Temp\e7c652b2-d5ef-454b-9f1f-f9f2182bee09\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 731bei CreateDevEnv, C:\Users\User\AppData\Local\Temp\tmp130.tmp.ps1: Zeile 1598
bei <ScriptBlock>, C:\Users\User\Documents\AL\app1\.AL-Go\localDevEnv.ps1: Zeile 123bei <ScriptBlock>, <Keine Datei>: Zeile 1
Sorry for the delay. It looks like you can run containers using hyperv - but process isolation fails. AL-Go will default to process unfortunately and that doesn't work. You can create a setting in c:\programdata\bccontainerhelper\bccontainerhelper.config.json that looks like this:
{
"defaultNewContainerParameters": {
"isolation": "hyperv"
}
}
This should cause containerhelper to use hyperv isolation by default when creating a container.
I will consider adding a question to the wizard to use hyperv isolation
Hey @freddydk thanks for considering to add this feature. It will make thinks a little bit easier / convenient.
I'm trying to follow the steps and i'm stuck at step 10 of the Get Started scenario.
Flushing the cache (Flush-ContainerHelperCache) did nothing.
I always get the following error: