Unable to do deloyment on Azure Linux WebApp using octopus

Error: The remote script failed with exit code 100

Uploaded the full log file.

We have a webapp in azure on which we are trying to do a deployment using octopus but it started failing suddenly with below error:

The step failed: Activity Deploy - Node proxy on Octopus Tentacle failed with error ‘The remote script failed with exit code 100’.
Failed: Octopus Server on behalf of Octopus Tentacle
build 27-Jan-2021 14:18:10 Info Deploying package: C:\Octopus\OctopusServer\PackageCache\feeds-xt\Y
build 27-Jan-2021 14:18:10 AS.XT.B2B.SUPHTWO@S12@DEC6D0DEDC0A13488AFAC275327F5089.nupkg
build 27-Jan-2021 14:18:10 Info Deploying to Azure WebApp ‘fe-yc-qa4-ssr-proxy’ in Resource Group
build 27-Jan-2021 14:18:10 ‘fe-yc-qa4-ssr-proxy-rg’, using subscription-id ‘59a878ab-342f-4641
build 27-Jan-2021 14:18:10 -bfa6-419c20edde4c’
build 27-Jan-2021 14:18:10 Info Using override for Azure Active Directory endpoint - https://login.
build 27-Jan-2021 14:18:10 microsoftonline.com/
build 27-Jan-2021 14:18:10 Error Microsoft.Web.Deployment.DeploymentDetailedException: Could not
build 27-Jan-2021 14:18:10 connect to the remote computer (“fe-yc-qa4-ssr-proxy.scm.azurewebsi
build 27-Jan-2021 14:18:10 tes.net”). On the remote computer, make sure that Web Deploy is
build 27-Jan-2021 14:18:10 installed and that the required process (“Web Management Service”)
build 27-Jan-2021 14:18:10 is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=2
build 27-Jan-2021 14:18:10 21672#ERROR_DESTINATION_NOT_REACHABLE. —> System.Net.WebException
build 27-Jan-2021 14:18:10 : The remote server returned an error: (404) Not Found.
build 27-Jan-2021 14:18:10 Error at System.Net.HttpWebRequest.GetResponse()
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHel
build 27-Jan-2021 14:18:10 per(HttpWebRequest request)
build 27-Jan-2021 14:18:10 Error — End of inner exception stack trace —
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHel
build 27-Jan-2021 14:18:10 per(HttpWebRequest request)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(Ht
build 27-Jan-2021 14:18:10 tpWebRequest request)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.PerformHeadRequest
build 27-Jan-2021 14:18:10 Helper(Boolean getVersionInfo, Version& maximumSupportedVersion,
build 27-Jan-2021 14:18:10 Version& minimumSupportedVersion)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider…ctor(DeploymentPr
build 27-Jan-2021 14:18:10 oviderContext providerContext, DeploymentBaseContext baseContext,
build 27-Jan-2021 14:18:10 String serverVersion)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(
build 27-Jan-2021 14:18:10 DeploymentProviderContext providerContext, DeploymentBaseOptions
build 27-Jan-2021 14:18:10 baseOptions, DeploymentObject sourceObject, String serverVersion)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProv
build 27-Jan-2021 14:18:10 iderOptions providerOptions, DeploymentBaseOptions baseOptions,
build 27-Jan-2021 14:18:10 DeploymentSyncOptions syncOptions)
build 27-Jan-2021 14:18:10 Error at Calamari.Azure.WebApps.Deployment.Conventions.AzureWebAppConven
build 27-Jan-2021 14:18:10 tion.DeployToAzure(RunningDeployment deployment, AzureTargetSite
build 27-Jan-2021 14:18:10 targetSite, IVariables variables, WebDeployPublishSettings
build 27-Jan-2021 14:18:10 publishSettings)
build 27-Jan-2021 14:18:10 Error at Calamari.Azure.WebApps.Deployment.Conventions.AzureWebAppConven
build 27-Jan-2021 14:18:10 tion.Install(RunningDeployment deployment)
build 27-Jan-2021 14:18:10 Error at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
build 27-Jan-2021 14:18:10 Error at Calamari.Deployment.ConventionProcessor.RunConventions()
build 27-Jan-2021 14:18:10 Error Running rollback conventions…
build 27-Jan-2021 14:18:10 Error Could not connect to the remote computer (“fe-yc-qa4-ssr-proxy.scm.
build 27-Jan-2021 14:18:10 azurewebsites.net”). On the remote computer, make sure that Web
build 27-Jan-2021 14:18:10 Deploy is installed and that the required process (“Web Management
build 27-Jan-2021 14:18:10 Service”) is started. Learn more at: http://go.microsoft.com/fwlink
build 27-Jan-2021 14:18:10 /?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
build 27-Jan-2021 14:18:10 Error Microsoft.Web.Deployment.DeploymentDetailedException
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHel
build 27-Jan-2021 14:18:10 per(HttpWebRequest request)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(Ht
build 27-Jan-2021 14:18:10 tpWebRequest request)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.PerformHeadRequest
build 27-Jan-2021 14:18:10 Helper(Boolean getVersionInfo, Version& maximumSupportedVersion,
build 27-Jan-2021 14:18:10 Version& minimumSupportedVersion)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider…ctor(DeploymentPr
build 27-Jan-2021 14:18:10 oviderContext providerContext, DeploymentBaseContext baseContext,
build 27-Jan-2021 14:18:10 String serverVersion)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(
build 27-Jan-2021 14:18:10 DeploymentProviderContext providerContext, DeploymentBaseOptions
build 27-Jan-2021 14:18:10 baseOptions, DeploymentObject sourceObject, String serverVersion)
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProv
build 27-Jan-2021 14:18:10 iderOptions providerOptions, DeploymentBaseOptions baseOptions,
build 27-Jan-2021 14:18:10 DeploymentSyncOptions syncOptions)
build 27-Jan-2021 14:18:10 Error at Calamari.Azure.WebApps.Deployment.Conventions.AzureWebAppConven
build 27-Jan-2021 14:18:10 tion.DeployToAzure(RunningDeployment deployment, AzureTargetSite
build 27-Jan-2021 14:18:10 targetSite, IVariables variables, WebDeployPublishSettings
build 27-Jan-2021 14:18:10 publishSettings)
build 27-Jan-2021 14:18:10 Error at Calamari.Azure.WebApps.Deployment.Conventions.AzureWebAppConven
build 27-Jan-2021 14:18:10 tion.Install(RunningDeployment deployment)
build 27-Jan-2021 14:18:10 Error at Calamari.Deployment.ConventionProcessor.RunInstallConventions()
build 27-Jan-2021 14:18:10 Error at Calamari.Deployment.ConventionProcessor.RunConventions()
build 27-Jan-2021 14:18:10 Error at Calamari.Azure.WebApps.Commands.DeployAzureWebCommand.Execute(S
build 27-Jan-2021 14:18:10 tring[] commandLineArguments)
build 27-Jan-2021 14:18:10 Error at Calamari.CalamariFlavourProgram.Run(String[] args)
build 27-Jan-2021 14:18:10 Error --Inner Exception–
build 27-Jan-2021 14:18:10 Error The remote server returned an error: (404) Not Found.
build 27-Jan-2021 14:18:10 Error System.Net.WebException
build 27-Jan-2021 14:18:10 Error at System.Net.HttpWebRequest.GetResponse()
build 27-Jan-2021 14:18:10 Error at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponseHel
build 27-Jan-2021 14:18:10 per(HttpWebRequest request)
build 27-Jan-2021 14:18:10 Fatal The remote script failed with exit code 100
build 27-Jan-2021 14:18:10 Fatal The action Deploy - Node proxy on Octopus Tentacle failed
build 27-Jan-2021 14:18:10 Skipped: Step 5: Start Webapp

