TFS 2012 Update 1 Issue: Error while configuring build


[Update 2/1/13] A fix for the issues is now available.

[Update 1/14/13] See this post for the latest on a fix with attaching collections.

We’ve discovered an issue in TFS Update 1 that may result in errors when you try to configure a build agent or controller. You will see an error in the Build Service Configuration Wizard (configuring a new agent/controller) or in the TFS Administration Console (viewing the properties of a build controller/agent).

In the event log on the server, you’d find an error about the database not being configured correctly.

TF53010: The following error has occurred in a Team Foundation component or extension:

<…>

Detailed Message: TF30065: An unhandled exception occurred.

<…>

Exception Message: TF30040: The database is not correctly configured. Contact your Team Foundation Server administrator. (type DatabaseConfigurationException)

Exception Stack Trace:    at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(Int32 errorNumber, SqlException sqlException, SqlError sqlError)

<…>

Exception Message: Operand type clash: dbo.typ_BuildControllerTableV2 is incompatible with dbo.typ_BuildControllerTable (type SqlException)

The workaround is to run the following commands.

  • iisreset
  • net stop tfsjobagent
  • net start tfsjobagent

Grant Holliday posted more details here.

[Update 11/30/12] Note that this is a race condition that you may not hit and that the app pools for TFS are set to recycle every 29 hours (the Regular Time Interval setting in IIS), which will also fix this issue.

Follow me at twitter.com/tfsbuck

Comments (6)

  1. Josh says:

    Is this a "once-off" restart of the tfsjobagent, or will this happen each time we reconfigure the build services?

  2. Buck Hodges says:

    Josh, it's just once after upgrade.

  3. Simon says:

    Hmm, it didn't happen to me, I created a new controller and build agent using the admin console as two separate steps after installing the upgrade.  I had never created/attached a controller before on that TFS server.

    I know I rebooted at some point but I thought it was before hand for a run-time upgrade to be honest so I should have been affected…

  4. Buck Hodges says:

    Simon, it's a race condition, so you may not have it in your environment.

  5. Rolf Huisman says:

    We saw something different. The build agents where online after upgrade but the controller wasn't

    We rebooted the tfs server which fixed that. However all builds of all team projects where automaticly triggered off exactly at the same time after the upgrade. Killing the io on the san for the buildservers :(

  6. Buck Hodges says:

    Rolf, I asked the team, and they said it sounds like the job agents got delayed, perhaps by the upgrade, and then all started after the reboot.

    Is everything working properly now?