gpt4 book ai didi

MSDeploy 失败,错误为 "an existing connection was forcibly closed by the remote host"

转载 作者:行者123 更新时间:2023-12-04 15:27:04 26 4
gpt4 key购买 nike

提供给命令行的以下 MSDeploy 字符串会导致错误。任何人都可以对此有所了解吗?

"C:\Program Files\IIS\Microsoft Web Deploy\\msdeploy.exe" -source:package='D:\dev\Project\obj\BuildConfiguration\Package\Project.zip' -dest:auto='Website Name',computerName='computername',userName='username',password='password' -verb:sync -enableRule:DoNotDeleteRule -allowUntrusted -debug

堆栈跟踪:
Microsoft.Web.Deployment.DeploymentAgentUnavailableException: Could not complete the request to remote agent URL 'http://computername/MSDEPLOYAGENTSERVICE'.
---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request) --- End of inner exception stack trace --- at Microsoft.Web.Deployment.AgentClientProvider.GetHttpResponse(HttpWebRequest request) at Microsoft.Web.Deployment.AgentClientProvider.CreateStatusThread(DeploymentSyncContext syncContext) at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext) at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable) at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) at MSDeploy.MSDeploy.ExecuteWorker() Error count: 1.

最佳答案

原因是多方面的 - 内部 DNS 解析问题,意味着主机名解析为错误的 IP,另外我们必须使用 IIS6,我相信 msdeploy 所需的 http 代理的托管存在问题与现有网站相同的端口。

解决方案是明确指定IP,并从命令行重新安装部署服务(WebDeploy),指定自定义端点以避免IIS冲突。

我的工作咒语:

"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package=D:\Path\obj\Configuration\Package\Project.zip -dest:auto,computerName='http://192.168.x.xxx:8090/MsDeployAgentService2/' -allowUntrusted  -setParam:"IIS Web Application Name"="Website Name In IIS"

关于MSDeploy 失败,错误为 "an existing connection was forcibly closed by the remote host",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4806007/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com