Hi @sarvishn

Thanks for getting in touch! Sorry to hear that you’ve run into an issue deploying to an Azure web app.

You mention that this has suddenly stopped working, can you think of any changes that may have been made to your Azure web app since the last time it worked?

Could you confirm if the health check of the Azure web target is showing as healthy, please? You can see this in Infrastructure -> Deployment Targets and then click into the target and select the connectivity link. Like this:

If you haven’t checked it already, we have some documentation on Azure web app targets here.

It may also be worth confirming that your Azure account attached correctly to Ocotpus. You can check this in Infrastructure -> Accounts -> Azure Subscriptions and then click ‘Save and test’ after confirming all the details are correct.

Please let me know how you get on.

Regards,

Hi Stuart,

I have tested it and looks all good there… another error I have seen the logs is

ERROR_DESTINATION_NOT_REACHABLE. —> System.Net.WebException

Thank you for checking that! The next step I’d like to take is to test the Azure web app slot that you’re deploying to - would you be able to try deploying to a different slot? If possible, it would great if you could delete/recreate the slot before attempting the deployment again.

We’ve had a couple of similar issues previously but these errors are difficult to reproduce and appear to resolve themselves after some time or swapping slots around.

Please let me know how you get on!

Yeah I have already tried creating a slot in the webapp and deploy but no luck with that as well.
getting similar error there as well

