Tuesday, October 29, 2013

TFS Build Server Error: The build service host XXX is currently owned by XXX. A service host may only be active on one machine at a time.

A customer reported me the following problem with their TFS Build Server:

We had several occurrences of an error on the build development server that prevents the build controller from starting.

In the TFS Event log on the server, this error message appears:

Exception Message: The build service host XXX is currently owned by XXX. A service host may only be active on one machine at a time. (type BuildServiceHostOwnershipException)

A service restart will not correct this error.

One workaround we found is to reinitialize the build server status in the Team Foundation Server collection database.

Execute the following steps to do this:

  • Determine what is the ServiceHostId of your build server (to get a key for the update):
  • Update the record to reinitialize status:

Remark: Be careful! This is a workaround, NOT an officially supported solution.

4 comments:

Dave from Canada said...

Hi,
is this intended to be a permanent fix? or do you have to run it every time you see the error?
I see this multiple times per week.
Thanks,
Dave

Bart Wullems said...

Hi Dave,

This really is a workaround. I only had the issue once. So if you keep having it, it's maybe a good idea to log a defect at Microsoft for a 'real' solution.

Regards

Bart

Shruti Ramalingam said...
This comment has been removed by a blog administrator.
Dennis van der Pool said...

Thanks, solved our issue :)