psexec output behaves differently under Bamboo than command prompt

Eric Hood July 18, 2016

Short form: When running a tool on a remote machine via psexec, the output of the tool is generated when run from a command prompt, but is missing when invoked from Bamboo.

psexec.exe -accepteula (remote) (tool.exe)

Starting PSEXESVC service on (remote)...
Connecting with PsExec service on (remote)...
Starting (tool.exe) on (remote)...

(tool output shows here in command prompt, is missing in bamboo log...)

(tool.exe) exited on (remote) with error code 0.

 

Long form:  I have a tool I'm wanting to execute on a remote machine during an automated build.  It works, but every once in a while, it locks up, and in turn would lock up the build, since it never exits.  I've added logging to the console in the tool, in hopes of tracking down what's happening.  If I start up a command prompt using the same identity as the bamboo service, and call psexec (as above), the tool output to the console displays just fine.

Unfortunately, when the same command is called during a bamboo build (via the Bamboo SCRIPT task), the psexec runs the tool, and the tool executes, but none of the console logging is being recorded in the bamboo logs.

I'm using the latest psexec (2.11).  

Anybody have any luck seeing the remotely executed tools output within Bamboo's logs?

Can someone explain to me the apparent idiosyncratic differences between calling psexec via a command prompt versus how Bamboo invokes it within its SCRIPT task? 

1 answer

0 votes
Aaron Cunnington September 8, 2016

Hi Eric,

I seem to be having the exact same problem as you, using Bamboo 5.10.3 and psexec 2.11 on my Windows Server 2012 R2 build and deploy server.

I can see that psexec starts successfully in the Bamboo deploy log, but Bamboo doesn't wait for psexec to complete; it only provides partial output before continuing to the next command in my deploy script.

If I run the deploy script in the console on the build server then it operates as expected and waits for the psexec command to complete before running any other commands.

I am tempted to open a support ticket with Atlassian to investigate and find a solution.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events