Thanks for testing that out for me. It looks like this has actually succeeded for all of you (Exit code: 0) but for some reason Pascal’s system is writing to STDERR even though we’ve caught the exception.
We’ll ship this today to unblock you all, and I’ll continue to investigate why Pascal’s system is behaving differently. Got any ideas about special group policies etc Pascal?
We’ve released Octopus 3.2.5 this morning with the proposed bug fix. Please get back in touch and let me know how it works in your environments.
Pascal, I’m still trying to figure out what could possibly be causing the behaviour you are seeing. Could you confirm for me that your deployments start succeeding, perhaps with these misleading error logs buried within, or if the deployment still fails.
I think the same problem is also in this file:
Bootstrap.Octopus.Features.WindowsService_AfterPreDeploy.ps1:78 char:10
(Running on 3.2.6)
Add-Type : Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
At C:\Octopus\Applications\Production\Test\1.0.15315.3_1\Bootstrap.Octopus.Features.WindowsService_AfterPreDeploy.ps1:78 char:10
+ Add-Type <<<< -AssemblyName System.Core -ErrorAction SilentlyContinue
+ CategoryInfo : NotSpecified: (:) [Add-Type], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.AddTypeCommand
I have to apologise for some confusion - we shipped this particular fix as part of 3.2.5 but discovered a very mysterious issue where extra padding is being added to the end of decrypted values in a different set of cases. In the end we narrowed it down to this particular code change.
We’ve ended up removing the 3.2.5 release and shipped 3.2.6 as an emergency hotfix, with this code reverted.
So Luuk, that’s why you’re seeing the behaviour in 3.2.6 in Bootstrap.Octopus.Features.WindowsService_AfterPreDeploy.ps1 - it’s actually the bootstrap.ps1 back in the state that doesn’t work with PowerShell 2.0 and .NET 2.0.
Long story short, we are working very hard to figure out how to get both bug fixes completed and are planning to ship that today in 3.2.7 after we can reliably reproduce (and prove we’ve fixed) both problem cases.
Again, I’m sorry for the confusion but be assured we are working to resolve this issue as quickly as we can.
Hold the press, Mike! With 3.2.6, I’m back at my old error:
16:33:52 Verbose | Name Value
16:33:52 Verbose | ---- -----
16:33:52 Verbose | CLRVersion 2.0.50727.5485
16:33:52 Verbose | BuildVersion 6.1.7601.17514
16:33:52 Verbose | PSVersion 2.0
16:33:52 Verbose | WSManStackVersion 2.0
16:33:52 Verbose | PSCompatibleVersions {1.0, 2.0}
16:33:52 Verbose | SerializationVersion 1.1.0.1
16:33:52 Verbose | PSRemotingProtocolVersion 2.1
16:33:52 Error | Add-Type : Could not load file or assembly 'System.Core, Version=3.5.0.0, Cultu
16:33:52 Error | re=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The sy
16:33:52 Error | stem cannot find the file specified.
16:33:52 Error | At D:\Octopus\Work\20151126153349-4\Bootstrap.Script.ps1:78 char:10
16:33:52 Error | + Add-Type <<<< -AssemblyName System.Core -ErrorAction SilentlyContinue
16:33:52 Error | + CategoryInfo : NotSpecified: (:) [Add-Type], FileNotFoundExcept
16:33:52 Error | ion
16:33:52 Error | + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerS
16:33:52 Error | hell.Commands.AddTypeCommand
16:33:53 Fatal | The remote script failed with exit code 1
I just finished another manual rollback to 3.2.5 to get things to work again.
So I was hopeful of continuing with 3.2.5 and I deployed a tentacle to another server. But on this one I’m getting another error. Not sure it’s related:
21:32:14 Verbose | Creating 'd:\inetpub\ibe\Octopus.Features.IISWebSite_BeforePostDeploy.ps1' from embedded resource
21:32:14 Verbose | Executing 'd:\inetpub\ibe\Octopus.Features.IISWebSite_BeforePostDeploy.ps1'
21:32:15 Verbose | Name Value
21:32:15 Verbose | ---- -----
21:32:15 Verbose | CLRVersion 2.0.50727.5485
21:32:15 Verbose | BuildVersion 6.1.7601.17514
21:32:15 Verbose | PSVersion 2.0
21:32:15 Verbose | WSManStackVersion 2.0
21:32:15 Verbose | PSCompatibleVersions {1.0, 2.0}
21:32:15 Verbose | SerializationVersion 1.1.0.1
21:32:15 Verbose | PSRemotingProtocolVersion 2.1
21:32:15 Verbose | Could not load AesCryptoServiceProvider, falling back to RijndaelManaged (.NET 2.0).
21:32:15 Verbose | Could not load AesCryptoServiceProvider, falling back to RijndaelManaged (.NET 2.0).
21:32:15 Error | ForEach-Object : Exception calling "Parse" with "1" argument(s): "String was no
21:32:15 Error | t recognized as a valid Boolean."
21:32:15 Error | At D:\inetpub\ibe\Octopus.Features.IISWebSite_BeforePostDeploy.ps1:127 char:44
21:32:15 Error | + $bindingString.Split("|") | foreach-object <<<< {
21:32:15 Error | + CategoryInfo : NotSpecified: (:) [ForEach-Object], MethodInvoca
21:32:15 Error | tionException
21:32:15 Error | + FullyQualifiedErrorId : DotNetMethodException,Microsoft.PowerShell.Comma
21:32:15 Error | nds.ForEachObjectCommand
21:32:15 Verbose | Deleting 'd:\inetpub\ibe\Octopus.Features.IISWebSite_BeforePostDeploy.ps1'
21:32:15 Error | Script 'd:\inetpub\ibe\Octopus.Features.IISWebSite_BeforePostDeploy.ps1' returned non-zero exit code: 1
21:32:15 Error | Running rollback conventions...
Just wanted to let you know we’ve found a middle-ground solution that works for all of these scenarios we’ve discussed on this thread, and the other thread.
It will ship with Octopus 3.2.7. We have also been able to implement end-to-end tests that covers these failure scenarios more completely.
Pascal, could you please raise another support request for the String was not recognized as a valid boolean? It’s unrelated.
Hope that helps, and again, I’m sorry for the confusion.
Mike
Sorry, the “String was not recognized as a valid boolean” error was a misconfiguration from my side. I thought it might be related when I saw the “Could not load AesCryptoServiceProvider, falling back to RijndaelManaged (.NET 2.0).” message. But luckily it wasn’t.