Build Controller failing to start on TFS 2013 "Service cannot be started. The handle is invalid” - visual-studio-2013

After cloning a 2010 TFS server, upgrading the clone's OS to 2012R2, upgrading SQL Server to 2012 SP2 (11.0.5343), uninstalling TFS 2010, and upgrading to TFS 2013 with update 5, we are running into issues starting the Build Service on the clone.
I've removed the agents and build controllers referencing the other original server through Manage Build Controllers, in Visual Studio 2013.
I've tried to use the TFS 2013 upgrade wizard and it fails when attempting to start the build service so I tried to unconfigure: "tfsconfig.exe setup /uninstall:TeamBuild" and reconfigure through the TFS 2013 upgrade wizard but it yielded the same result.
The TFS database server, Build Server, controller, and agent are located on the same box
For measure, I've even deleted the agents, controllers, and Unregistered and Registered the Build Service in the Team Foundation Server Administration Console as both the batch account used on the original server but that failed so to rule out authentication, I used my domain account (I'm a Local Admin, SQL Server Admin, and TFS Admin) but still had the same result with both accounts.
The Windows event log states “Service cannot be started. The handle is invalid”.
I'm not sure what else could be missed does anyone have any pointers?

There were over 100 Microsoft patches/updates applied over the weekend and the issue went away. Microsoft confirmed that the issue was related to the OS, not the TFS configuration or installation/upgrade.
Thanks for all your suggestions. Hopefully this will help someone else out if they are in the same situation and spinning wheels to find the answer. Keep your systems as up to date as possible!

Try to remove build service by going to Team Foundation Server Administration Console, select server name, and click Remove Feature, to remove build service feature, then re-configure it.

Related

TFS 2018 Upgrade Build Agent

I am testing a TFS 2015 to TFS 2018 upgrade. My environment includes one database server, one TFS app server, and one TFS build server. I was able to upgrade the app tier without any issues. It's been awhile since I've done this, but I assume I just run the TFS upgrade installer again on the build server and it will give me the option to update the build agent? I didn't see anything for it when I ran the upgrade on the app server.

Issue while creating TFS Team Project

I’m doing a VSS to TFS upgrade for my team. We have configured the TFS server, now I’m trying to create a Team project on the server from my local VS2013 and I get an error as in the attached picture.
I have Farm administrator rights on SharePoint site, Full admin access to the Collection where I’m trying to create the Team project, Content Manager Rights on the Reports Folder.
I have cleared the TFS cache on my local as well.
Can you please help me out if I’m missing anything?
If you configured TFS to have Reports, it tries to create a folder in Reporting Services and populate with some pre-canned reports.
The error says that it is not able to find the machine with Reporting Services. Review the configuration at the console, if you can ping the machine, if port 80 (or another if you changed default) is reachable.

Release Management for Visual Studio - Not Working

Anybody able to successfully install/configure Release Management Server for TFS/Visual Studio 2013?
Went through simple install of SQL Express 2014/Release Management Server on both Win 8.1 Pro and Win Server 2012 R2 and the attached image is the result.
Interface appears to be missing many components, as if permission or some other IIS setting is incorrect.
Tried in both Chrome and IE with the same result.
Used default install settings (Network Service account) and currently running SQL Express on same machine as Release Management install.
This is the interface for RM's Release Explorer and it does look like that, unbelievable as it may seem. All this will change with new RM components in TFS 2015 - check out Donovon Brown's talk at Build 2015 for a preview.
Back to the root of your issue, which is that Release Explorer is only a minor part of the RM stack. Have you installed the RM client (a WPF application) which is the main interface for configuring RM? My continuous delivery with TFS blog post series here has all the details you need.

Unable to connect build service to TFS2013: Error TF30063 You are not authorized

I have TFS 2013 Update 3 installed on a machine and I'm trying to configure the TFS Build service on another machine on the same domain. The registration of the build service completes successfully but the service, controller, and build agents go into an endless start/stop/restart loop. The event viewer on the build machine gives the following error in the Build Services Operational log:
Build machine 'x' lost connectivity to message queue tfsmq://buildservicehost-18/.
Reason: TF30063: You are not authorized to access http://tfs2013:8080/tfs/defaultcollection.
Things I have tried:
Both NetworkService account and a domain account for the build configuration
Unregistering/re-registering the build service
Uninstalling TFS on build machine and reinstalling
Creating a fresh server 2012 install, installing TFS build component on it
The domain account I tried to use was in the build service account group for the collection and I've even tried putting it in the admin group. I also tried running it as my own domain account which is a tfs admin and domain admin account. All with the same results. The fact that this occurred on 2 different machines, one with a completely fresh everything install leads me to believe the problem is on the TFS application tier itself but I have no idea where to go from here. Visual studio is able to connect to TFS just fine for all users.
It sounds like you have a TFS 2012 server that you are trying to connect a TFS 2013 build agent to. This is not a supported configuration.
It is recommended that your build Agents version of TFS matched the version on the server. This does not mean that you can't build with any version of MSBuild or VS that you want on that agent. That's configuration.
I ended up resolving this by doing the following:
Detach Collection
Backup Collection as a precaution
Uninstall TFS 2013 from the App Tier (which is also the Data Tier)
Re-install TFS 2013 and configure it for single server like it was without creating a collection
Attach the existing collection
Uninstall TFS on the build server
Re-install TFS on the build server and configure the service, controller, and agents.
This worked fine and didn't cause me to lose anything. I still don't understand why I was having problems in the first place but my only guess is that it was some type of remnant from doing a migration based upgrade from TFS 2010.

Upgrading TFS 2008 to TFS 2012

I am currently working on a TFS 2008 to 2012 upgrade. Here is my situation: my current TFS 2008 box is Server 2K3 with SQL Server 2005 backend. I am not entirely sure what my upgrade paths are but I think the following 2 scenarios are the most likely:
Migrate the databases from SQL 2005 to SQL 2012 and then point TFS 2008 at the new SQL Server. From there I can upgrade TFS 2008 to 2012.
Spin up a new Server 2008R2 box and do a clean install of TFS 2012 with a SQL Server 2012 backend.
The network guys would really like me to do option 2 because they want to decommission the Server 2003 box but my concern is how would I get all of the data in TFS 2008 over to the TFS 2012 instance? I have looked around the MSDN and Google but I haven't come across any documents that explain how to do this kind of upgrade.
Additionally are there any pitfalls that I should be on the look out for?
Any help would be greatly appreciated!
The Microsoft Documentation doesn't make this abundantly clear so for anyone in the future that is in a similar situation this is a great little how to. Some of the screens vary to what you actually see but it is mostly spot on.
Some points
If you spread your Data and Application Tier across multiple servers make sure the user account you specify for 'Report Reader Account' has access to both servers and has the 'Log on locally' permission.
Pitfall: After getting TFS 2012 configured I was getting a strange URL exception when VS2012 attempted to connect to the imported project collection but not when trying to connect to a project collection created from within 2012. A server bounce corrected this problem.
All and all the process is very straightforward and TFS2012 stands up pretty quickly.
There is great documentation on MSDN: http://msdn.microsoft.com/en-us/library/ms404860(v=vs.100).aspx

Resources