我试图在我们的一台机器上创建一个网站。任务一直认为网站对象发生了变化,即使没有发生变化。
如果IIS没有站点,则部署工作正常。
2023-12-07T09:35:57.7693529Z ##[section]Starting: Ensure speedadmin.dk exists
2023-12-07T09:35:57.8140181Z ==============================================================================
2023-12-07T09:35:57.8140593Z Task : IIS web app manage
2023-12-07T09:35:57.8140779Z Description : Create or update websites, web apps, virtual directories, or application pools
2023-12-07T09:35:57.8140909Z Version : 0.198.0
2023-12-07T09:35:57.8141078Z Author : Microsoft Corporation
2023-12-07T09:35:57.8141248Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/iis-web-app-management-on-machine-group
2023-12-07T09:35:57.8141374Z ==============================================================================
2023-12-07T09:35:58.7649910Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list apppool /name:"prod-a.speedadmin.dk"
2023-12-07T09:35:58.8069878Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set apppool /apppool.name:"prod-a.speedadmin.dk" -managedRuntimeVersion:v4.0 -managedPipelineMode:Integrated -processModel.identityType:NetworkService
2023-12-07T09:35:58.8629729Z APPPOOL object "prod-a.speedadmin.dk" changed
2023-12-07T09:35:58.8695365Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list site /name:"prod-a.speedadmin.dk"
2023-12-07T09:35:58.9114872Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" add site /name:"prod-a.speedadmin.dk" /physicalPath:"D:\speedadmin\websites\prod-a\www.speedadmin.dk"
2023-12-07T09:35:58.9735551Z SITE object "prod-a.speedadmin.dk" added
2023-12-07T09:35:58.9735878Z APP object "prod-a.speedadmin.dk/" added
2023-12-07T09:35:58.9736067Z VDIR object "prod-a.speedadmin.dk/" added
2023-12-07T09:35:58.9837187Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set site /site.name:"prod-a.speedadmin.dk" -applicationDefaults.applicationPool:"prod-a.speedadmin.dk" -[path='/'].[path='/'].physicalPath:"D:\speedadmin\websites\prod-a\www.speedadmin.dk" -[path='/'].[path='/'].userName: -[path='/'].[path='/'].password:
2023-12-07T09:35:59.0528195Z SITE object "prod-a.speedadmin.dk" changed
2023-12-07T09:35:59.0678012Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list sites
2023-12-07T09:35:59.1225210Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set site /site.name:"prod-a.speedadmin.dk" /+bindings.[protocol='http',bindingInformation='10.200.36.20:80:']
2023-12-07T09:35:59.1900561Z SITE object "prod-a.speedadmin.dk" changed
2023-12-07T09:35:59.1958739Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list sites
2023-12-07T09:35:59.2354584Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set site /site.name:"prod-a.speedadmin.dk" /+bindings.[protocol='http',bindingInformation='*:80:']
2023-12-07T09:35:59.2924492Z SITE object "prod-a.speedadmin.dk" changed
2023-12-07T09:35:59.2973340Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list sites
2023-12-07T09:35:59.3377913Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set site /site.name:"prod-a.speedadmin.dk" /+bindings.[protocol='https',bindingInformation='10.200.36.20:443:']
2023-12-07T09:35:59.3959136Z SITE object "prod-a.speedadmin.dk" changed
2023-12-07T09:35:59.4098275Z ##[command]"netsh" http show sslcert ipport=10.200.36.20:443
2023-12-07T09:35:59.4526745Z ##[command]"netsh" http add sslcert ipport=10.200.36.20:443 certhash=*** appid={0d6bcddc-160c-4a7e-9109-5d4268433956} certstorename=MY
2023-12-07T09:35:59.4895986Z
2023-12-07T09:35:59.4896413Z SSL Certificate successfully added
2023-12-07T09:35:59.5156955Z
2023-12-07T09:35:59.5157533Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set config /section:applicationPools -[name='prod-a.speedadmin.dk'].startMode:AlwaysRunning
2023-12-07T09:35:59.5899922Z Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
2023-12-07T09:35:59.6189008Z ##[section]Finishing: Ensure speedadmin.dk exists
字符串
第二次运行发布失败,即使我没有更改任何关于站点或部署脚本的内容。
2023-12-07T09:37:09.8796578Z ##[section]Starting: Ensure speedadmin.dk exists
2023-12-07T09:37:09.9264703Z ==============================================================================
2023-12-07T09:37:09.9265143Z Task : IIS web app manage
2023-12-07T09:37:09.9265330Z Description : Create or update websites, web apps, virtual directories, or application pools
2023-12-07T09:37:09.9265474Z Version : 0.198.0
2023-12-07T09:37:09.9265648Z Author : Microsoft Corporation
2023-12-07T09:37:09.9265814Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/iis-web-app-management-on-machine-group
2023-12-07T09:37:09.9265927Z ==============================================================================
2023-12-07T09:37:10.8776860Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list apppool /name:"prod-a.speedadmin.dk"
2023-12-07T09:37:10.9211992Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set apppool /apppool.name:"prod-a.speedadmin.dk" -managedRuntimeVersion:v4.0 -managedPipelineMode:Integrated -processModel.identityType:NetworkService
2023-12-07T09:37:10.9795257Z APPPOOL object "prod-a.speedadmin.dk" changed
2023-12-07T09:37:10.9860198Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list site /name:"prod-a.speedadmin.dk"
2023-12-07T09:37:11.0369832Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set site /site.name:"prod-a.speedadmin.dk" -applicationDefaults.applicationPool:"prod-a.speedadmin.dk" -[path='/'].[path='/'].physicalPath:"D:\speedadmin\websites\prod-a\www.speedadmin.dk" -[path='/'].[path='/'].userName: -[path='/'].[path='/'].password:
2023-12-07T09:37:11.1063363Z SITE object "prod-a.speedadmin.dk" changed
2023-12-07T09:37:11.1212169Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list sites
2023-12-07T09:37:11.1765311Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list sites
2023-12-07T09:37:11.2176552Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list sites
2023-12-07T09:37:11.2695373Z ##[command]"netsh" http show sslcert ipport=10.200.36.20:443
2023-12-07T09:37:11.3123572Z ##[command]"netsh" http add sslcert ipport=10.200.36.20:443 certhash=*** appid={8e2de72e-4c25-4e53-ac4a-d62bd506e522} certstorename=MY
2023-12-07T09:37:11.3498120Z
2023-12-07T09:37:11.3498463Z SSL Certificate add failed, Error: 183
2023-12-07T09:37:11.3499049Z Cannot create a file when that file already exists.
2023-12-07T09:37:11.3499891Z
2023-12-07T09:37:11.3499933Z
2023-12-07T09:37:11.4604555Z ##[error]Process 'netsh' exited with code '1'.
2023-12-07T09:37:11.4803066Z ##[section]Finishing: Ensure speedadmin.dk exists
型
根据脚本,它认为站点发生了变化,但即使部署参数发生了变化,我也不认为它会失败,因为绑定没有被任何其他站点使用。
IIS是空的-没有其他网站。
配置如下:x1c 0d1x
变量看起来像这样:
1条答案
按热度按时间jqjz2hbq1#
这似乎是IIS Web应用程序管理任务的已知问题。请参阅以下票证:
从第二张工单来看,似乎已经将此问题上报工程师团队进行修复,但目前工程师团队没有更新。
作为当前的解决方法,您可以尝试在管道中的IIS Web应用管理任务之前添加一个PowerShell task以执行以下命令。
此命令将删除在上一次运行中添加的证书。
字符串