HodorNV / ALOps

ALOps
56 stars 24 forks source link

The CRONUS database has version 0 which is not supported - Issue at Wait for Docker Container #220

Closed JeppeBylov closed 3 years ago

JeppeBylov commented 3 years ago

Describe the bug I have a very simple pipeline creating a container, publishing one app and removing the container again. This morning the pipeline started to fail with the error:

The CRONUS database has version 0 which is not supported by this version of Microsoft Dynamics 365 Business Central Server. Please contact your administrator.
##[error]*** Docker container exited.

This means that the ALOpsLicenseImport step fails with:

Exception creating session: The input ContainerId 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa does not exist, or the corresponding container is not running.
*** Reinitializing!
##[error]The input ContainerId 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa does not exist, or the corresponding container is not running.

the used yaml please provide the yaml that you used. It helps you put the yaml like this:

name: $(Build.BuildId)

trigger:
 branches:
   include:
     - master
     - QA

variables:
- group: 'AzureKeyVault'

pool: default

steps:
- checkout: self
  clean: true 

- task: ALOpsDockerCreate@1
  displayName: 'ALOPS - Create Docker Image' # It will reuse the image if already exists, or build one if it doesn't.
  inputs:
    artifacttype: Sandbox
    artifactcountry: dk

- task: ALOpsDockerStart@1
  displayName: 'ALOPS - Start Docker Container' # No need to provide any details - it will get the details from previous step

- task: ALOpsDockerWait@1
  displayName: 'ALOPS - Wait for Docker Container to start'
  inputs:
    search_string: 'Ready for connections!'

- task: ALOpsLicenseImport@1
  inputs:
    usedocker: true
    license_path: $(ColBC16License)

- task: ALOpsAppCompiler@1
  inputs:
    usedocker: true
    failed_on_warnings: true
    targetproject: './app.json'
    publish_artifact: true

- task: ALOpsAppPublish@1
  inputs:
    usedocker: true
    nav_artifact_app_filter: '*.app'

- task: ALOpsDockerRemove@1
  displayName: 'ALOPS - Remove Docker Container'
  enabled: true
  condition: always()

the output Also the complete output is necessary for us to see what is going on. Also use backtics:

