HodorNV / ALOps

ALOps
56 stars 24 forks source link

ALOpsImportLicense fails with ##[error]Cannot bind argument to parameter 'ServerInstance' because it is null. #155

Closed JeppeBylov closed 4 years ago

JeppeBylov commented 4 years ago

Hi,

I'm getting insane and i'm probably staring the solution in the face, but can't see it.

The following is the log: ` ALOpsDockerStart:

2020-07-18T08:53:05.2632802Z ##[section]Starting: ALOpsDockerStart 2020-07-18T08:53:05.2737821Z ============================================================================== 2020-07-18T08:53:05.2738126Z Task : ALOps Docker Start 2020-07-18T08:53:05.2738347Z Description : ALOps Docker Start 2020-07-18T08:53:05.2738538Z Version : 1.431.1514 2020-07-18T08:53:05.2738726Z Author : Hodor 2020-07-18T08:53:05.2738932Z Help : Start Business Central docker container. 2020-07-18T08:53:05.2739200Z ============================================================================== 2020-07-18T08:53:06.8372369Z Importing required PS-Functions 2020-07-18T08:53:07.8745898Z Validate configuration 2020-07-18T08:53:07.8752844Z No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables. 2020-07-18T08:53:08.0424703Z Add tag 'ltsc2019' to image for OS Match 2020-07-18T08:53:09.4986419Z Pull Docker Image: mcr.microsoft.com/businesscentral/onprem:dk-ltsc2019 2020-07-18T08:53:09.6771117Z dk-ltsc2019: Pulling from businesscentral/onprem 2020-07-18T08:53:09.6781964Z Digest: sha256:fad0335880214e1e5ba107da2c77f8887b210f22b426af0ef5a8c2af5e34bb1f 2020-07-18T08:53:09.6787457Z Status: Image is up to date for mcr.microsoft.com/businesscentral/onprem:dk-ltsc2019 2020-07-18T08:53:09.6797976Z mcr.microsoft.com/businesscentral/onprem:dk-ltsc2019 2020-07-18T08:53:09.6802752Z Pull Docker Image: mcr.microsoft.com/businesscentral/onprem:dk-ltsc2019 [OK] 2020-07-18T08:53:09.6847388Z 2020-07-18T08:53:09.6892566Z ##[command]"docker" run --detach --env accept_eula=Y --env accept_outdated=Y --restart no --label TFSBuild=EstimationTool_8 mcr.microsoft.com/businesscentral/onprem:dk-ltsc2019 2020-07-18T08:53:12.3218986Z Container Started: b4641fe736782f956c1792195aa095bb723a0c48da59a9de7d281187fbe5126e 2020-07-18T08:53:12.7374245Z Container Labels: 2020-07-18T08:53:12.7431141Z 2020-07-18T08:53:12.7434024Z 2020-07-18T08:53:12.7445829Z TFSBuild : EstimationTool_8 2020-07-18T08:53:12.7446437Z country : dk 2020-07-18T08:53:12.7447150Z created : 202007032050 2020-07-18T08:53:12.7447924Z cu : cu3 2020-07-18T08:53:12.7448687Z eula : https://go.microsoft.com/fwlink/?linkid=861843 2020-07-18T08:53:12.7449521Z legal : http://go.microsoft.com/fwlink/?LinkId=837447 2020-07-18T08:53:12.7450173Z maintainer : Dynamics SMB 2020-07-18T08:53:12.7450546Z nav : 2020-07-18T08:53:12.7451238Z osversion : 10.0.17763.973 2020-07-18T08:53:12.7451875Z platform : 16.0.14073.14195 2020-07-18T08:53:12.7452540Z tag : 0.0.9.99 2020-07-18T08:53:12.7453209Z version : 16.3.14085.14238 2020-07-18T08:53:12.7453524Z 2020-07-18T08:53:12.8763009Z Docker Start OK. 2020-07-18T08:53:13.0312056Z *** Cleanup VSTS Environment: True 2020-07-18T08:53:15.1297382Z ##[section]Async Command Start: Add Build Tag 2020-07-18T08:53:15.1298046Z Build '8' has following tags now: mcr.microsoft.com/businesscentral/onprem-dk-ltsc2019 2020-07-18T08:53:15.1298375Z ##[section]Async Command End: Add Build Tag 2020-07-18T08:53:15.1299222Z ##[section]Async Command Start: Add Build Tag 2020-07-18T08:53:15.1299714Z Build '8' has following tags now: BC.Version.16.3.14085.14238, BC.Platform.16.0.14073.14195, mcr.microsoft.com/businesscentral/onprem-dk-ltsc2019 2020-07-18T08:53:15.1300105Z ##[section]Async Command End: Add Build Tag 2020-07-18T08:53:15.1300791Z ##[section]Async Command Start: Add Build Tag 2020-07-18T08:53:15.1301255Z Build '8' has following tags now: BC.Version.16.3.14085.14238, mcr.microsoft.com/businesscentral/onprem-dk-ltsc2019 2020-07-18T08:53:15.1301589Z ##[section]Async Command End: Add Build Tag 2020-07-18T08:53:15.1302506Z ##[section]Finishing: ALOpsDockerStart`

