When deploying to a WebApp instance on Azure, Octopus Deploy (Cloud Version) suffers the following error for one of two WebApps - the other deploys successfully. Both WebApps are configured similarly.
The deployment succeeds from Visual Studio (local) and from CI services.
Full log:
Task ID: ServerTasks-1165
Task status: Failed
Task queued: Saturday, July 21, 2018 3:14:14 PM
Task started: Saturday, July 21, 2018 3:14:14 PM
Task completed: Saturday, July 21, 2018 3:14:53 PM
Task duration: 39 seconds
Server version: 2018.6.14+Branch.projects-nancy-module-tests.Sha.b7693755b553f2d6eb8c3e1f564bdc1065a98c8d
Server node: EC2AMAZ-UNAAJA8
| == Failed: Deploy release 0.0.13 to Staging ==
15:14:14 Verbose | Guided failure is not enabled for this task
15:14:53 Fatal | The deployment failed because one or more steps failed. Please see the deployment log for details.
|
| == Success: Acquire packages ==
15:14:14 Info | Acquiring packages
15:14:14 Info | Making a list of packages to acquire
15:14:14 Verbose | No packages are required on any deployment targets
15:14:14 Verbose | Acquire Api.2018.7.20.60 on Octopus Server
| Acquire Functions.2018.7.20.60 on Octopus Server
| Acquire Web.2018.7.20.60 on Octopus Server
15:14:14 Verbose | Checking package cache for package Api v2018.7.20.60
15:14:14 Info | Package Api v2018.7.20.60 was found in cache. No need to download.
15:14:14 Verbose | Using file: E:\Octopus\Packages\Api\Api.2018.7.20.60.nupkg
15:14:14 Verbose | Checking package cache for package Functions v2018.7.20.60
15:14:14 Info | Package Functions v2018.7.20.60 was found in cache. No need to download.
15:14:14 Verbose | Using file: E:\Octopus\Packages\Functions\Functions.2018.7.20.60.nupkg
15:14:14 Verbose | Checking package cache for package Web v2018.7.20.60
15:14:14 Info | Package Web v2018.7.20.60 was found in cache. No need to download.
15:14:14 Verbose | Using file: E:\Octopus\Packages\Web\Web.2018.7.20.60.nupkg
15:14:14 Info | All packages have been acquired
15:14:14 Verbose | Acquire Packages completed
|
| Success: Octopus Server
|
| Success: Download package Api v2018.7.20.60 from Octopus Server (built-in)
15:14:14 Info | Successfully downloaded Api 2018.7.20.60 (48.596 MB)
15:14:14 Verbose | Stored package in E:\Octopus\Packages\Api\Api.2018.7.20.60.nupkg
|
| Success: Download package Functions v2018.7.20.60 from Octopus Server (built-in)
15:14:14 Info | Successfully downloaded Functions 2018.7.20.60 (5.65 MB)
15:14:14 Verbose | Stored package in E:\Octopus\Packages\Functions\Functions.2018.7.20.60.nupkg
|
| Success: Download package Web v2018.7.20.60 from Octopus Server (built-in)
15:14:14 Info | Successfully downloaded Web 2018.7.20.60 (23.732 MB)
15:14:14 Verbose | Stored package in E:\Octopus\Packages\Web\Web.2018.7.20.60.nupkg
|
| == Success: Step 1: API ==
15:14:27 Verbose | API completed
|
| Success: Octopus Server on behalf of [Staging] API
15:14:15 Verbose | Octopus Server version: 2018.6.14+Branch.projects-nancy-module-tests.Sha.b7693755b553f2d6eb8c3e1f564bdc1065a98c8d
15:14:15 Verbose | Environment Information:
| OperatingSystem: Microsoft Windows NT 10.0.14393.0
| OsBitVersion: x64
| Is64BitProcess: True
| CurrentUser: EC2AMAZ-UNAAJA8\svcOctopusServer
| MachineName: EC2AMAZ-UNAAJA8
| ProcessorCount: 2
| CurrentDirectory: C:\Windows\system32
| TempDirectory: C:\Users\svcOctopusServer\AppData\Local\Temp\
| HostProcessName: Octopus.Server
| PID: 3232
15:14:15 Verbose | Executing API (type Deploy an Azure Web App) on Octopus Server
15:14:15 Verbose | Using account ID 'azureserviceprincipal-azure'
15:14:15 Verbose | Account variables are being contributed by the target
15:14:15 Verbose | Using Calamari.Cloud 4.7.21
15:14:15 Verbose | Using Octopus.Dependencies.AzureCmdlets 5.7.0
15:14:15 Verbose | Running this script with a custom user account (EC2AMAZ-UNAAJA8\svcScriptRunner)
15:14:15 Verbose | Starting C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in working directory 'C:\Octopus\Work\20180721151415-1165-41' using 'OEM United States' encoding running as '\svcScriptRunner' with that user's environment variables plus 3 custom variable(s)
15:14:16 Verbose | Octopus Deploy: Calamari version 4.7.21
15:14:16 Verbose | Environment Information:
15:14:16 Verbose | OperatingSystem: Microsoft Windows NT 10.0.14393.0
15:14:16 Verbose | OsBitVersion: x64
15:14:16 Verbose | Is64BitProcess: True
15:14:16 Verbose | CurrentUser: EC2AMAZ-UNAAJA8\svcScriptRunner
15:14:16 Verbose | MachineName: EC2AMAZ-UNAAJA8
15:14:16 Verbose | ProcessorCount: 2
15:14:16 Verbose | CurrentDirectory: C:\Octopus\Work\20180721151415-1165-41
15:14:16 Verbose | TempDirectory: C:\Users\svcScriptRunner\AppData\Local\Temp\
15:14:16 Verbose | HostProcessName: Calamari
15:14:16 Info | Deploying package: E:\Octopus\Packages\Api\Api.2018.7.20.60.nupkg
15:14:16 Verbose | Extracting package to: C:\Octopus\Work\20180721151415-1165-41\staging
15:14:22 Verbose | Extracted 427 files
15:14:22 Info | Deploying to Azure WebApp 'api-staging' in Resource Group, using subscription-id 'SUBSCRIPTION_ID'
15:14:22 Verbose | Authentication Context: https://login.windows.net/___
15:14:23 Verbose | Looking up siteAndSlotName api-staging in resourceGroup
15:14:24 Verbose | Retrieving publishing profile from https://management.azure.com/subscriptions/SUBSCRIPTION/resourceGroups/ResourceGroup/providers/Microsoft.Web/sites/api-staging/config/publishingCredentials/list?api-version=2015-08-01
15:14:25 Verbose | Retrieved publishing profile. URI: https://$api-staging:PW@api-staging.scm.azurewebsites.net UserName: $api-staging
15:14:25 Verbose | Using siteAndSlot api-staging
15:14:25 Verbose | Using siteName api-staging
15:14:25 Verbose | Using ID 'fb95465c-b2e1-4416-8401-7f5b2c94736f' for connections to the remote server.
15:14:25 Verbose | Pre-authenticating to remote agent URL 'https://$api-staging:PW@api-staging.scm.azurewebsites.net/msdeploy.axd?site=api-staging' as '$api-staging'.
15:14:25 Verbose | Performing synchronization pass #1.
15:14:25 Verbose | Pre-authenticating to remote agent URL 'https://$api-staging:PW@api-staging.scm.azurewebsites.net/msdeploy.axd?site=api-staging' as '$api-staging'.
15:14:26 Verbose | Delete operation on dirPath (api-staging\app_data\jobs\continuous\Emails) skipped because of rule SkipDeleteDataDir.
15:14:26 Verbose | Delete operation on dirPath (api-staging\app_data\jobs\triggered) skipped because of rule SkipDeleteDataDir.
15:14:26 Verbose | The dependency check 'DependencyCheckInUse' found no issues.
15:14:26 Verbose | Received response from agent (HTTP status 'OK').
15:14:26 Verbose | The synchronization completed in 1 pass(es).
15:14:26 Info | Successfully deployed to Azure. 0 objects added. 0 objects updated. 0 objects deleted.
15:14:26 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20180721151415-1165-41 exited with code 0
15:14:27 Verbose | Updating manifest with output variables
15:14:27 Verbose | Updating manifest with action evaluated variables
15:14:27 Verbose | Successfully finished API on [Staging] API
|
| == Failed: Step 2: Web ==
15:14:52 Fatal | The step failed: Activity Web on [Staging] Web failed with error 'The remote script failed with exit code 100'.
15:14:52 Verbose | Web completed
|
| Failed: Octopus Server on behalf of [Staging] Web
15:14:27 Verbose | Octopus Server version: 2018.6.14+Branch.projects-nancy-module-tests.Sha.b7693755b553f2d6eb8c3e1f564bdc1065a98c8d
15:14:27 Verbose | Environment Information:
| OperatingSystem: Microsoft Windows NT 10.0.14393.0
| OsBitVersion: x64
| Is64BitProcess: True
| CurrentUser: EC2AMAZ-UNAAJA8\svcOctopusServer
| MachineName: EC2AMAZ-UNAAJA8
| ProcessorCount: 2
| CurrentDirectory: C:\Windows\system32
| TempDirectory: C:\Users\svcOctopusServer\AppData\Local\Temp\
| HostProcessName: Octopus.Server
| PID: 3232
15:14:27 Verbose | Executing Web (type Deploy an Azure Web App) on Octopus Server
15:14:27 Verbose | Using account ID 'azureserviceprincipal-azure'
15:14:27 Verbose | Account variables are being contributed by the target
15:14:27 Verbose | Using Calamari.Cloud 4.7.21
15:14:27 Verbose | Using Octopus.Dependencies.AzureCmdlets 5.7.0
15:14:27 Verbose | Running this script with a custom user account (EC2AMAZ-UNAAJA8\svcScriptRunner)
15:14:29 Verbose | Starting C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in working directory 'C:\Octopus\Work\20180721151427-1165-42' using 'OEM United States' encoding running as '\svcScriptRunner' with that user's environment variables plus 3 custom variable(s)
15:14:30 Verbose | Octopus Deploy: Calamari version 4.7.21
15:14:30 Verbose | Environment Information:
15:14:30 Verbose | OperatingSystem: Microsoft Windows NT 10.0.14393.0
15:14:30 Verbose | OsBitVersion: x64
15:14:30 Verbose | Is64BitProcess: True
15:14:30 Verbose | CurrentUser: EC2AMAZ-UNAAJA8\svcScriptRunner
15:14:30 Verbose | MachineName: EC2AMAZ-UNAAJA8
15:14:30 Verbose | ProcessorCount: 2
15:14:30 Verbose | CurrentDirectory: C:\Octopus\Work\20180721151427-1165-42
15:14:30 Verbose | TempDirectory: C:\Users\svcScriptRunner\AppData\Local\Temp\
15:14:30 Verbose | HostProcessName: Calamari
15:14:30 Info | Deploying package: E:\Octopus\Packages\Web\Web.2018.7.20.60.nupkg
15:14:30 Verbose | Extracting package to: C:\Octopus\Work\20180721151427-1165-42\staging
15:14:32 Verbose | Extracted 135 files
15:14:32 Info | Deploying to Azure WebApp 'staging' in Resource Group, using subscription-id 'SUBSCRIPTION'
15:14:32 Verbose | Authentication Context: https://login.windows.net/AUTH_CONTEXT
15:14:32 Verbose | Looking up siteAndSlotName staging in resourceGroup
15:14:33 Verbose | Retrieving publishing profile from https://management.azure.com/subscriptions/SUBSCRIPTION/resourceGroups/ResourceGroup/providers/Microsoft.Web/sites/staging/config/publishingCredentials/list?api-version=2015-08-01
15:14:34 Verbose | Retrieved publishing profile. URI: https://$staging:PW@staging.scm.azurewebsites.net UserName: $staging
15:14:34 Verbose | Using siteAndSlot staging
15:14:34 Verbose | Using siteName staging
15:14:34 Verbose | Using ID 'c4639a4a-4aca-45e6-b026-da796b97f464' for connections to the remote server.
15:14:34 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:34 Verbose | Performing synchronization pass #1.
15:14:34 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:35 Verbose | Received response from agent (HTTP status 'OK').
15:14:35 Verbose | Retry #1 on Azure deploy. Exception: Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
15:14:37 Verbose | Using siteAndSlot staging
15:14:37 Verbose | Using siteName staging
15:14:37 Verbose | Using ID '2f381a3f-debd-48ad-b493-a4b2ce458167' for connections to the remote server.
15:14:37 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:38 Verbose | Performing synchronization pass #1.
15:14:38 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:38 Verbose | Received response from agent (HTTP status 'OK').
15:14:38 Verbose | Retry #2 on Azure deploy. Exception: Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
15:14:42 Verbose | Using siteAndSlot staging
15:14:42 Verbose | Using siteName staging
15:14:42 Verbose | Using ID '40662e4e-7d7b-4d5b-b499-4ba583f998c5' for connections to the remote server.
15:14:42 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:43 Verbose | Performing synchronization pass #1.
15:14:43 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:43 Verbose | Received response from agent (HTTP status 'OK').
15:14:43 Verbose | Retry #3 on Azure deploy. Exception: Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
15:14:51 Verbose | Using siteAndSlot staging
15:14:51 Verbose | Using siteName staging
15:14:51 Verbose | Using ID '94beda27-11cf-4dc6-b2a4-dfb241d4614c' for connections to the remote server.
15:14:51 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:52 Verbose | Performing synchronization pass #1.
15:14:52 Verbose | Pre-authenticating to remote agent URL 'https://$staging:PW@staging.scm.azurewebsites.net/msdeploy.axd?site=staging' as '$staging'.
15:14:52 Verbose | Received response from agent (HTTP status 'OK').
15:14:52 Error | Microsoft.Web.Deployment.DeploymentDetailedException: Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED. ---> System.Xml.XmlException: There is an unclosed literal string. Line 1, position 95.
15:14:52 Error | at System.Xml.XmlTextReaderImpl.Throw(Exception e)
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseAttributes()
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseElement()
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseElementContent()
15:14:52 Error | at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
15:14:52 Error | --- End of inner exception stack trace ---
15:14:52 Error | at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
15:14:52 Error | at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
15:14:52 Error | at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
15:14:52 Error | at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
15:14:52 Error | at Calamari.Azure.Deployment.Conventions.AzureWebAppConvention.DeployToAzure(RunningDeployment deployment, String siteAndSlotName, CalamariVariableDictionary variables, SitePublishProfile publishProfile)
15:14:52 Error | at Calamari.Azure.Deployment.Conventions.AzureWebAppConvention.Install(RunningDeployment deployment)
15:14:52 Error | at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
15:14:52 Error | at Calamari.Deployment.ConventionProcessor.RunConventions()
15:14:52 Error | Running rollback conventions...
15:14:52 Error | Web Deploy experienced a connection problem with the server and had to terminate the connection. Contact your server administrator if the problem persists. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CONNECTION_TERMINATED.
15:14:52 Error | Microsoft.Web.Deployment.DeploymentDetailedException
15:14:52 Error | at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
15:14:52 Error | at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
15:14:52 Error | at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
15:14:52 Error | at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
15:14:52 Error | at Calamari.Azure.Deployment.Conventions.AzureWebAppConvention.DeployToAzure(RunningDeployment deployment, String siteAndSlotName, CalamariVariableDictionary variables, SitePublishProfile publishProfile)
15:14:52 Error | at Calamari.Azure.Deployment.Conventions.AzureWebAppConvention.Install(RunningDeployment deployment)
15:14:52 Error | at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
15:14:52 Error | at Calamari.Deployment.ConventionProcessor.RunConventions()
15:14:52 Error | at Calamari.Azure.Commands.DeployAzureWebCommand.Execute(String[] commandLineArguments)
15:14:52 Error | at Calamari.Program.Execute(String[] args)
15:14:52 Error | --Inner Exception--
15:14:52 Error | There is an unclosed literal string. Line 1, position 95.
15:14:52 Error | System.Xml.XmlException
15:14:52 Error | at System.Xml.XmlTextReaderImpl.Throw(Exception e)
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseAttributes()
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseElement()
15:14:52 Error | at System.Xml.XmlTextReaderImpl.ParseElementContent()
15:14:52 Error | at Microsoft.Web.Deployment.TraceEventSerializer.Deserialize(Stream responseStream, DeploymentBaseContext baseContext, DeploymentSyncContext syncContext)
15:14:52 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20180721151427-1165-42 exited with code 100
15:14:52 Verbose | Updating manifest with output variables
15:14:52 Verbose | Updating manifest with action evaluated variables
15:14:52 Fatal | The remote script failed with exit code 100
15:14:52 Fatal | The action Web on [Staging] Web failed
|
| Canceled: Step 3: Functions
15:14:52 Verbose | Step "Functions" runs only when all previous steps succeeded; skipping
|