【问题标题】:Can't get my EC2 Windows Server 2008 (Web stack) instance to receive publishings of my website无法让我的 EC2 Windows Server 2008(Web 堆栈)实例接收我的网站的发布
【发布时间】:2011-04-30 11:11:06
【问题描述】:

我为 EC2 (http://aws.amazon.com/amis/Microsoft/5147732567196848) 安装了一个全新的 AMI,并在其上安装了 Web deploy 2.1。

web deploy 2.1 服务正在以真实身份运行

netstat -an

显示 8172 正在被 Web 部署代理服务监听。

但是,当我尝试使用 Project->右键单击->发布(通过 Web 部署)部署到该站点时,我收到以下错误消息

------ Build started: Project: Cir.Web, Configuration: Debug Any CPU ------
  Cir.Web -> C:\Projects\CrazyInsaneRobot\Source\Cir.Web\bin\Cir.Web.dll
------ Publish started: Project: Cir.Web, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Views\Web.config into obj\Debug\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Debug\TransformWebConfig\transformed\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Start Web Deploy Publish the Application/package to https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default%20Web%20Site ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.  
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 1 of 10.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.  
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 2 of 

...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.  
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 10 of 10.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.(Could not complete the request to remote agent URL 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not complete the request to remote agent URL 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

我在 EC2 实例上的防火墙已关闭。我的 AWS 防火墙设置是

推荐的设置。

其他笔记/想法:

  • Windows 错误日志中的我的 Web 部署错误日志完全为空
  • 我在过去使用不同的 AMI 之前使用过 Web 部署,并且成功地没有出现任何问题。

如果有人对如何调试有任何建议,我将不胜感激!

【问题讨论】:

  • 尝试 telnet (myip) 8172 收到回复了吗?
  • @hamlin11 是的。我可以通过 telnet 连接。请参阅接受的答案,了解对我有用的方法。我不会猜到这个问题
  • 我的问题是我忘记打开 EC2 防火墙 D__D。谢谢你的问题,它解决了我的问题!

标签: asp.net iis amazon-ec2 webdeploy


【解决方案1】:

我就这个问题直接与 Microsoft 联系,他们立即为我提供了答复。

来自 MS 的家伙:

您的 Web 管理服务似乎无法联系。我以前在服务证书无效时看到过这种情况。你能在你的服务器上运行附加的脚本吗?

  1. 启动提升的 PowerShell 提示符
  2. 运行 set-executionpolicy unrestricted –force
  3. 运行 .\00_Certificate.ps1
  4. 网络停止 wmsvc
  5. 网络启动 wmsvc

这能解决问题吗?


他指的脚本是available here

【讨论】:

  • 我在网络服务器重建后搜索了几个小时。谢谢。
  • 我现在已经在两台服务器上尝试过了,但仍然从 Visual Studio 中得到同样的错误。我想你给了我一些东西来研究/思考。如果我想出别的东西,我会添加答案/评论。
  • 这对我也有用。就我而言,新的目标服务器是基础 VM 映像的克隆,它可能以某种方式使其 SSL 证书无效。
  • 谢谢!奇迹般有效。我相信第 4 步和第 5 步不是必需的,因为它包含在脚本中。
  • @CVertex 脚本不再可用...您或任何人想复制/粘贴答案中的代码吗??
【解决方案2】:

当您以错误的格式指定结束点时,也会发生此错误。

例如选择发布应用程序Visual Studio提供终点格式的示例,例如https://RemoteServer:8172/MsDeploy.axd

原来它实际上想要这个没有 http 前缀,例如 0.0.0.0:8172/MsDeploy.axd

如果您在此之后收到关于证书的错误,您只需在发布屏幕中选中允许不受信任的证书复选框。

哎呀!

【讨论】:

    【解决方案3】:

    当 Web 平台安装程序安装 Web Deploy 时,我遇到了同样的问题。直接手动卸载并重新安装 Web Deploy(不使用 Web PI)后,它运行良好......

    【讨论】:

    • 这可能行得通,但是在我收到 MS 的正式回复后,您的答案就来了
    【解决方案4】:

    对于具有多种原因的错误消息的一些非常有用的答案。我遇到了这个错误,结果证明用于目标服务器的“IIS Web 站点/应用程序”名称是错误的。

    因此,造成这种情况的原因可能包括:

    • 用户名或密码错误
    • 目标网站名称不正确(在 Visual Studio 中,这是在 Web 项目属性的“打包/发布 Web”选项卡上设置的)
    • 用于 Web 管理的 SSL 证书(例如,如果您的服务器在安装 IIS 后进行了系统准备)

    【讨论】:

      【解决方案5】:

      我在尝试部署网站时遇到了同样的错误。

      在事件查看器(Windows 日志/系统)中,我有一个错误日志,无法创建 Web 管理服务的日志文件(“无法创建日志文件 D:\Logfiles\WMSVC\W3SVC1\u_ex131126.log . 确保日志目录是正确的并且这台计算机对该目录有写权限。"。

      我刚刚删除了日志文件夹的只读标志,并且一切正常。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-12-26
        • 2019-08-11
        • 1970-01-01
        • 1970-01-01
        • 2015-10-19
        相关资源
        最近更新 更多