ALOpsLicenseImport

2020-07-18T08:53:15.1436058Z ##[section]Starting: ALOpsLicenseImport 2020-07-18T08:53:15.1572419Z ============================================================================== 2020-07-18T08:53:15.1572738Z Task : ALOps License Import 2020-07-18T08:53:15.1572975Z Description : ALOps License Import 2020-07-18T08:53:15.1573165Z Version : 1.431.1514 2020-07-18T08:53:15.1573346Z Author : Hodor 2020-07-18T08:53:15.1573572Z Help : Import Business Central license (.flf). 2020-07-18T08:53:15.1573883Z ============================================================================== 2020-07-18T08:53:16.7089777Z *** Validate configuration 2020-07-18T08:53:17.0475156Z *** No ALOps License found. Set License with the [alops-licenseid] or [alops_licenseid] variables. 2020-07-18T08:53:17.2721617Z *** Importing required PS-Functions 2020-07-18T08:53:17.9011336Z *** Connect Docker Session 2020-07-18T08:53:19.3705594Z *** Initiate Docker Session 2020-07-18T08:53:19.7921159Z *** Set Docker Container ErrorActionPreference = Stop 2020-07-18T08:53:20.3715090Z *** Import license in docker container. 2020-07-18T08:53:21.0495953Z *** Import NAV/BC Management DLL's 2020-07-18T08:53:21.0499671Z *** ServiceTier not specified, loading default assemblies. 2020-07-18T08:53:21.0965250Z *** Selected module: [C:\Program Files\Microsoft Dynamics NAV\160\Service\Microsoft.Dynamics.Nav.Apps.Management.dll] 2020-07-18T08:53:21.0986261Z *** Loading module: [C:\Program Files\Microsoft Dynamics NAV\160\Service\Microsoft.Dynamics.Nav.Apps.Management.dll] 2020-07-18T08:53:21.8417204Z *** Selected module: [C:\Program Files\Microsoft Dynamics NAV\160\Service\Microsoft.Dynamics.Nav.Management.dll] 2020-07-18T08:53:21.8437940Z *** Loading module: [C:\Program Files\Microsoft Dynamics NAV\160\Service\Microsoft.Dynamics.Nav.Management.dll] 2020-07-18T08:53:21.8652068Z *** Setup Flf File: https://jbbteststorage.blob.core.windows.net/partnerlicense/BC16.flf?sv=2019-02-02&st=2020-07-14T19%3A27%3A25Z&se=2020-12-31T20%3A27%3A00Z&sr=b&sp=r&sig 2020-07-18T08:53:21.8963833Z *** Create TempFile 2020-07-18T08:53:21.9357798Z *** Download file 2020-07-18T08:53:22.3987032Z *** Flf File: C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpB9B2.tmp.flf 2020-07-18T08:53:22.4053252Z *** Import License: [C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpB9B2.tmp.flf] 2020-07-18T08:53:22.5448164Z ##[error]Cannot bind argument to parameter 'ServerInstance' because it is null. 2020-07-18T08:53:23.9403653Z ##[section]Finishing: ALOpsLicenseImport

Full yml here:

`name: $(Build.BuildId) pool: name: Default

steps:

- task: ALOpsDockerRemove@1

displayName: 'Remove Docker Container'

enabled: true

condition: always()

`

MortenRa commented 4 years ago

You might need to import the license after the docker is ready move task: ALOpsLicenseImport@1 after task: ALOpsDockerWait@1

JeppeBylov commented 4 years ago

You're right! As i said, i was staring it in the face! Thanks.