2020-10-09T11:55:15.5882475Z ##[section]Starting: Job
2020-10-09T11:55:15.8149052Z ##[section]Starting: Initialize job
2020-10-09T11:55:15.8150678Z Agent name: 'foodbuildagent'
2020-10-09T11:55:15.8151145Z Agent machine name: 'foodbuildagent'
2020-10-09T11:55:15.8151451Z Current agent version: '2.174.2'
2020-10-09T11:55:15.8180068Z Agent running as: 'jbb'
2020-10-09T11:55:15.8227712Z Prepare build directory.
2020-10-09T11:55:15.8727773Z Set build variables.
2020-10-09T11:55:15.8763519Z Download all required tasks.
2020-10-09T11:55:15.9017191Z Checking job knob settings.
2020-10-09T11:55:15.9024325Z Finished checking job knob settings.
2020-10-09T11:55:15.9398598Z Start tracking orphan processes.
2020-10-09T11:55:15.9466360Z ##[section]Finishing: Initialize job
2020-10-09T11:55:15.9901203Z ##[section]Starting: Download secrets: ColDevSecrets
2020-10-09T11:55:16.0486688Z ==============================================================================
2020-10-09T11:55:16.0487397Z Task         : Azure Key Vault
2020-10-09T11:55:16.0487963Z Description  : Download Azure Key Vault secrets
2020-10-09T11:55:16.0488223Z Version      : 1.175.2
2020-10-09T11:55:16.0488684Z Author       : Microsoft Corporation
2020-10-09T11:55:16.0489262Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-key-vault
2020-10-09T11:55:16.0489636Z ==============================================================================
2020-10-09T11:55:16.5158431Z ##[section]Finishing: Download secrets: ColDevSecrets
2020-10-09T11:55:16.5287683Z ##[section]Starting: Download secrets: ColDevSecrets
2020-10-09T11:55:16.5422226Z ==============================================================================
2020-10-09T11:55:16.5422791Z Task         : Azure Key Vault
2020-10-09T11:55:16.5423063Z Description  : Download Azure Key Vault secrets
2020-10-09T11:55:16.5423314Z Version      : 1.175.2
2020-10-09T11:55:16.5423636Z Author       : Microsoft Corporation
2020-10-09T11:55:16.5424025Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-key-vault
2020-10-09T11:55:16.5424440Z ==============================================================================
2020-10-09T11:55:16.9597492Z SubscriptionId: 3fa9db22-6339-4c6d-b149-b4d5f04c0c6b.
2020-10-09T11:55:16.9598409Z Key vault name: ColDevSecrets.
2020-10-09T11:55:16.9618362Z Downloading secret value for: ColBC16License.
2020-10-09T11:55:17.2975227Z ##[section]Finishing: Download secrets: ColDevSecrets
2020-10-09T11:55:17.3094667Z ##[section]Starting: Checkout BQS@refs/pull/21/merge to s
2020-10-09T11:55:17.3236805Z ==============================================================================
2020-10-09T11:55:17.3237228Z Task         : Get sources
2020-10-09T11:55:17.3237575Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-10-09T11:55:17.3237979Z Version      : 1.0.0
2020-10-09T11:55:17.3238214Z Author       : Microsoft
2020-10-09T11:55:17.3239701Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-10-09T11:55:17.3240211Z ==============================================================================
2020-10-09T11:55:17.8280438Z Syncing repository: BQS (Git)
2020-10-09T11:55:17.8384226Z Prepending Path environment variable with directory containing 'git.exe'.
2020-10-09T11:55:17.8436148Z ##[command]git version
2020-10-09T11:55:17.9294680Z git version 2.26.2.windows.1
2020-10-09T11:55:17.9424073Z ##[command]git lfs version
2020-10-09T11:55:18.0486754Z git-lfs/2.11.0 (GitHub; windows amd64; go 1.14.2; git 48b28d97)
2020-10-09T11:55:18.0538447Z ##[command]git config --get remote.origin.url
2020-10-09T11:55:18.1127971Z ##[command]git clean -ffdx
2020-10-09T11:55:18.1775038Z ##[command]git reset --hard HEAD
2020-10-09T11:55:18.2511640Z HEAD is now at 8dd2021 Merge pull request 21 from TransferringOnlyFirstLineToGL into QA
2020-10-09T11:55:18.2585015Z ##[command]git config gc.auto 0
2020-10-09T11:55:18.3237641Z ##[command]git config --get-all http.https://VWSF@dev.azure.com/VWSF/VWSF/_git/BQS.extraheader
2020-10-09T11:55:18.3875774Z ##[command]git config --get-all http.proxy
2020-10-09T11:55:18.4460635Z ##[command]git config http.version HTTP/1.1
2020-10-09T11:55:18.5115897Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/pull/21/merge:refs/remotes/pull/21/merge
2020-10-09T11:55:18.8338632Z From https://dev.azure.com/VWSF/VWSF/_git/BQS
2020-10-09T11:55:18.8339290Z  * [new branch]      MoveSetupObjectsToAzureBlobStorage -> origin/MoveSetupObjectsToAzureBlobStorage
2020-10-09T11:55:18.9201061Z ##[command]git checkout --progress --force refs/remotes/pull/21/merge
2020-10-09T11:55:18.9390493Z HEAD is now at 8dd2021 Merge pull request 21 from TransferringOnlyFirstLineToGL into QA
2020-10-09T11:55:18.9626616Z ##[section]Finishing: Checkout BQS@refs/pull/21/merge to s
2020-10-09T11:55:18.9747011Z ##[section]Starting: ALOPS - Create Docker Image
2020-10-09T11:55:18.9892459Z ==============================================================================
2020-10-09T11:55:18.9892838Z Task         : ALOps Docker Create
2020-10-09T11:55:18.9893154Z Description  : Create Docker image from Business Central Artifacts
2020-10-09T11:55:18.9893458Z Version      : 1.434.1795
2020-10-09T11:55:18.9893684Z Author       : Hodor
2020-10-09T11:55:18.9893994Z Help         : Create Docker image based on NAV/BC Artifacts.
2020-10-09T11:55:18.9894363Z ==============================================================================
2020-10-09T11:55:20.7262034Z *** Validate configuration
2020-10-09T11:55:21.1490008Z 
2020-10-09T11:55:21.1503095Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
2020-10-09T11:55:21.1514741Z *** To acquire a license, please visit: https://www.alops.be/getlicense
2020-10-09T11:55:21.1525844Z *** For pricing options, please visit : https://www.alops.be/pricing
2020-10-09T11:55:21.1539206Z *** For documentation, please visit   : https://www.alops.be/documentation
2020-10-09T11:55:21.1544507Z 
2020-10-09T11:55:21.4969535Z *** ALOps License:
2020-10-09T11:55:21.4998278Z   * Trial Key  : 909a8b66-f0ee-4e47-a06d-95f66aae4ed9
2020-10-09T11:55:21.5025598Z   * Licensed To: ALOps Trial [12/30] days remaining. Trial ends: Wednesday, 21 October 2020
2020-10-09T11:55:21.5032271Z 
2020-10-09T11:55:21.5840246Z *** Importing required PS-Functions
2020-10-09T11:55:22.2605125Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2020-10-09T11:56:16.1273741Z 
2020-10-09T11:56:16.1285795Z ModuleType Version    Name                                ExportedCommands                                             
2020-10-09T11:56:16.1296406Z ---------- -------    ----                                ----------------                                             
2020-10-09T11:56:16.1345481Z Script     1.0.8      BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...
2020-10-09T11:56:16.1389607Z *** Get Artifact Url for Version [] / Country [dk] / Type [Sandbox]: Latest
2020-10-09T11:56:16.1476045Z ##[command]"Get-BCArtifactUrl" 
2020-10-09T11:56:16.1478424Z Name                           Value                                                                                   
2020-10-09T11:56:16.1480471Z ----                           -----                                                                                   
2020-10-09T11:56:16.1481930Z select                         Latest                                                                                  
2020-10-09T11:56:16.1483357Z type                           Sandbox                                                                                 
2020-10-09T11:56:16.1484694Z country                        dk                                                                                      
2020-10-09T11:56:16.1485347Z 
2020-10-09T11:56:16.1485791Z 
2020-10-09T11:56:16.1487967Z 
2020-10-09T11:56:21.7875976Z *** Artifact Url: [https://bcartifacts.azureedge.net/sandbox/17.0.17126.17504/dk]
2020-10-09T11:56:21.7888979Z *** Build new Image based on [https://bcartifacts.azureedge.net/sandbox/17.0.17126.17504/dk]
2020-10-09T11:56:21.7947649Z *** Artifact Type   : [sandbox]
2020-10-09T11:56:21.7962834Z *** Artifact Version: [17.0.17126.17504]
2020-10-09T11:56:21.7975279Z *** Artifact Country: [dk]
2020-10-09T11:56:22.0677373Z *** OS: [2019]
2020-10-09T11:56:22.8667095Z *** OS version: [10.0.17763.1457]
2020-10-09T11:56:22.8678716Z *** Image Template: [%IMAGE_PREFIX%:%ARTIFACT_TYPE%-%ARTIFACT_VERSION%-%ARTIFACT_COUNTRY%-%OS_VERSION%-%OS_LTSC%]
2020-10-09T11:56:22.8727751Z *** ImageName: [myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019]
2020-10-09T11:56:22.8781688Z *** Set Pipeline variable $(ALOPS_BC_IMAGE) = 'myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019'
2020-10-09T11:56:24.6579521Z Error: No such image: myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019
2020-10-09T11:56:24.6677794Z *** No 'MyScripts' specified, skipping parse.
2020-10-09T11:56:24.6689299Z *** Create Image: myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019
2020-10-09T11:56:25.4699360Z Building image myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019 based on mcr.microsoft.com/dynamicsnav:10.0.17763.1457-generic with https://bcartifacts.azureedge.net/sandbox/17.0.17126.17504/dk
2020-10-09T11:56:25.4728025Z Pulling latest image mcr.microsoft.com/dynamicsnav:10.0.17763.1457-generic
2020-10-09T11:56:25.7703006Z 10.0.17763.1457-generic: Pulling from dynamicsnav
2020-10-09T11:56:25.8736715Z 4612f6d0b889: Pulling fs layer
2020-10-09T11:56:25.8757035Z c3aff4450246: Pulling fs layer
2020-10-09T11:56:25.8771365Z 4c646724ced3: Pulling fs layer
2020-10-09T11:56:25.8786994Z a015adbfa3ae: Pulling fs layer
2020-10-09T11:56:25.8803507Z 2ce9c006723e: Pulling fs layer
2020-10-09T11:56:25.8818662Z ddc80c76fa1f: Pulling fs layer
2020-10-09T11:56:25.8834379Z e99de34c1506: Pulling fs layer
2020-10-09T11:56:25.8849850Z c7188008c4ae: Pulling fs layer
2020-10-09T11:56:25.8888947Z 2ce9c006723e: Waiting
2020-10-09T11:56:25.8907616Z ddc80c76fa1f: Waiting
2020-10-09T11:56:25.8921031Z e99de34c1506: Waiting
2020-10-09T11:56:25.8935796Z a015adbfa3ae: Waiting
2020-10-09T11:56:25.8949548Z c7188008c4ae: Waiting
2020-10-09T11:56:25.8963761Z 29e7b05dddda: Pulling fs layer
2020-10-09T11:56:25.8979209Z 93962d403abf: Pulling fs layer
2020-10-09T11:56:25.8991939Z 0fe1e83bb59a: Pulling fs layer
2020-10-09T11:56:25.9005489Z 29e7b05dddda: Waiting
2020-10-09T11:56:25.9018053Z 93962d403abf: Waiting
2020-10-09T11:56:25.9030745Z 1f3e933eeb44: Pulling fs layer
2020-10-09T11:56:25.9043817Z 0fe1e83bb59a: Waiting
2020-10-09T11:56:25.9058742Z 94a67ab7b52c: Pulling fs layer
2020-10-09T11:56:25.9073830Z 851ce5c69529: Pulling fs layer
2020-10-09T11:56:25.9095729Z 1f3e933eeb44: Waiting
2020-10-09T11:56:25.9109873Z 50fb9a76953b: Pulling fs layer
2020-10-09T11:56:25.9123912Z 94a67ab7b52c: Waiting
2020-10-09T11:56:25.9140554Z 851ce5c69529: Waiting
2020-10-09T11:56:25.9157143Z 50fb9a76953b: Waiting
2020-10-09T11:56:25.9175512Z ce79a0e789ee: Pulling fs layer
2020-10-09T11:56:25.9189649Z d171df54237d: Pulling fs layer
2020-10-09T11:56:25.9201314Z ce79a0e789ee: Waiting
2020-10-09T11:56:25.9216669Z 12383006c79b: Pulling fs layer
2020-10-09T11:56:25.9232706Z d171df54237d: Waiting
2020-10-09T11:56:25.9246386Z 0d2959baa1c1: Pulling fs layer
2020-10-09T11:56:25.9261043Z 12383006c79b: Waiting
2020-10-09T11:56:25.9275023Z 0d2959baa1c1: Waiting
2020-10-09T11:56:29.4603514Z 4c646724ced3: Verifying Checksum
2020-10-09T11:56:29.4619886Z 4c646724ced3: Download complete
2020-10-09T11:56:31.6759289Z c3aff4450246: Verifying Checksum
2020-10-09T11:56:31.6776240Z c3aff4450246: Download complete
2020-10-09T11:56:31.7715267Z 2ce9c006723e: Verifying Checksum
2020-10-09T11:56:31.7733201Z 2ce9c006723e: Download complete
2020-10-09T11:56:33.3924400Z a015adbfa3ae: Verifying Checksum
2020-10-09T11:56:33.3940756Z a015adbfa3ae: Download complete
2020-10-09T11:56:33.4872179Z e99de34c1506: Verifying Checksum
2020-10-09T11:56:33.4889431Z e99de34c1506: Download complete
2020-10-09T11:56:33.6825066Z c7188008c4ae: Verifying Checksum
2020-10-09T11:56:33.6840732Z c7188008c4ae: Download complete
2020-10-09T11:56:33.7704231Z 29e7b05dddda: Verifying Checksum
2020-10-09T11:56:33.7718709Z 29e7b05dddda: Download complete
2020-10-09T11:56:33.8928790Z 93962d403abf: Verifying Checksum
2020-10-09T11:56:33.8943440Z 93962d403abf: Download complete
2020-10-09T11:56:36.6362025Z ddc80c76fa1f: Verifying Checksum
2020-10-09T11:56:36.6375554Z ddc80c76fa1f: Download complete
2020-10-09T11:56:36.7376636Z 1f3e933eeb44: Verifying Checksum
2020-10-09T11:56:36.7391400Z 1f3e933eeb44: Download complete
2020-10-09T11:56:41.3998918Z 94a67ab7b52c: Verifying Checksum
2020-10-09T11:56:41.4013551Z 94a67ab7b52c: Download complete
2020-10-09T11:56:41.5221995Z 851ce5c69529: Verifying Checksum
2020-10-09T11:56:41.5235754Z 851ce5c69529: Download complete
2020-10-09T11:56:41.6233699Z 50fb9a76953b: Verifying Checksum
2020-10-09T11:56:41.6259978Z 50fb9a76953b: Download complete
2020-10-09T11:56:41.7165332Z ce79a0e789ee: Verifying Checksum
2020-10-09T11:56:41.7179996Z ce79a0e789ee: Download complete
2020-10-09T11:56:41.9484379Z d171df54237d: Verifying Checksum
2020-10-09T11:56:41.9499997Z d171df54237d: Download complete
2020-10-09T11:56:42.0762445Z 12383006c79b: Verifying Checksum
2020-10-09T11:56:42.0783589Z 12383006c79b: Download complete
2020-10-09T11:56:42.1685598Z 0d2959baa1c1: Download complete
2020-10-09T11:56:45.2968646Z 0fe1e83bb59a: Download complete
2020-10-09T11:56:46.3564496Z 4612f6d0b889: Verifying Checksum
2020-10-09T11:56:46.3580670Z 4612f6d0b889: Download complete
2020-10-09T11:59:42.2632776Z 4612f6d0b889: Pull complete
2020-10-09T12:02:16.8475203Z c3aff4450246: Pull complete
2020-10-09T12:03:32.4298551Z 4c646724ced3: Pull complete
2020-10-09T12:04:30.4646377Z a015adbfa3ae: Pull complete
2020-10-09T12:04:30.9757478Z 2ce9c006723e: Pull complete
2020-10-09T12:05:06.9022875Z ddc80c76fa1f: Pull complete
2020-10-09T12:05:07.8858842Z e99de34c1506: Pull complete
2020-10-09T12:05:08.3337292Z c7188008c4ae: Pull complete
2020-10-09T12:05:09.2233464Z 29e7b05dddda: Pull complete
2020-10-09T12:05:09.6387109Z 93962d403abf: Pull complete
2020-10-09T12:06:11.1408978Z 0fe1e83bb59a: Pull complete
2020-10-09T12:06:11.8293847Z 1f3e933eeb44: Pull complete
2020-10-09T12:06:34.7857550Z 94a67ab7b52c: Pull complete
2020-10-09T12:06:35.2443707Z 851ce5c69529: Pull complete
2020-10-09T12:06:36.0733920Z 50fb9a76953b: Pull complete
2020-10-09T12:06:36.4891907Z ce79a0e789ee: Pull complete
2020-10-09T12:06:37.2799799Z d171df54237d: Pull complete
2020-10-09T12:06:37.9097673Z 12383006c79b: Pull complete
2020-10-09T12:06:38.6219712Z 0d2959baa1c1: Pull complete
2020-10-09T12:06:38.6984239Z Digest: sha256:9040964f997b96ecc1c050a44e77b3dc9b4174a90422b36325c10afc77fb518e
2020-10-09T12:06:38.7519430Z Status: Downloaded newer image for mcr.microsoft.com/dynamicsnav:10.0.17763.1457-generic
2020-10-09T12:06:38.9369606Z Generic Tag: 0.1.0.23
2020-10-09T12:06:39.1206251Z Container OS Version: 10.0.17763.1457 (ltsc2019)
2020-10-09T12:06:39.1221356Z Host OS Version: 10.0.17763.1457 (ltsc2019)
2020-10-09T12:06:39.1244980Z Using process isolation
2020-10-09T12:06:39.1304593Z Files in c:\bcartifacts.cache\tmp637378419991122660\my:
2020-10-09T12:06:39.1381869Z Copying Platform Artifacts
2020-10-09T12:06:46.0226420Z Copying Database
2020-10-09T12:06:46.3575181Z Copying Licensefile
2020-10-09T12:06:46.3891674Z Copying ConfigurationPackages
2020-10-09T12:06:46.4235261Z Copying Extensions
2020-10-09T12:06:46.7901949Z Copying Applications.DK
2020-10-09T12:06:47.5125991Z c:\bcartifacts.cache\tmp637378419991122660
2020-10-09T12:07:16.3492336Z Sending build context to Docker daemon  1.768GB
2020-10-09T12:07:16.3493198Z 
2020-10-09T12:07:16.4857340Z Step 1/6 : FROM mcr.microsoft.com/dynamicsnav:10.0.17763.1457-generic
2020-10-09T12:07:16.4862676Z  ---> 000b46403bea
2020-10-09T12:07:16.4865056Z Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcartifacts.azureedge.net/sandbox/17.0.17126.17504/dk
2020-10-09T12:07:18.7002072Z  ---> Running in 9933b015b6c4
2020-10-09T12:07:20.4144446Z Removing intermediate container 9933b015b6c4
2020-10-09T12:07:20.4145230Z  ---> 1becad8a16ed
2020-10-09T12:07:20.4146292Z Step 3/6 : COPY my /run/
2020-10-09T12:07:22.1882083Z  ---> 2d137535bb5d
2020-10-09T12:07:22.1883088Z Step 4/6 : COPY NAVDVD /NAVDVD/
2020-10-09T12:08:56.2454113Z  ---> a748071780be
2020-10-09T12:08:56.2456276Z Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant
2020-10-09T12:08:56.3156033Z  ---> Running in e96e4f6fb3db
2020-10-09T12:09:04.4951382Z Using installer from C:\Run\150-new
2020-10-09T12:09:04.6808483Z Installing Business Central
2020-10-09T12:09:04.6938897Z Installing from DVD
2020-10-09T12:09:04.6962475Z Starting Local SQL Server
2020-10-09T12:09:08.8657682Z Starting Internet Information Server
2020-10-09T12:09:09.2544296Z Copying Service Tier Files
2020-10-09T12:09:11.8384756Z Copying PowerShell Scripts
2020-10-09T12:09:13.1417618Z Copying dependencies
2020-10-09T12:09:13.1620849Z Copying ReportBuilder
2020-10-09T12:09:13.2967367Z Importing PowerShell Modules
2020-10-09T12:09:14.2992924Z Determining Database Collation
2020-10-09T12:09:15.8839297Z Changing Database Server Collation to Danish_Greenlandic_100_CS_AS
2020-10-09T12:09:51.4586217Z Restoring CRONUS Demo Database
2020-10-09T12:10:07.2727977Z Exporting Application to CRONUS
2020-10-09T12:12:55.1471163Z Removing Application from tenant
2020-10-09T12:13:01.2983873Z Modifying Business Central Service Tier Config File for Docker
2020-10-09T12:13:01.3387063Z Creating Business Central Service Tier
2020-10-09T12:13:01.4637954Z Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
2020-10-09T12:13:01.7605759Z Copying Web Client Files
2020-10-09T12:13:01.7615560Z Copying Client Files
2020-10-09T12:13:01.7622879Z Copying ModernDev Files
2020-10-09T12:13:01.7632560Z Copying additional files
2020-10-09T12:13:01.7641158Z Copying ConfigurationPackages
2020-10-09T12:13:01.7652399Z Copying Test Assemblies
2020-10-09T12:13:01.7660733Z Copying Extensions
2020-10-09T12:13:01.7668350Z Copying Applications
2020-10-09T12:13:01.7678071Z Copying Applications.DK
2020-10-09T12:13:01.7696215Z Starting Business Central Service Tier
2020-10-09T12:13:16.9836795Z Importing CRONUS license file
2020-10-09T12:13:18.1873264Z Copying Database on localhost\SQLEXPRESS from tenant to default
2020-10-09T12:13:18.3255636Z Taking database tenant offline
2020-10-09T12:13:19.4347590Z Copying database files
2020-10-09T12:13:23.5919530Z Attaching files as new Database default
2020-10-09T12:13:37.2926985Z Putting database tenant back online
2020-10-09T12:13:37.4883515Z Mounting tenant database
2020-10-09T12:13:37.4961029Z Mounting Database for default on server localhost\SQLEXPRESS
2020-10-09T12:16:10.6710803Z Sync'ing Tenant
2020-10-09T12:16:12.6995948Z Tenant is Operational
2020-10-09T12:16:12.7019222Z Stopping Business Central Service Tier
2020-10-09T12:16:12.9745782Z Installation took 428 seconds
2020-10-09T12:16:12.9761959Z Installation complete
2020-10-09T12:19:34.1670442Z Removing intermediate container e96e4f6fb3db
2020-10-09T12:19:34.1671606Z  ---> a5758d7e03d1
2020-10-09T12:19:34.1674467Z Step 6/6 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447"       created="202010091206"       nav=""       cu=""       multitenant="Y" country="DK"       version="17.0.17126.17504"       platform="17.0.17020.17428"
2020-10-09T12:19:34.2631277Z  ---> Running in 5fbed6712de6
2020-10-09T12:19:35.3003247Z Removing intermediate container 5fbed6712de6
2020-10-09T12:19:35.3004353Z  ---> e58b434f003b
2020-10-09T12:19:36.9209401Z Successfully built e58b434f003b
2020-10-09T12:19:36.9788595Z Successfully tagged myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019
2020-10-09T12:19:36.9991634Z Building image took 1392 seconds
2020-10-09T12:19:38.8865395Z *** Created Image: myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019
2020-10-09T12:19:38.8878620Z *** No Docker Registry specified
2020-10-09T12:19:38.8890334Z *** Docker Create Succeeded.
2020-10-09T12:19:38.9008609Z *** Cleanup VSTS Environment: True
2020-10-09T12:19:41.1839826Z ##[section]Finishing: ALOPS - Create Docker Image
2020-10-09T12:19:41.1998797Z ##[section]Starting: ALOPS - Start Docker Container
2020-10-09T12:19:41.2165367Z ==============================================================================
2020-10-09T12:19:41.2165739Z Task         : ALOps Docker Start
2020-10-09T12:19:41.2166069Z Description  : Start a Business Central container
2020-10-09T12:19:41.2166345Z Version      : 1.434.1795
2020-10-09T12:19:41.2166604Z Author       : Hodor
2020-10-09T12:19:41.2167077Z Help         : Start Business Central docker container.
2020-10-09T12:19:41.2167427Z ==============================================================================
2020-10-09T12:19:42.9962254Z *** Importing required PS-Functions
2020-10-09T12:19:44.1055918Z *** Validate configuration
2020-10-09T12:19:44.5950993Z 
2020-10-09T12:19:44.5965234Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
2020-10-09T12:19:44.5978974Z *** To acquire a license, please visit: https://www.alops.be/getlicense
2020-10-09T12:19:44.5989996Z *** For pricing options, please visit : https://www.alops.be/pricing
2020-10-09T12:19:44.6001217Z *** For documentation, please visit   : https://www.alops.be/documentation
2020-10-09T12:19:44.6007332Z 
2020-10-09T12:19:44.9430626Z *** ALOps License:
2020-10-09T12:19:44.9456936Z   * Trial Key  : 909a8b66-f0ee-4e47-a06d-95f66aae4ed9
2020-10-09T12:19:44.9491206Z   * Licensed To: ALOps Trial [11/30] days remaining. Trial ends: Wednesday, 21 October 2020
2020-10-09T12:19:44.9496905Z 
2020-10-09T12:19:46.0363383Z ##[command]"docker" create --env accept_eula=Y --env accept_outdated=Y --restart no --label TFSBuild=BQS_62 myimage:sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019
2020-10-09T12:19:46.4330622Z *** Checking for Assemblies in App
2020-10-09T12:19:46.4437168Z ##[command]"docker" start 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa
2020-10-09T12:19:48.4749698Z *** Container Started: 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa
2020-10-09T12:19:48.8607871Z *** Container Labels:
2020-10-09T12:19:48.8671967Z 
2020-10-09T12:19:48.8672944Z 
2020-10-09T12:19:48.8688057Z TFSBuild    : BQS_62
2020-10-09T12:19:48.8688854Z country     : DK
2020-10-09T12:19:48.8691379Z created     : 202010091206
2020-10-09T12:19:48.8691822Z cu          : 
2020-10-09T12:19:48.8694367Z eula        : https://go.microsoft.com/fwlink/?linkid=861843
2020-10-09T12:19:48.8696467Z legal       : http://go.microsoft.com/fwlink/?LinkId=837447
2020-10-09T12:19:48.8698239Z maintainer  : Dynamics SMB
2020-10-09T12:19:48.8699937Z multitenant : Y
2020-10-09T12:19:48.8700937Z nav         : 
2020-10-09T12:19:48.8702488Z osversion   : 10.0.17763.1457
2020-10-09T12:19:48.8704942Z platform    : 17.0.17020.17428
2020-10-09T12:19:48.8706762Z tag         : 0.1.0.23
2020-10-09T12:19:48.8708316Z version     : 17.0.17126.17504
2020-10-09T12:19:48.8709537Z 
2020-10-09T12:19:49.0062830Z *** Docker Start OK.
2020-10-09T12:19:49.0063302Z *** Cleanup VSTS Environment: True
2020-10-09T12:19:51.3307746Z ##[section]Async Command Start: Add Build Tag
2020-10-09T12:19:51.3308385Z Build '62' has following tags now: myimage-sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019, BC.Platform.17.0.17020.17428, BC.Version.17.0.17126.17504
2020-10-09T12:19:51.3308831Z ##[section]Async Command End: Add Build Tag
2020-10-09T12:19:51.3309777Z ##[section]Async Command Start: Add Build Tag
2020-10-09T12:19:51.3310355Z Build '62' has following tags now: myimage-sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019, BC.Platform.17.0.17020.17428, BC.Version.17.0.17126.17504
2020-10-09T12:19:51.3310935Z ##[section]Async Command End: Add Build Tag
2020-10-09T12:19:51.3311718Z ##[section]Async Command Start: Add Build Tag
2020-10-09T12:19:51.3312384Z Build '62' has following tags now: myimage-sandbox-17.0.17126.17504-dk-10.0.17763.1457-ltsc2019, BC.Platform.17.0.17020.17428, BC.Version.17.0.17126.17504
2020-10-09T12:19:51.3312801Z ##[section]Async Command End: Add Build Tag
2020-10-09T12:19:51.3315473Z ##[section]Finishing: ALOPS - Start Docker Container
2020-10-09T12:19:51.3461906Z ##[section]Starting: ALOPS - Wait for Docker Container to start
2020-10-09T12:19:51.3644290Z ==============================================================================
2020-10-09T12:19:51.3645005Z Task         : ALOps Docker Wait
2020-10-09T12:19:51.3645498Z Description  : Wait until the Business Central container is started
2020-10-09T12:19:51.3645964Z Version      : 1.434.1795
2020-10-09T12:19:51.3646346Z Author       : Hodor
2020-10-09T12:19:51.3646615Z Help         : Wait until the Business Central container is started.
2020-10-09T12:19:51.3647128Z ==============================================================================
2020-10-09T12:19:53.0333986Z *** Validate configuration
2020-10-09T12:19:53.5147439Z 
2020-10-09T12:19:53.5160593Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
2020-10-09T12:19:53.5172349Z *** To acquire a license, please visit: https://www.alops.be/getlicense
2020-10-09T12:19:53.5184769Z *** For pricing options, please visit : https://www.alops.be/pricing
2020-10-09T12:19:53.5196625Z *** For documentation, please visit   : https://www.alops.be/documentation
2020-10-09T12:19:53.5200344Z 
2020-10-09T12:19:53.7377208Z *** ALOps License:
2020-10-09T12:19:53.7402603Z   * Trial Key  : 909a8b66-f0ee-4e47-a06d-95f66aae4ed9
2020-10-09T12:19:53.7427421Z   * Licensed To: ALOps Trial [11/30] days remaining. Trial ends: Wednesday, 21 October 2020
2020-10-09T12:19:53.7434094Z 
2020-10-09T12:19:53.7556392Z *** Importing required PS-Functions
2020-10-09T12:19:55.6337555Z *** Waiting for Docker Container Log Entry: Ready for connections!
2020-10-09T12:19:57.0911739Z Initializing...
2020-10-09T12:19:57.0937024Z Starting Container
2020-10-09T12:19:57.0951897Z Hostname is 44bd5e198846
2020-10-09T12:19:57.0967817Z PublicDnsName is 44bd5e198846
2020-10-09T12:19:57.0979884Z Using NavUserPassword Authentication
2020-10-09T12:19:57.0992083Z Starting Local SQL Server
2020-10-09T12:19:57.1006417Z Starting Internet Information Server
2020-10-09T12:19:57.1019156Z Creating Self Signed Certificate
2020-10-09T12:20:00.0981455Z Self Signed Certificate Thumbprint 3B5664A90A6A48D6EDB6F1C0232B733D6CD43CF4
2020-10-09T12:20:00.0995654Z Modifying Service Tier Config File with Instance Specific Settings
2020-10-09T12:20:02.9129738Z Starting Service Tier
2020-10-09T12:20:30.0525155Z Registering event sources
2020-10-09T12:20:30.0537941Z Creating DotNetCore Web Server Instance
2020-10-09T12:20:38.3023269Z Enabling Financials User Experience
2020-10-09T12:20:38.3037664Z Creating http download site
2020-10-09T12:20:41.0322466Z Setting SA Password and enabling SA
2020-10-09T12:20:41.0335488Z Creating admin as SQL User and add to sysadmin
2020-10-09T12:20:41.0348207Z Creating SUPER user
2020-10-09T12:20:42.4656003Z The CRONUS database has version 0 which is not supported by this version of Microsoft Dynamics 365 Business Central Server. Please contact your administrator.
2020-10-09T12:20:46.4418400Z ##[error]*** Docker container exited.
2020-10-09T12:20:46.4812704Z ##[section]Finishing: ALOPS - Wait for Docker Container to start
2020-10-09T12:20:46.4923341Z ##[section]Starting: ALOpsLicenseImport
2020-10-09T12:20:46.5064634Z ==============================================================================
2020-10-09T12:20:46.5064967Z Task         : ALOps License Import
2020-10-09T12:20:46.5065230Z Description  : Import Business Central license (.flf)
2020-10-09T12:20:46.5065482Z Version      : 1.434.1795
2020-10-09T12:20:46.5065875Z Author       : Hodor
2020-10-09T12:20:46.5066140Z Help         : Import Business Central license (.flf).
2020-10-09T12:20:46.5066464Z ==============================================================================
2020-10-09T12:20:48.1430391Z *** Validate configuration
2020-10-09T12:20:48.5651828Z 
2020-10-09T12:20:48.5665065Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
2020-10-09T12:20:48.5675022Z *** To acquire a license, please visit: https://www.alops.be/getlicense
2020-10-09T12:20:48.5689110Z *** For pricing options, please visit : https://www.alops.be/pricing
2020-10-09T12:20:48.5699521Z *** For documentation, please visit   : https://www.alops.be/documentation
2020-10-09T12:20:48.5705310Z 
2020-10-09T12:20:48.8619667Z *** ALOps License:
2020-10-09T12:20:48.8645180Z   * Trial Key  : 909a8b66-f0ee-4e47-a06d-95f66aae4ed9
2020-10-09T12:20:48.8671098Z   * Licensed To: ALOps Trial [11/30] days remaining. Trial ends: Wednesday, 21 October 2020
2020-10-09T12:20:48.8676386Z 
2020-10-09T12:20:48.8801314Z *** Importing required PS-Functions
2020-10-09T12:20:49.5012636Z *** Connect Docker Session
2020-10-09T12:20:50.4925149Z *** Initiate Docker Session
2020-10-09T12:20:50.5150116Z *** Exception creating session: The input ContainerId 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa does not exist, or the corresponding container is not running.
2020-10-09T12:20:50.5163938Z *** Reinitializing!
2020-10-09T12:20:50.7357665Z ##[error]The input ContainerId 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa does not exist, or the corresponding container is not running.
2020-10-09T12:20:51.0117951Z ##[section]Finishing: ALOpsLicenseImport
2020-10-09T12:20:51.0295695Z ##[section]Starting: ALOPS - Remove Docker Container
2020-10-09T12:20:51.0437244Z ==============================================================================
2020-10-09T12:20:51.0437669Z Task         : ALOps Docker Remove
2020-10-09T12:20:51.0437993Z Description  : Remove a Business Central container
2020-10-09T12:20:51.0438462Z Version      : 1.434.1795
2020-10-09T12:20:51.0438727Z Author       : Hodor
2020-10-09T12:20:51.0439025Z Help         : Remove Business Central docker container.
2020-10-09T12:20:51.0439414Z ==============================================================================
2020-10-09T12:20:52.3920095Z *** Validate configuration
2020-10-09T12:20:52.8784863Z 
2020-10-09T12:20:52.8796774Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables.
2020-10-09T12:20:52.8809213Z *** To acquire a license, please visit: https://www.alops.be/getlicense
2020-10-09T12:20:52.8822171Z *** For pricing options, please visit : https://www.alops.be/pricing
2020-10-09T12:20:52.8834955Z *** For documentation, please visit   : https://www.alops.be/documentation
2020-10-09T12:20:52.8838398Z 
2020-10-09T12:20:53.1386220Z *** ALOps License:
2020-10-09T12:20:53.1412589Z   * Trial Key  : 909a8b66-f0ee-4e47-a06d-95f66aae4ed9
2020-10-09T12:20:53.1441995Z   * Licensed To: ALOps Trial [11/30] days remaining. Trial ends: Wednesday, 21 October 2020
2020-10-09T12:20:53.1448229Z 
2020-10-09T12:20:53.2216609Z *** Importing required PS-Functions
2020-10-09T12:20:54.3844315Z *** >>> Print Container Logs: 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa >>>
2020-10-09T12:20:54.6197098Z *** >>> Initializing...
2020-10-09T12:20:54.6210869Z *** >>> Starting Container
2020-10-09T12:20:54.6224727Z *** >>> Hostname is 44bd5e198846
2020-10-09T12:20:54.6235931Z *** >>> PublicDnsName is 44bd5e198846
2020-10-09T12:20:54.6248768Z *** >>> Using NavUserPassword Authentication
2020-10-09T12:20:54.6261574Z *** >>> Starting Local SQL Server
2020-10-09T12:20:54.6272876Z *** >>> Starting Internet Information Server
2020-10-09T12:20:54.6284980Z *** >>> Creating Self Signed Certificate
2020-10-09T12:20:54.6298765Z *** >>> Self Signed Certificate Thumbprint 3B5664A90A6A48D6EDB6F1C0232B733D6CD43CF4
2020-10-09T12:20:54.6309037Z *** >>> Modifying Service Tier Config File with Instance Specific Settings
2020-10-09T12:20:54.6321395Z *** >>> Starting Service Tier
2020-10-09T12:20:54.6332355Z *** >>> Registering event sources
2020-10-09T12:20:54.6345867Z *** >>> Creating DotNetCore Web Server Instance
2020-10-09T12:20:54.6359037Z *** >>> Enabling Financials User Experience
2020-10-09T12:20:54.6370249Z *** >>> Creating http download site
2020-10-09T12:20:54.6382453Z *** >>> Setting SA Password and enabling SA
2020-10-09T12:20:54.6396039Z *** >>> Creating admin as SQL User and add to sysadmin
2020-10-09T12:20:54.6408670Z *** >>> Creating SUPER user
2020-10-09T12:20:54.6421439Z *** >>> The CRONUS database has version 0 which is not supported by this version of Microsoft Dynamics 365 Business Central Server. Please contact your administrator.
2020-10-09T12:20:54.6432839Z *** <<< Print Container Logs: 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa <<<
2020-10-09T12:20:54.6446531Z *** Stop Docker container: 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa
2020-10-09T12:20:54.8644350Z *** Remove Docker container: 44bd5e1988460428934acbef552f9d5f8cd73051ec379a14c2cb41a29e0d2ffa
2020-10-09T12:20:55.1191734Z *** Docker Remove OK.
2020-10-09T12:20:55.1283221Z *** Cleanup VSTS Environment: True
2020-10-09T12:20:57.4973396Z ##[section]Finishing: ALOPS - Remove Docker Container
2020-10-09T12:20:57.5101578Z ##[section]Starting: Checkout BQS@refs/pull/21/merge to s
2020-10-09T12:20:57.5261099Z ==============================================================================
2020-10-09T12:20:57.5261460Z Task         : Get sources
2020-10-09T12:20:57.5261993Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-10-09T12:20:57.5262511Z Version      : 1.0.0
2020-10-09T12:20:57.5262729Z Author       : Microsoft
2020-10-09T12:20:57.5263082Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-10-09T12:20:57.5263473Z ==============================================================================
2020-10-09T12:20:57.9718883Z Cleaning any cached credential from repository: BQS (Git)
2020-10-09T12:20:57.9822292Z ##[section]Finishing: Checkout BQS@refs/pull/21/merge to s
2020-10-09T12:20:57.9990652Z ##[section]Starting: Finalize Job
2020-10-09T12:20:58.0027165Z Cleaning up task key
2020-10-09T12:20:58.0029174Z Start cleaning up orphan processes.
2020-10-09T12:20:58.0126037Z ##[section]Finishing: Finalize Job
2020-10-09T12:20:58.0255214Z ##[section]Finishing: Job

Expected behavior Hopefully the container would be created successfully has it has been in the past.

AdminHodor commented 3 years ago

Dear @JeppeBylov ,

Look like ContainerHelper is trying to create a MultiTenant image looking at the logs:

2020-10-09T12:09:51.4586217Z Restoring CRONUS Demo Database
2020-10-09T12:10:07.2727977Z Exporting Application to CRONUS
2020-10-09T12:12:55.1471163Z Removing Application from tenant

Not sure why it's doing that, the default in ContainerHelper for creating Sandbox environments with Multitenant default was changed a couple of months ago, which seems to translate to the created images. My guess at the moment is you'll need to create containers from this Image also as Multi-Tenant. Starting a Multi-Tenant image as a regular one would explain the error, because the NST would be mounted on a database without the proper tables.

Pretty sure this is outside the scope of what ALOps can do, but we'll definitely give it a try and setup a replica on our servers to figure it out.

Kind regards,

JeppeBylov commented 3 years ago

And how would one do that? I can try ASAP, but I'm unsure of how to specify multi-tenant on the Docker Create step.

If you can specify multi-tenant: true, can you also specify multi-tenant: false - maybe that could work as well?

AdminHodor commented 3 years ago

Dear @JeppeBylov ,

We where able to replica the behavior, the issue starts with BcContainerHelper "1.0.8" which was released yesterday. From that version the "New-BcImage" creates Sandbox images by-default in MultiTenant, it also manipulates the imagename supplied as a parameter.

BcContainerHelper v1.0.7

New-BCImage -artifactUrl "https://bcartifacts.azureedge.net/sandbox/17.0.17126.17504/dk"
=> Successfully tagged myimage:sandbox-17.0.17126.17504-dk

BcContainerHelper v1.0.8

New-BCImage -artifactUrl "https://bcartifacts.azureedge.net/sandbox/17.0.17126.17504/dk"
=> Successfully tagged myimage:sandbox-17.0.17126.17504-dk-mt

From our perspective, it does not make sense creating the image in MultiTenant by default (no way back). With a regular image you can still choose to create a Multi-Tenant container from it, it will do the Multi-Tenant setup on the fly, hence the image could be used for both cases.

We'll make changes to ALOps to counter this behavior, so you pipeline will work as before without any changes required from you side. Together with this we'll add additional parameters on the ALOpsDockerCreate task for when Multi-Tenant is explicity required and cope with the image-name manipulation.

ALOps v1.435 is scheduled for release this weekend, we'll make sure to get the enhancement for this included. Will keep you posted on this.

Kind regards,

dNsl9r commented 3 years ago

We get the same errors - do you have any timeline when the new release will be out?

AdminHodor commented 3 years ago

Dear @JeppeBylov , @dNsl9r ,

We just released v1.435.1856 which should tackle this issue. Please note it could take a couple of pipeline runs for DevOps to pickup the new version.

Kind regards,

JeppeBylov commented 3 years ago

Can confirm that the pipelines are running successfully once again, without making changes.

Thanks for very fast feedback! Appreciate all the help..