Upgrading Tentacle gives Powershell Error

Hello,

When upgrading one tentacle, the upgrade failed and this message was returned when running Deploy.ps1:

 Running PowerShell script: D:\Octopus\Applications\<snip>\Octopus.Tentacle\2.4.10.235\Deploy.ps1
Verbose    11:20:30
Failed receiving Octopus.Tentacle.Orchestration.Procedures.CallProcedureCommand
Error when attempting to execute powershell.exe: The system cannot find the file specified
System.Exception: Error when attempting to execute powershell.exe: The system cannot find the file specified ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at Pipefish.Async.CaptiveProcess`1.BeginExecute(CaptiveProcessStartInfo startInfo, Action`1 output, Action`1 error, Int32& processId) in y:\work\3cbe05672d69a231\source\Pipefish\Async\CaptiveProcess.cs:line 217
   --- End of inner exception stack trace ---
   at Pipefish.Async.CaptiveProcess`1.BeginExecute(CaptiveProcessStartInfo startInfo, Action`1 output, Action`1 error, Int32& processId) in y:\work\3cbe05672d69a231\source\Pipefish\Async\CaptiveProcess.cs:line 241
   at Pipefish.Async.CaptiveProcess`1.Start(CaptiveProcessStartInfo startInfo, TInProcState initialState, Action`2 outputWritten, Action`2 errorOutputWritten) in y:\work\3cbe05672d69a231\source\Pipefish\Async\CaptiveProcess.cs:line 107
   at Octopus.Tentacle.Orchestration.Procedures.ProcedureCallOrchestrator.RunProcess(CaptiveProcessStartInfo startInfo, Action`2 outputWritten, Action`2 errorOutputWritten) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\Procedures\ProcedureCallOrchestrator.cs:line 157
   at Octopus.Tentacle.Procedures.Implementations.Scripts.PowerShellScriptProcedure.Start(IProcedureHost host, ProcedureState state) in y:\work\refs\heads\master\source\Octopus.Tentacle\Procedures\Implementations\Scripts\PowerShellScriptProcedure.cs:line 64
   at Octopus.Tentacle.Orchestration.Procedures.ProcedureCallOrchestrator.Receive(CallProcedureCommand message) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\Procedures\ProcedureCallOrchestrator.cs:line 73
   at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in y:\work\3cbe05672d69a231\source\Pipefish\Actor.cs:line 113
Fatal    11:20:30
Error when attempting to execute powershell.exe: The system cannot find the file specified
System.Exception: Error when attempting to execute powershell.exe: The system cannot find the file specified ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at Pipefish.Async.CaptiveProcess`1.BeginExecute(CaptiveProcessStartInfo startInfo, Action`1 output, Action`1 error, Int32& processId) in y:\work\3cbe05672d69a231\source\Pipefish\Async\CaptiveProcess.cs:line 217
   --- End of inner exception stack trace ---
   at Pipefish.Async.CaptiveProcess`1.BeginExecute(CaptiveProcessStartInfo startInfo, Action`1 output, Action`1 error, Int32& processId) in y:\work\3cbe05672d69a231\source\Pipefish\Async\CaptiveProcess.cs:line 241
   at Pipefish.Async.CaptiveProcess`1.Start(CaptiveProcessStartInfo startInfo, TInProcState initialState, Action`2 outputWritten, Action`2 errorOutputWritten) in y:\work\3cbe05672d69a231\source\Pipefish\Async\CaptiveProcess.cs:line 107
   at Octopus.Tentacle.Orchestration.Procedures.ProcedureCallOrchestrator.RunProcess(CaptiveProcessStartInfo startInfo, Action`2 outputWritten, Action`2 errorOutputWritten) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\Procedures\ProcedureCallOrchestrator.cs:line 157
   at Octopus.Tentacle.Procedures.Implementations.Scripts.PowerShellScriptProcedure.Start(IProcedureHost host, ProcedureState state) in y:\work\refs\heads\master\source\Octopus.Tentacle\Procedures\Implementations\Scripts\PowerShellScriptProcedure.cs:line 64
   at Octopus.Tentacle.Orchestration.Procedures.ProcedureCallOrchestrator.Receive(CallProcedureCommand message) in y:\work\refs\heads\master\source\Octopus.Tentacle\Orchestration\Procedures\ProcedureCallOrchestrator.cs:line 73
   at Pipefish.Actor.OnReceivingTyped[TBody](Message message) in y:\work\3cbe05672d69a231\source\Pipefish\Actor.cs:line 113

I’ve verified that the file: D:\Octopus\Applications\<snip>\Octopus.Tentacle\2.4.10.235\Deploy.ps1 exists.

This also affects running the PostDeploy.ps1 script on a deployment to the tentacle.

Thus far I haven’t attempted to upgrade the tentacle manually.

Tentacle OS: Windows Server 2008 R2 Standard (SP1)
Tentacle Version: (sorry, looking for this, will update if/when I find it…)
Server Version: 2.4.10.235

Let me know if more information is required.

Thanks

Greg.

This is blocking, so attempted the upgrade manually to tentacle version 2.5.5.318.

This worked fine, but the Octopus server Environments page didn’t recognise that the tentacle had been upgraded, and so I can’t deploy to that tentacle.

I updated via the server as requested, and this seemed to go ok (and successfully ran the Deploy.ps1 script, which failed initially as per first post).

However, the step on the upgrade process to restart the service hung for more than 12 minutes, so I cancelled it. The tentacle service will restart normally on the tentacle server. All subsequent attempts to run the upgrade have the same result.

Having cancelled the upgrade process, the server again will not recognise that the tentacle is already on the latest version.

Since the first post i’ve upgraded the Octopus server to 2.5.5.318.

In the absence of an actual solution, it seems like a workaround for me will be to force the server not to check that tentacle for updates - is there a way to do this? If not, I think my next course is to completely remove and reinstall the tentacle.

Thanks.

Hi Greg,

Sorry for the delay in getting back to you here. If you were successful in using the MSI to install the tentacle, running a health check on the tentacle from Octopus should recognize it as having been upgraded. Can you give this a try for me?
Health checks also check the version of the tentacles.

Please let me know how this goes.
Vanessa

Arrrgh, such a simple solution.

Thanks Vanessa - this worked perfectly.

Greg.