Hi,
I’m seeing some strange failure when deploying an IIS website with a certificate. Previously worked fine, Octopus managed certificate, deployed a few weeks ago no issues, then last night, about 6 out 16 tenant deployments (separate servers) have suddenly failed with the same error.
On the servers, if I enumerate the store with Get-ChildItem Cert:\LocalMachine I get all the normal stores, but theirs also a UserDS store on the failed deployment servers, but not on the good ones.
When I use
Get-ChildItem Cert:\LocalMachine -Recurse
as Octopus.Features.IISWebSite_BeforePostDeploy.ps1 does, I see an error
“Get-ChildItem : The system cannot find the file specified”
when it gets to the UserDS store. I’m fairly sure this is what’s killing the Octopus deploy script when it tried to setup the bindings.
I have no idea where the UserDS store comes from, or how to reproduce this. It appears to be “Active Directory User Object” in the certlm GUI - however the server isn’t domain joined. The server isn’t 100% under my control so I’m not sure if something else has caused the UserDS to magically appear (or if it was there before and something else has caused problems).
Any suggestions welcome! (Yes I’ve tried rebooting )
One thing that might be worth implementing in the Octopus deploy script is to ignore certificate / certificate store errors so it stands a chance of still finding the appropriate cert when these sort of errors happen.
Log:
21:37:25 Verbose | Detected IIS Version 10.0
21:37:25 Info | Making sure a Website “” is configured in IIS…
21:37:25 Info | Finding SSL certificate with thumbprint
21:37:46 Error | NotSpecified: The system cannot find the file specified
21:37:46 Error | At \Octopus.Features.IISWebSite_BeforePostDeploy.ps1:485 char:18
21:37:46 Error | + … $certificate = Get-ChildItem Cert:\LocalMachine -Recurse | Where …
21:37:46 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21:37:46 Error | at , \Octopus.Features.IISWebSite_BeforePostDeploy.ps1: line 485
21:37:46 Error | at , \Octopus.Features.IISWebSite_BeforePostDeploy.ps1: line 469
21:37:46 Error | at , \Bootstrap.Octopus.Features.IISWebSite_BeforePostDeploy.ps1: line 3257
21:37:46 Error | at , : line 1
21:37:46 Error | at , : line 1
Thanks,
Steve.