Error on deploy referencing Teamcity -- but there is no Teamcity!

Hi

When I attempted my first ever deployment, it failed referencing a powershell script in C:\Teamcity (log is below).

I do not have Teamcity integration set up on this server (it’s only a trial, so Manager and Tentacle are on the same box). I did have before with a previous version of Octopus, but I completely uninstalled both the old version of Octopus and Teamcity before installing Octopus V2

I had a poke around wondering if some old settings were being held over somewhere, but couldn’t find anything.

Any ideas?

LOG:

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 Octopus.Platform.Util.SilentProcessRunner.ExecuteCommand(String executable, String arguments, String workingDirectory, Action1 output, Action1 error) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Platform\Util\SilentProcessRunner.cs:line 52
— End of inner exception stack trace —
at Octopus.Platform.Util.SilentProcessRunner.ExecuteCommand(String executable, String arguments, String workingDirectory, Action1 output, Action1 error) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Platform\Util\SilentProcessRunner.cs:line 67
at Octopus.Tentacle.Deployment.Integration.Scripting.PowerShell.FileBasedPowerShellRunner.Execute(ScriptArguments arguments) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Tentacle\Deployment\Integration\Scripting\PowerShell\FileBasedPowerShellRunner.cs:line 43
at Octopus.Tentacle.Deployment.Conventions.Implementations.ScriptConvention.<>c__DisplayClass1.b__0(IConventionContext cc) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Tentacle\Deployment\Conventions\Implementations\ScriptConvention.cs:line 46
at Octopus.Tentacle.Deployment.Conventions.ConventionContextExtensions.RunChildOperation(IConventionContext context, String friendlyName, Action`1 operation) in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Tentacle\Deployment\Conventions\ConventionContextExtensions.cs:line 15

Hi Nick - sorry about the confusion, the folder names in the error trace are the location of the source files from which Octopus itself was built, e.g.:

c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Platform\Util\SilentProcessRunner.cs:line 52

The file that is the cause of the error is powershell.exe - for some reason, the Octopus Tentacle is unable to find PowerShell in order to invoke a script.

Can you please let me know what OS you’re on, and if you open a command prompt, what the output of:

powershell

is?

If the command above actually does find PowerShell, running:

$PSVersionTable

from the resulting PowerShell prompt will give us some more information.

Regards,
Nick

Hi Nick.

I’m running on Windows 7, which I now see is not listed in the list of OSes for either server or tentacle. This is a trial I was trying out on my workstation. Is this not possible? If not, might I suggest that the installer tells you so?

Regards,
Nick

CMD.exe/Powershell output here:
@@@
Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.
C:\Users\nick.delany>powershell
Windows PowerShell
Copyright © 2009 Microsoft Corporation. All rights reserved.
C:\Users\nick.delany
$ $PSVersionTable
@@@

Name Value
CLRVersion 2.0.50727.5472
BuildVersion 6.1.7601.17514
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1

Thanks for the info. Are you using the 32- or 64- bit Tentacle? It is a slim possibility, but switching to the other may help if this is a machine configuration quirk. Will see if we can generate any other ideas here.

Cheers,
Nick

Hi Nick,

I switched from 64 bit to 32 bit, but I realised in the end the problem was simply that Powershell is on my path, but not on the system path, so the Tentacle can’t see it.

Simple solution in the end. Thanks for your help.

Nick

Aha - great, thanks for following up with the solution.

Regards,
Nick