我正在尝试使用以下 msdeploy 命令部署我的应用程序:
MSDeploy.exe -source:contentPath="C:\Users\myUser\Documents\ui\dist" -dest:contentPath='c:/inetpub/wwwroot/dist',computerName="https://ec2-xx-xxx-xx-xx.ap-northeast-1.compute.amazonaws.com:8172/MSDeploy.axd?site=Default Web Site",username="administrator",password="XXXXXXXXX",authtype="Basic",includeAcls="False" -verb:sync -allowUntrusted
出现以下错误:
Working...
Info: Using ID '01657062-cece-4713-8dc6-585537b265fd' for connections to the rem
ote server.
>> Error Code: ERROR_DESTINATION_NOT_REACHABLE
>> More Information: Could not connect to the remote computer ("ec2-52-207-222-6
5.compute-1.amazonaws.com"). On the remote computer, make sure that Web Deploy i
s 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.
>> Error: Unable to connect to the remote server
>> Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xx.xxx.xx.xx:8172
我对另外 6 台服务器尝试了相同的命令,效果很好,但对配置相同的 2 台服务器不起作用。
- 所有 IIS 可安装组件均已就位
- 端口 8172 (TCP) 的防火墙入站规则已到位,其他防火墙规则没有问题,因为我已关闭防火墙
- 已安装 Web Deploy 3.6 和用于托管服务器的 Web 部署 3.6
- 确保 Web 管理服务、Web 部署代理服务已启动并设置为自动
我错过了什么?
最佳答案
将规则添加到端口 8172 的安全组并开始工作。但我不知道为什么它之前可以在 Visual Studio 中工作,而不是在命令提示符下工作。
关于msdeploy - Web 部署错误 ERROR_DESTINATION_NOT_REACHABLE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38271966/