无法让我的 EC2 Windows Server 2008(Web 堆栈)实例接收我网站的发布内容
我为 EC2 安装了新的 AMI (http://aws.amazon.com/amis/Microsoft/ 5147732567196848)并已安装Web部署2.1。
Web 部署 2.1 服务正在实际运行,因为
netstat -an
Web 部署代理服务正在侦听 8172。
但是,当我尝试使用项目 -> 右键单击 -> 发布(通过 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 部署,并且成功且没有任何问题。
如果有人对如何调试有任何建议,我将非常感激!
I installed a fresh AMI for EC2 (http://aws.amazon.com/amis/Microsoft/5147732567196848) and have installed Web deploy 2.1 on it.
The web deploy 2.1 service is running for real as
netstat -an
Shows 8172 is being listened on by the Web Deployment Agent Service.
But, when I try to deploy to this site using Project->right-click->Publish (via web deploy) I receive the following error message
------ 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 ==========
My firewall on the EC2 instance has been turned off. And my AWS firewall settings are
which are the recommended settings.
Other notes/thoughts:
- My Web Deploy Error log in the windows error log is completely empty
- I've used web deploy before using a different AMI in the past and succeeded without problems.
If anyone has any suggestions about how to debug this, I would be so ever grateful!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我就这个问题直接联系了微软,他们立即给了我答案。
来自 MS 人员:
看来您的 Web 管理服务无法联系。当服务的证书无效时,我以前见过这种情况。您可以在您的服务器上运行附加的脚本吗?
这是否可以解决问题?
他所指的脚本可在此处获取
I contact Microsoft directly about this problem and they had an immediate answer for me.
From MS guy:
It looks like your Web Management Service not contactable. I have seen this before when the certificate for the service is invalid. Can you run the attached script on your server?
Does this fix the problem?
The script he is referring to is available here
当您以错误的格式指定终点时,也可能会发生此错误。
例如,当选择发布应用程序时,Visual Studio 会提供端点格式的示例,例如 https://RemoteServer:8172/ MsDeploy.axd
结果它实际上想要这个没有 http 前缀,例如
0.0.0.0:8172/MsDeploy.axd
如果此后出现有关证书的错误,您只需在发布屏幕中选中允许不受信任的证书复选框即可。
阿格拉哈哈!
This error can also occur when you specify the end point in the wrong format.
For example when selecting to publish an application Visual Studio gives examples of the end point format such as https://RemoteServer:8172/MsDeploy.axd
Turns out it actually wanted this without the http prefix e.g.
0.0.0.0:8172/MsDeploy.axd
If you get an error about certificates after this you just need to check the box allow untrusted certificates in the publish screen.
Agrahahah!
当 Web 部署是由 Web 平台安装程序安装时,我也遇到了同样的问题。手动卸载并直接重新安装 Web Deploy(不使用 Web PI)后,它工作正常......
I had this same problem with Web Deploy when it was installed by the Web Platform Installer. After manually uninstalling and reinstalling Web Deploy directly (NOT using Web PI) it worked fine...
针对多种原因的错误消息的一些非常有用的答案。我遇到了这个错误,结果发现用于目标服务器的“IIS 网站/应用程序”名称是错误的。
因此,造成这种情况的原因可能包括:
Some very helpful answers for an error message with many causes. I had this error and it turned out that the "IIS Web site/application" name used for the destination server was wrong.
So, causes for this could include:
当我尝试部署网站时,我遇到了同样的错误。
在事件查看器(Windows 日志/系统)中,我有一个错误日志,无法创建 Web 管理服务的日志文件(“无法创建日志文件 D:\Logfiles\WMSVC\W3SVC1\u_ex131126.log。请确保日志目录是正确的,并且该计算机具有对该目录的写访问权限。”。
我刚刚删除了日志文件夹的只读标志,一切都再次正常工作。
I get the same error when i tried to deploy a website.
In the EventViewer (Windows Logs/System) i had an error log, that the log file of the Web Management Service could not be created ("Unable to create log file D:\Logfiles\WMSVC\W3SVC1\u_ex131126.log. Make sure that the logging directory is correct and this computer has write access to that directory.".
I just removed the readonly flag of the log folder and all worked fine again.