1
votes

I am trying to deploy my site to an App Service from Azure DevOps Services. However, when I try to deploy the site, the Deploy Azure App Service task fails with the error message:

Error: Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could not connect to the remote computer ("{my-website}.scm.azurewebsites.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.

Steps to replicate:

  1. Create a site in .NET Core and uploaded it to an Azure Repo in Azure DevOps Services
  2. Create an App Service in the Azure Portal with a staging deployment slot
  3. Create a pipeline in the Pipelines section Azure DevOps which will build the solution and publish the build artifacts to the default staging directory
  4. Create a pipeline in the Releases section of Azure DevOps which will take the build artifact and run the Deploy Azure App service task to deploy it to my app service. (I filled in the mandatory fields, but not the optional ones.)

The logs for the release pipeline show that it is failing on the msdeploy.exe (ComputerName='https://{my-website}.scm.azurewebsites.net:443/msdeploy.axd?site=dotnetcore-webpack-test') step with the above error, due to a 404.

https://{my-website}.scm.azurewebsites.net:443 will take me to the kudu dashboard, but the route /msdeploy.exe, returns a page saying "No route registered for '/msdeploy.axd'"

According to the link in the error message, this error is caused by "Web Management Service or Remote Agent is not installed or unreachable on the remote computer."

However, I am trying to deploy to an App Service, not a VM, and all the tutorials I've been trying to follow, it simply seems to work out of the box without them needing to configure web management services/firewall settings etc.

Am I missing a step or doing something wrong? I'd appreciate any advice on how to troubleshoot this further.

1
Are you using a private agent? If so, is there a network route to the app service? Is the private agent isolated behind an ASE or otherwise networked so that it's not internet-facing?Daniel Mann
@MohsinMehmood Yes. I have tried the above link, in which case the msdeploy.exe will fail with ERROR_USER_UNAUTHORIZED. I'm not really sure what WEBSITE_WEBDEPLOY_USE_SCM does, and the only Microsoft documentation I could find on it is an article dating back to 2014 ([link]azure.microsoft.com/en-gb/blog/web-deploy-as-a-site-extension).RiddleMeThis
I have set up the App Service Deploy using the connection type "Azure Resource Manager" to connect to my app service (not the "Publish Profile" option) and am deploying as a Web App on Windows. This seemed like the most appropriate option, but I can't find a lot of documentation on it.RiddleMeThis
@DanielMann I don't know how to check those things. I am deploying from Azure Devops Services (formerly VSTS) dev.azure.com to portal.azure.com. They are both cloud services, so I don't have direct access to the underlying physical machine, apart from through the kudu interface.RiddleMeThis

1 Answers

6
votes

You need to check if your app service is hosted on Windows OS. You can select the Operation System when you create your app service from Azure Portal.

enter image description here

If the operation system is Linux and you deploy as a Web App on Windows in App Service Deploy task, you will get aboveERROR_DESTINATION_NOT_REACHABLE error. You can try recreating you web app services from azure portal and try to deploy again.

You can check the detailed steps in this tutorial(in yaml format).

I followed above steps of yours. It worked fine for me. When I create a web app services on Linux system. I got the same error with yours. Below is my App Service Deploy task.

enter image description here

Hope above helps!