[英]Error while Deploy Azure App Service : ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
通过 Azure DevOps 部署应用程序服务时出现以下错误。 我试图搜索此问题,但找不到根本原因。
错误:
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.
'''
根据this document ,该错误是由于Web Deploy无法连接到远程服务引起的。 请参考以下几点来解决您的问题:
此外,您可以尝试在Azure App Service Deploy 任务中添加-retryInterval:6000 -retryAttempts:10
到 Additional Arguments,如该线程所述。
顺便说一句,如果 Azure 管道中仍然存在此问题,请检查本地是否存在此问题。 您可以参考此线程: Go Got 403 Error when doing Web Deployment and Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC以获得更多指导。
感谢 Edward 对可能的根本原因进行了有见地的解释。 问题现已解决。 根本原因是选择的代理池没有部署权限(IP 未列入生产应用程序服务的白名单),因为我们没有将 DevOps 提供的代理直接用于生产环境。
一个多年来运行良好的实例昨天在 Web 部署期间开始给我这个错误。 我们这边没有变化。 没有多少非侵入性的解决方法,只需点击Azure 应用程序服务概述页面上的重新启动按钮即可轻松上床。
我尝试了一切,直到我发现(在阅读后)我的(开发)共享应用服务服务计划的存储空间不足! 当我将它升级到更大的时,我可以再次部署!
简而言之:仔细检查您的发布配置文件(每个元素)。
更长一点:在我的例子中,我的发布配置文件包含一个指向错误资源组的ResourceGroup
元素。 (我正在使用WebPublishMethod
: MSDeploy
)我遍历了所有元素并确保它们指向正确的资源、凭据和诸如此类的东西。
这似乎解决了这个问题。
就我而言,我修改了 machine.config 以捕获 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>
这会干扰到 Azure 的 VS 部署
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.