microsoft / navcontainerhelper

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

Error Creating a container with last BCContainerHelper for a BC 14 version #2314

Closed Steven-Bale closed 2 years ago

Steven-Bale commented 2 years ago

Hello,

I tried to run this PSScript : _$containerName = 'bc14' $password = 'XXXXX' $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $credential = New-Object pscredential 'XXXXX', $securePassword $auth = 'UserPassword' $artifactUrl = Get-BcArtifactUrl -type 'OnPrem' -country 'fr' -select 'Latest' -version '14.29.47804.0'

Get-BcArtifactUrl -type 'Sandbox' -version '14.29.47804.0' -country 'fr' -select 'Closest'

New-BcContainer -accept_eula -containerName $containerName -credential $credential -auth $auth -artifactUrl $artifactUrl -imageName 'mybcimage' -isolation 'hyperv' -memoryLimit 8G -includeCSIDE -doNotExportObjectsToText ` -updateHosts_

New-BcContainerBCUser -containerName $containerName -Credential $credential -ChangePasswordAtNextLogOn:$false -PermissionSetId SUPER

But i had the following log during creation : _New-BcContainerBCUser -containerName $containerName -Credential $credential -ChangePasswordAtNextLogOn:$false -PermissionSetId SUPER BcContainerHelper is version 3.0.0 BcContainerHelper is running as administrator Host is Microsoft Windows 11 Pro - 21H2 Docker Client Version is 20.10.12 Docker Server Version is 20.10.12 Downloading application artifact /onprem/14.29.47804.0/fr Downloading C:\Users\StevenBalé\AppData\Local\Temp\b496db32-ab23-4c7c-82b3-bab6663a38ca.zip Unpacking application artifact to tmp folder using 7zip Fetching all docker images Fetching all docker volumes ArtifactUrl and ImageName specified WARNING: Unable to find matching generic image for your host OS. Using mcr.microsoft.com/businesscentral:10.0.20348.524 Building image mybcimage:onprem-14.29.47804.0-fr based on mcr.microsoft.com/businesscentral:10.0.20348.524 with https://bcartifacts.azureedge.net/onprem/14.29.47804.0/ fr Pulling latest image mcr.microsoft.com/businesscentral:10.0.20348.524 10.0.20348.524: Pulling from businesscentral Digest: sha256:6a94d69217ee35c4f827bc08c307f1ed3f2a8e1e615ab1f0e03e52b6284ee6ec Status: Image is up to date for mcr.microsoft.com/businesscentral:10.0.20348.524 mcr.microsoft.com/businesscentral:10.0.20348.524 Generic Tag: 1.0.2.1 Container OS Version: 10.0.20348.524 (ltsc2022) Host OS Version: 10.0.22000.434 (21H2) Using process isolation Files in c:\bcartifacts.cache\uwk5kgnp.3we\my: Copying Platform Artifacts c:\bcartifacts.cache\onprem\14.29.47804.0\platform Copying Database Copying Licensefile Copying Installers C:\bcartifacts.cache\onprem\14.29.47804.0\fr\Installers Copying TestToolKit C:\bcartifacts.cache\onprem\14.29.47804.0\fr\TestToolKit Copying UpgradeToolKit C:\bcartifacts.cache\onprem\14.29.47804.0\fr\UpgradeToolKit Copying Extensions C:\bcartifacts.cache\onprem\14.29.47804.0\fr\Extensions c:\bcartifacts.cache\uwk5kgnp.3we Sending build context to Docker daemon 1.183GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:10.0.20348.524 ---> ec337f4a98bc Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=N artifactUrl=https://bcartifacts.azureedge.net/onprem/14.29.47804. 0/fr filesOnly=False ---> Running in 5f5a742dfd3d Removing intermediate container 5f5a742dfd3d ---> 80c467459d71 Step 3/6 : COPY my /run/ ---> 1c1ecdcc371f Step 4/6 : COPY NAVDVD /NAVDVD/ ---> 3836827e412d Step 5/6 : RUN \Run\start.ps1 -installOnly ---> Running in 19a2de3b1e12 Using installer from C:\Run\130 Installing Business Central Installing Url Rewrite Installing OpenXML Installing DotNetCore Starting Local SQL Server WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to start... Starting Internet Information Server Copying Service Tier Files Copying Web Client Files Copying Windows Client Files Copying PowerShell Scripts Copying ConfigurationPackages Copying Test Assemblies Copying TestToolKit Copying UpgradeToolKit Copying Extensions Copying ClientUserSettings Copying ReportBuilder Restoring CRONUS Demo Database Determining Database Collation Changing Database Server Collation to French_100_CI_AS Restoring CRONUS Demo Database Installing C:\NAVDVD\Installers\FR\RTC\RoleTailoredClient.Local.Fr.msi Skipping C:\NAVDVD\Installers\FR\WebHelp\WebHelp.Local.Fr.msi 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 CRONUS license file Generating Symbol Reference Stopping Business Central Service Tier Installation took 829 seconds Installation complete New-Bcimage Telemetry Correlation Id: dc3ec697-5b30-403e-b0a6-a5b8d133d510 New-BcContainer Telemetry Correlation Id: 63b0bf11-1ef8-47fc-9ad4-15ede9022ad1 Docker Build failed with exit code -1 Au caractère C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.0\ContainerHandling\New-NavImage.ps1:635 : 25

is it related to Telemetry feature ?

freddydk commented 2 years ago

You would see that the Get-BcArtifactUrl also emits telemetry, so I would not expect that to be a problem.

2 things to try

  1. grab the latest containerhelper
  2. remove -imagename 'myimage' from the new-bccontainer
capc0 commented 2 years ago

Are version 14 artifacts removed?

The oldest version is 15 with the following command

Get-BCArtifactUrl -select Latest

freddydk commented 2 years ago

@capc0 - on-premises artifacts should still be there if you specify -type onprem sandbox artifacts are removed over time.

Steven-Bale commented 2 years ago

Hello, I tried but i have this error : cContainerHelper is version 3.0.2 BcContainerHelper is running as administrator Host is Microsoft Windows 11 Professionnel - 21H2 Docker Client Version is 20.10.12 Docker Server Version is 20.10.12 Removing bc14 from container hosts file Removing bc14-* from container hosts file Removing C:\ProgramData\BcContainerHelper\Extensions\bc14 Downloading application artifact /onprem/14.29.47804.0/fr Downloading C:\Users\StevenBalé\AppData\Local\Temp\a49e2064-65e6-492e-a894-4e1b1cd6750a.zip Unpacking application artifact to tmp folder using 7zip Downloading platform artifact /onprem/14.29.47804.0/platform Downloading C:\Users\StevenBalé\AppData\Local\Temp\8baa6f47-1e2e-4842-b1d0-f8c7f8fe3c0a.zip Unpacking platform artifact to tmp folder using 7zip Could not rename 'c:\bcartifacts.cache\onprem\14.29.47804.0\c5wxwycn.dpc' retrying in 5 seconds. Retrying... Could not rename 'c:\bcartifacts.cache\onprem\14.29.47804.0\c5wxwycn.dpc' retrying in 5 seconds. Retrying... Downloading Prerequisite Components Downloading c:\bcartifacts.cache\onprem\14.29.47804.0\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe Downloading c:\bcartifacts.cache\onprem\14.29.47804.0\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi Downloading c:\bcartifacts.cache\onprem\14.29.47804.0\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi Fetching all docker images Fetching all docker volumes Using image mcr.microsoft.com/businesscentral:10.0.20348.524 Creating Container bc14 Style: onprem Multitenant: No Version: 14.29.47804.0 Platform: 14.0.47800.0 Generic Tag: 1.0.2.1 Container OS Version: 10.0.20348.524 (ltsc2022) Host OS Version: 10.0.22000.493 (21H2) Using hyperv isolation Using locale fr-FR Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Files in C:\ProgramData\BcContainerHelper\Extensions\bc14\my:

Steven-Bale commented 2 years ago

ok i found. thanks Steven.

freddydk commented 2 years ago

Yeah - this was a different issue (The paging file is too small for this operation to complete.) Thanks

MarcFB commented 2 years ago

Hi I do have exactly the same error as Steven Bale: "... In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.5\ContainerHandling\New-NavContainer.ps1:1828 Zeichen:15

What is the solution for this? Thanks Marc

freddydk commented 2 years ago

@MarcFB - a lot of different errors occur in the same line and we cannot tell whether it is one or the other. Please create a new issue with full script and output - then we can hint you to what might be wrong.