Warm tip: This article is reproduced from stackoverflow.com, please click
azure azure-devops azure-web-sites deployment

Error: Deployment failed: ERROR_DESTINATION_NOT_REACHABLE when deploying to App Service from Azure D

发布于 2020-04-11 11:45:26

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.

Questioner
RiddleMeThis
Viewed
120
Levi Lu-MSFT 2020-02-03 17:45

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!