Problem when running Bamboo agent as a Windows service

I have a Bamboo agent on a Windows 7 machine. When I start the agent from the command line, my builds work fine. When I install the agent as a Windows service, the builds hang.

The build in question depends on an executable which is in the system PATH variable. When running Bamboo as a Windows service, it gets to the point where it needs to use that executable and the build hangs. I'm not sure if the agent is unable to find the executable in the PATH or if something else is wrong.

I've tried installing the service both with the local system account and with the same user as I used when running it manually. I get the same result each time.

3 answers

1 accepted

2 votes
Accepted answer

It looks like the problem was actually Microsoft Word, which doesn't behave well in an automated environment. Even if the service is run as a user, Word will still run as the Local System account. The workaround is described here:

http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91

Joe Clark Atlassian Team Feb 02, 2012

Ah, that old chestnut. A real pain.

The work around in the above thread worked for me - in my case, I had to create the following folder to allow excel to run within a bamboo agent session

C:\Windows\SysWOW64\config\systemprofile\Desktop

0 votes

Is it any well known executable or an internal one?

It's the command-line tool for RoboHelp (RHCL.exe). This is the only area of our builds that requires a Windows machine to run, so it's the only time I've encountered this problem.

0 votes
Joe Clark Atlassian Team Jan 31, 2012
  • Try temporarily configuring your build to use a well-known executable on the system $PATH to see if you can isolate the problem to RHCL.exe (eg. try just running the "echo" command or somehting like that).

  • Does RHCL.exe interact with the Windows desktop at all? If so, you'll need to grant "allow service to interact with desktop" permission to the service.

  • What user account is running the bamboo service? Make sure the user has read and execute permissions on the executable.

  • If the exe requires administrator permissions, try turning off User Access Control on your bamboo agent.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Agile

How Scrum works? It starts with training and education

To answer “How scrum works,” most of the teams I've worked with first addressed the question: “where to start?”  That question applies to both implementation and improvements on the Scrum framew...

155 views 3 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you