-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IIS Web App Manage: Process 'netsh' exited with code '1' #17462
Comments
I have the exact same issue. We've created a new instance of Windows Server 2022. Our old one is Windows Server 2012. The exact same pipeline deploys to both servers but only the Windows Server 2022 one fails and it has the same error message. I looked into the logs between both deployments and the one that works correctly detects that the binding exists already. The one that doesn't work tries to add a new one instead of ignoring it. |
Note that this is a duplicate bug of this one from a year ago. #15686 |
Would be nice to have this fixed. We're experiencing it in several environments. |
+1 preventing to migrate to Server 2022. No more workarounds. |
Do we have a solution to this, other than not migrating to windows server 2022? |
Half a year later... Still, the best option is to disable the "Add binding" option in the deployment process and handle it by yourself. |
I also have this issue and it is also preventing my datacentre from moving to Windows 2022. |
Hi @PhilBlackRose, @patryk-plura, |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
This issue has still not been fixed as of a couple of weeks ago. Every time there's an update to the MSDeployOnTargetMachines.ps1 script I have to recreate my workaround for Windows Server 2022 VMs. |
Also suffering from this problem now |
We faced exactly the same issue. Our current workaround is, that we have the following PowerShell script executed before the task "IIS web app manage":
|
Note
Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: IISWebAppManagementOnMachineGroupV0
list here (V# not needed): IISWebAppManagementOnMachineGroupV0
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
Server - Azure Pipelines or TFS on-premises?
If using TFS on-premises, provide the version:
If using Azure Pipelines, provide the account name, team project name, build definition name/build number:
Agent - Hosted or Private:
If using Hosted agent, provide agent queue name:
If using private agent, provide the OS of the machine running the agent and the agent version:
Azure Pipeline
Issue Description
In Releases tab I use IIS Web App Manage task with enabled bindings (80 and 443) on one site:
www.example.com
First release deployment was ok, biding was configured and all works. When I want deploy release second time I got this error message:
2022-12-08T11:00:04.6529364Z ##[command]"netsh" http show sslcert ipport=0.0.0.0:443
2022-12-08T11:00:04.7461192Z ##[command]"netsh" http add sslcert ipport=0.0.0.0:443 certhash=*** appid={some-guid} certstorename=certstorage
2022-12-08T11:00:04.8145306Z
2022-12-08T11:00:04.8146373Z SSL Certificate add failed, Error: 183
2022-12-08T11:00:04.8147405Z Cannot create a file when that file already exists.
2022-12-08T11:00:04.8147929Z
2022-12-08T11:00:04.8148137Z
2022-12-08T11:00:05.0409362Z ##[error]Process 'netsh' exited with code '1'.
2022-12-08T11:00:05.0675934Z ##[section]Finishing: IIS Web App Manage
After a small debugging I figure out:
script: MSDeployOnTargetMachines.ps1 require binding as four object in object array
$isItSameBinding = $result.Get(4).Contains([string]::Format("{0}:{1}", $hostname, $port))
Script location: Tasks > IISWebAppDeployment > MsDeployOnTargetMachines.ps1
But netssh command generate it on 6 position
I also noticed that this bug appear when i start using OS:
Windows Server 2022 Datacenter Azure Edition
Task logs
tasklog_6.log
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs
Process 'netsh' exited with code '1'.
The text was updated successfully, but these errors were encountered: