5

I am getting below error while deploying app service via Azure DevOps. I tried to search for this issue but could not found root cause of this.

Error :

2021-03-15T06:01:27.7479723Z ##[error]Error: Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
More Information: Could not connect to the remote computer ("web-app.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.
Error: The remote server returned an error: (403) Forbidden.
Error count: 1.
'''
ctor
  • 198
  • 2
  • 12

6 Answers6

14

I tried everything until I spotted (after reading this) that my (dev) shared App Service service plan was out of storage space! When I upgraded it to a bigger one I could deploy again!

enter image description here

Sturla
  • 3,446
  • 3
  • 39
  • 56
1

According to this document, the error is caused by that Web Deploy cannot connect to the remote service. Please refer to the follow points to troubleshoot your problem:

  • Please make sure Azure app service works fine. You can ping the remote machine.
  • That the msdepsvc(“Microsoft Web Deployment Agent Service”) or wmsvc(“Web Management Service”) service is started on the remote server.
  • Your firewall is not blocking incoming connections of your ports on the destination. If you used the default installation, then it would be 80 for msdepsvc and 8172 for wmsvc.

In addition, you could try to add -retryInterval:6000 -retryAttempts:10 to Additional Arguments in Azure App Service Deploy task as this thread stated. enter image description here

BTW, if this issue still exists in Azure pipeline, please check if this issue exists locally. You could refer to this thread: Got 403 Error when doing Web Deployment and Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC for more guidance.

Edward Han-MSFT
  • 2,879
  • 1
  • 4
  • 9
0

Thank you Edward for insightful explanation for possible root cause. Issue is resolved now. Root cause was the agent pool selected did not have rights for deployment(IP are not whitelisted for production App service) since We are not using agent provided by DevOps directly for production environment. enter image description here

ctor
  • 198
  • 2
  • 12
0

An instance that'd worked great for years starting giving me this error yesterday during Web Deploy. No changes from our side. No amount of poking around non-invasively solved it, but simply hitting the Restart button on the Azure app service Overview page put it to bed quite easily.

Eliot Gillum
  • 832
  • 9
  • 18
0

In short: Double-check your publish profile (each element).

Bit longer: In my case, my publish profile contained a ResourceGroup element which pointed to the wrong resource group. (I'm using WebPublishMethod: MSDeploy) I went over all elements and made sure they point to the correct resource, credentials and whatnot.

That seemed to solve the issue.

Stefan Hendriks
  • 4,705
  • 5
  • 34
  • 43
0

In my case, I had modified machine.config to captur traffic in Fiddler

<system.net>
<defaultProxy
                enabled = "true"
                useDefaultCredentials = "true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
</defaultProxy>
</system.net>

and this was interfering with the VS deployment to Azure

DavidCC
  • 315
  • 2
  • 10