Hello everyone,
i’m having trouble with getting a deployment to Azure Web Apps to work. It’s being done with an on-prem installation with a docker image on linux.
I can create and auto-detect the Azure Web App just fine as a Deployment Target, the healthcheck is successful. But when trying to actually deploy a docker container to it, i receive the below stacktrace in the Azure Web App step. It’s being run in the built-in worker.
Octopus Server version: 2022.2.7857
Environment Information:
IsRunningInContainer: True
OperatingSystem: Linux 4.15.0-167-generic #175-Ubuntu SMP Wed Jan 5 01:56:07 UTC 2022
OsBitVersion: x64
Is64BitProcess: True
CurrentUser: root
MachineName: f940978d279f
ProcessorCount: 8
CurrentDirectory: /Octopus
TempDirectory: /tmp/
HostProcessName: Octopus.Server
PID: 1
Executing Deploy an Azure Web App (Web Deploy) using container worker (type Deploy an Azure Web App (Web Deploy)) on Octopus Server
Running this script in the Octopus Server security context (root)
Acquiring isolation mutex RunningScript with NoIsolation in ServerTasks-162
Executable directory is /bin
Executable name or full path: /bin/bash
No user context provided. Running as current user.
Starting /bin/bash in working directory '/root/.octopus/OctopusServer/Server/Work/20220830070204-162-78' using 'Unicode (UTF-8)' encoding running as 'root' with the same environment variables as the launching process
Process /bin/bash in /root/.octopus/OctopusServer/Server/Work/20220830070204-162-78 exited with code 0
Using Calamari.AzureWebApp.linux-x64 13.2.0
Running this script in the Octopus Server security context (root)
Acquiring isolation mutex RunningScript with NoIsolation in ServerTasks-162
Executable directory is /bin
Executable name or full path: /bin/bash
No user context provided. Running as current user.
Starting /bin/bash in working directory '/root/.octopus/OctopusServer/Server/Work/20220830070204-162-79' using 'Unicode (UTF-8)' encoding running as 'root' with the same environment variables as the launching process
Process /bin/bash in /root/.octopus/OctopusServer/Server/Work/20220830070204-162-79 exited with code 1
Using Calamari.AzureWebApp.linux-x64 13.2.0
The version 13.2.0 of the Calamari.AzureWebApp.linux-x64 tool has not been extracted, it will be extracted automatically.
Running this script in the Octopus Server security context (root)
Acquiring isolation mutex RunningScript with NoIsolation in ServerTasks-162
Executable directory is /bin
Executable name or full path: /bin/bash
No user context provided. Running as current user.
Starting /bin/bash in working directory '/root/.octopus/OctopusServer/Server/Work/20220830070204-162-80' using 'Unicode (UTF-8)' encoding running as 'root' with the same environment variables as the launching process
Process /bin/bash in /root/.octopus/OctopusServer/Server/Work/20220830070204-162-80 exited with code 0
Could not find platform linux-x64 for Calamari.AzureWebApp
System.Exception
at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.PopulateArchive(CalamariPackage calamariPackage, Action`3 write) in ConsolidatedPackageBundledPackageSource.cs:line 140
at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.CreateArchive(CalamariPackage calamariPackage, Stream stream, CompressionType compressionType) in ConsolidatedPackageBundledPackageSource.cs:line 113
at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.<>c__DisplayClass10_0.<OpenPackageStream>b__0(Stream s) in ConsolidatedPackageBundledPackageSource.cs:line 101
at Octopus.Server.Orchestration.Targets.Common.BundledPackages.BundledPackageStoreCache.GetOrCreate(String packageId, String version, CompressionType compressionType, Action`1 createPackage, ITaskLog taskLog) in BundledPackageStoreCache.cs:line 54
at Octopus.Server.Orchestration.Targets.Common.BundledPackages.ConsolidatedPackageBundledPackageSource.OpenPackageStream(CalamariPackage calamariPackage, CompressionType compressionType, ITaskLog taskLog) in ConsolidatedPackageBundledPackageSource.cs:line 97
at Octopus.Server.Orchestration.Targets.Common.BundledPackages.BundledPackageStore.OpenCalamariPackageStream(String packageId, CalamariPackageVersion version, CompressionType compressionType, ITaskLog taskLog) in BundledPackageStore.cs:line 147
at Octopus.Server.Orchestration.Targets.Common.BundledPackages.BundledPackageStore.OpenPackageStream(IDeploymentPackageVersion deploymentPackageVersion, ITaskLog taskLog, CompressionType compressionType) in BundledPackageStore.cs:line 102
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.InstallDeploymentPackage(IDeploymentPackageVersion packageVersion, IBootstrapperScriptGenerator bootstrapperScriptGenerator, ITaskLog taskLog) in ImmediateExecutor.cs:line 372
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.ResolveRequiredToolsMessages(List`1 serviceMessages, String toolsPlatform, IBootstrapperScriptGenerator bootstrapperScriptGenerator, CalamariFlavour calamariFlavour, IReadOnlyList`1 deploymentTools, ExecutionTargetDetails executionTargetDetails, CalamariPlatformConstraint calamariPlatformConstraint, ITaskLog taskLog) in ImmediateExecutor.cs:line 335
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.RunOnTarget(ScriptCollection finalBootstrapperScripts, String platform, IBootstrapperScriptGenerator bootstrapperScriptGenerator, IReadOnlyList`1 bootstrapperArguments, IReadOnlyList`1 allFiles, Nullable`1 isolation, Nullable`1 isolationMutexTimeout, String isolationMutexName, CalamariFlavour flavour, IReadOnlyList`1 deploymentTools, ExecutionTargetDetails executionTargetDetails, CalamariPlatformConstraint calamariPlatformConstraint, ITaskLog taskLog) in ImmediateExecutor.cs:line 267
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Immediate.ImmediateExecutor.ExecuteCalamari(CalamariFlavour calamariFlavour, String calamariCommand, IReadOnlyList`1 calamariArguments, IReadOnlyList`1 files, IReadOnlyList`1 deploymentTools, VariableCollection extraVariables, TargetManifest targetManifest, CalamariPlatformConstraint calamariPlatformConstraint, Nullable`1 isolationMutexTimeout, String isolationMutexName, ITaskLog taskLog) in ImmediateExecutor.cs:line 196
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.CommandBuilders.CalamariCommandBuilder.Execute(ITaskLog taskLog) in CalamariCommandBuilder.cs:line 172
at Sashimi.AzureWebApp.AzureWebAppActionHandler.Execute(IActionHandlerContext context, ITaskLog taskLog)
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.<>c__DisplayClass17_0.<Execute in NewActionDispatcher.cs:line 288
at Octopus.Server.Infrastructure.EitherAsyncOrSync.Execute(CancellationToken cancellationToken) in EitherAsyncOrSync.cs:line 38
at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.ExecuteWithoutGuidance(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, CancellationToken cancellationToken) in Guidance.cs:line 148
at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.Execute(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, Maybe`1 callbackOnExclude, CancellationToken cancellationToken) in Guidance.cs:line 78
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.Execute(ActionCommand command, Maybe`1 inContextOf, IExecutor executor, TargetManifest targetManifest, Maybe`1 stagedPackagePath, IEnumerable`1 packageAcquisitionInformation, IActionAndTargetScopedVariables variablesSnapshot, ITaskLog taskLog, IActionHandler handler, Maybe`1 guidanceExcludeCallback, CancellationToken cancellationToken) in NewActionDispatcher.cs:line 282
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.ExecuteOnWorker(ActionCommand command, Maybe`1 inContextOf, ITaskLog taskLog, IActionHandler handler, CancellationToken cancellationToken) in NewActionDispatcher.cs:line 190
at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.NewActionDispatcher.Dispatch(ActionCommand command, DeploymentTarget deploymentTarget, ITaskLog taskLogForTarget, ITaskLog taskLogRoot, IActionHandlerResolver actionHandlerResolver, Maybe`1 guidanceExcludeCallback, CancellationToken cancellationToken) in NewActionDispatcher.cs:line 107
at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass8_2.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 249
at Octopus.Server.Infrastructure.EitherAsyncOrSync.Execute(CancellationToken cancellationToken) in EitherAsyncOrSync.cs:line 38
at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.ExecuteWithoutGuidance(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, CancellationToken cancellationToken) in Guidance.cs:line 148
at Octopus.Server.Orchestration.ServerTasks.Deploy.Guidance.Execute(EitherAsyncOrSync callback, String actionName, Boolean actionIsRequiredToRun, ITaskLog taskLog, Maybe`1 callbackOnExclude, CancellationToken cancellationToken) in Guidance.cs:line 78
at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass8_1.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 244
at Octopus.Server.Orchestration.ServerTasks.Deploy.TransientErrorDetectionExecutor.Execute(Func`2 action, ExecutionPlan plan, ITaskLog taskLog, CancellationToken cancellationToken, DeploymentTarget deploymentTarget) in TransientErrorDetectionExecutor.cs:line 49
at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.<>c__DisplayClass8_0.<ExecuteActionAndInitLoggingContext in ProcessStepController.cs:line 239
at Octopus.Server.Infrastructure.Orchestration.UnitsOfWork.UnitOfWorkExecutor.<>c__DisplayClass6_0`4.<Execute in UnitOfWorkExecutor.cs:line 146
at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWorkExtensionMethods.Do(IUnitOfWork unitOfWork, Func`1 action, CancellationToken cancellationToken, String name) in UnitOfWorkExtensionMethods.cs:line 75
at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWorkExtensionMethods.Do(IUnitOfWork unitOfWork, Func`1 action, CancellationToken cancellationToken, String name) in UnitOfWorkExtensionMethods.cs:line 75
at Octopus.Server.Infrastructure.Orchestration.UnitsOfWork.UnitOfWorkExecutor.Execute[T1,T2,T3,T4](Func`6 action, CancellationToken cancellationToken, String name) in UnitOfWorkExecutor.cs:line 139
at Octopus.Server.Orchestration.ServerTasks.Deploy.PlannedStepControllers.ProcessStepController.ExecuteActionAndInitLoggingContext(ExecutionPlan plan, ExecutionPlanner planner, PlannedStep step, DeploymentTarget targetContext, PlannedAction action, ITaskLog taskLogForTarget, ITaskLog taskLogRoot, CancellationToken cancellationToken) in ProcessStepController.cs:line 236
August 30th 2022 09:02:04Fatal
The action Deploy an Azure Web App (Web Deploy) using container worker on tst-octopus-deploy-poc failed