Also I have came to know from Microsoft support that “need to have Octopus fix the legacy deploy method. We notified Octopus of the problem with their Legacy deploy method. We were able to repro this issue and indeed it is because they are using an unsupported API in that method”

is it something that you are aware and help with how to switch from legacy mode?

Thanks for letting me know you’ve tried other slots.

As far as I’m aware, there would’t be a way to switch from legacy mode other than upgrading to a more recent version, I will confirm this and let you know.

Which version of Octopus are you using? Would upgrading be a viable option for you?

Upgrading will be a last option if nothing else works…

the current version we are using is v2020.2.16

Would you be able to try something else, please? We’ve had issues in the past with Linux web app targets and SCM. To work around this, you can set WEBSITE_WEBDEPLOY_USE_SCM = false in Azure Management Portal settings (under Website → Configure → app settings). Make sure false is in the value field.

I expect that if you could set that variable within Azure and try the deployment again, it will deploy successfully. Please let me know how it goes!

yeah tried that as well but still failing with same error

Thank you for both your patience and answering my questions. It looks like you’re doing everything correctly and it appears to be caused by a now unsupported API as you mentioned.

I’m going to raise this internally, and I’ll get back to you as soon as we’ve made any progress. Our product engineers are based in Australia, so it may be a day or so before I’ve got a progress report for you.

Hi @sarvishn

First class support for deploying Linux apps to an Azure web app is something we are currently working on, and I would expect this functionality to be made available in the next few months. Unfortunately we don’t have a more specific release date yet, but you can keep an eye on the downloads page for details on the features made available in new releases.

A workaround that may work for you today is to use the Azure script steps and make use of additional package references to make your application package available to a custom script to deploy the web app. The Azure documentation has examples of how to deploy a web app via the CLI step. In the screenshot below you can see an example of an Azure script step that deploys a web app from a package called dotnetwebapp.zip:

This package was a referenced package that was set to not be extracted:

Other customers have reported success in the past by configuring the WEBSITE_WEBDEPLOY_USE_SCM app setting to false. I see you have tried that already, but I’ll try and reproduce the issue locally when that app setting value is configured, as Azure may have changed its APIs recently.

Regards,

Ho @sarvishn

I’ve just tested a Linux Azure web app deployment with the WEBSITE_WEBDEPLOY_USE_SCM application setting set to false, and it worked for me locally. Are you able to send a screenshot of the Web App Configuration page for your web app where the deployment fails? As an example, this was the screenshot of the web app I tested a deployment to:

Regards

Hi Matthew,

yes We do have the setting added to webapp config (uploaded the screenshot)

Thanks for that screenshot. The only other thing I can think to check is to ensure the value for that application setting is definitely set to false.

If it is false, then does the Azure script step provide a workaround for your use case?

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.