首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >msdeploy同步问题

msdeploy同步问题
EN

Server Fault用户
提问于 2013-01-21 23:55:21
回答 2查看 1.8K关注 0票数 1

我有4台Windows2008 R2服务器。3是IIS 7.5 web服务器,1是sql服务器/共享文件服务器。我完全按照我的意愿配置了第一个web服务器,然后使用这个msdeploy命令将配置同步到其他两个web服务器。

代码语言:javascript
复制
msdeploy -verb:sync -source:webserver,computername=http://www1.server.com:8080/MSDeploy -dest:webserver,computername=http://www2.server.com:8080/MSDeploy
msdeploy -verb:sync -source:webserver,computername=http://www1.server.com:8080/MSDeploy -dest:webserver,computername=http://www3.server.com:8080/MSDeploy

这成功地将配置推送到其他web服务器。它们可以工作,除非它们无法连接到我设置的虚拟目录。如果我第二次运行同步,您可以看到它跳过了虚拟目录(尽管它确实在目标机器上创建了它们)

代码语言:javascript
复制
Info: Using ID 'd9baab2a-4798-4760-8e09-24558cf6edd4' for connections to the remote server.
Info: Using ID 'e5389a2a-6925-425a-8d2c-fa8d8ae00727' for connections to the remote server.
Warning: Skipping source dirPath (\\server\Upload) because of rule SkipInvalidSource.
Could not find directory '\\server\Upload'.
Warning: Skipping source dirPath (\\server\FileSystem) because of rule SkipInvalidSource.
Could not find directory '\\server\FileSystem'.
Warning: Skipping source dirPath (\\server\Configuration) because of rule SkipInvalidSource.
Could not find directory '\\server\Configuration'.
Warning: Skipping source dirPath (\\server\SharedContent) because of rule SkipInvalidSource.
Could not find directory '\\server\SharedContent'.
Info: Object configProtectedData (MSDeploy.webServer/webServer/appHostConfig[@path='']/location[@path='']/section[@name='configProtectedData']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'.
Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig32[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'.
Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig64[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'.
Info: Using ID '231d358c-292f-435d-8026-3158d8ed5c6b' for connections to the remote server.
Warning: Skipping source dirPath (\\server\Upload) because of rule SkipInvalidSource.
Could not find directory '\\serverl\Upload'.
Warning: Skipping source dirPath (\\server\FileSystem) because of rule SkipInvalidSource.
Could not find directory '\\serverl\FileSystem'.
Warning: Skipping source dirPath (\\server\Configuration) because of rule SkipInvalidSource.
Could not find directory '\\server\Configuration'.
Warning: Skipping source dirPath (\\server\SharedContent) because of rule SkipInvalidSource.
Could not find directory '\\server\SharedContent'.
Info: Object configProtectedData (MSDeploy.webServer/webServer/appHostConfig[@path='']/location[@path='']/section[@name='configProtectedData']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'.
Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig32[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'.
Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig64[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'.
Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)

我需要获得另外两台服务器,以便它们能够连接到虚拟目录。我尝试重新输入虚拟目录的凭据,删除虚拟目录并手动设置它,删除整个站点并手动设置它。所有这些都失败了。这就像msdeploy破坏了我的IIS安装一样。我在系统上的站点目录上运行了一个比较,它们是相同的。我比较过c:\Windows\System32\inetsrv\config\applicationHost.config,它们是相同的,除了虚拟目录的散列密码之外。

IIS安装表明它们安装了相同的角色服务。

解决这个问题的最大线索是应用程序错误日志。两个不工作的服务器在编译站点时抛出此警告消息。它在虚拟目录中寻找一个web.config。这让我相信它认为虚拟目录实际上是一个应用程序。在配置设置中,我看不到这一点。

代码语言:javascript
复制
Event code: 3008 
Event message: A configuration error has occurred. 
Event time: 1/21/2013 4:28:46 PM 
Event time (UTC): 1/21/2013 9:28:46 PM 
Event ID: 036c3591338f4f84aaac84e68c4f7753 
Event sequence: 35 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/1/ROOT-2-130032773103912852 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: D:\sites\server.com\ 
    Machine name: S615516NJ3VW02 

Process information: 
    Process ID: 4136 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\server.com 

Exception information: 
    Exception type: ConfigurationErrorsException 
    Exception message: An error occurred loading a configuration file: Failed to start monitoring changes to '\\server\Upload' because access is denied. (\\server\Upload\web.config) 

Request information: 
    Request URL: http://www2.server.com/Upload/Flash/history.swf 
    Request path: /Upload/Flash/history.swf 
    User host address: xxx.xxx.xx.35 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: IIS APPPOOL\server.com 

Thread information: 
    Thread ID: 6 
    Thread account name: IIS APPPOOL\server.com 
    Is impersonating: False 
    Stack trace:    at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
   at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
   at System.Web.Configuration.RuntimeConfig.get_Identity()
   at System.Web.HttpContext.SetImpersonationEnabled()
   at System.Web.HttpApplication.AssignContext(HttpContext context)
   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)

感谢您帮助解决这个问题。

EN

回答 2

Server Fault用户

发布于 2013-01-22 15:29:09

我自己修的。MSDeploy完全搞砸了目标IIS的安装。我运行了文件比较,源和目标之间的一切都是相同的,但我仍然有问题。我卸载并重新安装了IIS。让IIS重新工作了。然后,我找到了下面关于-disableLink选项的文章。-disableLink:ContentExtension告诉它不要同步虚拟目录。这个开关赢得了“不明显”奖..。

http://www.asp.net/web-forms/tutorials/deployment/web-deployment-in-the-enterprise/deploying-web-packages

票数 0
EN

Server Fault用户

发布于 2016-03-11 18:07:37

我的情况可能更简单:我将msdeploy命令放入错误的RDP窗口,然后应用程序试图将数据传输到自己。

这是艰难的一周的星期五。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/471205

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档