Saturday, August 13, 2011

Microsoft Team Foundation Server Error: TF255251

I have done a few Microsoft Team Foundation Server 2010 installs.  Each time I do it, I seem to run into problems.  This latest time was no different.  After searching online for resolution to my problems I did not find much help, so I figured I should share what my problem was, and how I eventually solved it.

First for the quick answer.  The root of my problem was that I needed to add the "NT AUTHORITY\LOCAL SERVICE" account as a farm administrator for Sharepoint Services 3.0, and I had to do it as the user I entered in the TFS configuration.

Now for the history, how I got to the error, and how I debugged and fixed it.

My system is a virtual machine with 4 GB RAM running in VMWare Player.  I installed Windows Server 2008 R2, fully patched it on 8/12/2011, and installed SQL Server 2008 R2 with analysis and reporting services.  I then installed TFS 2010 using Sharepoint 3.0 Services.  My first issue, which the documentation did not seem to address, was a question asked during the SQL Server configuration.  The database setup needed to know whether to install in native mode or in Sharepoint Integration mode.



Not being able to find direction in the TFS installation documentation on this, I figured Sharepoint integration would be the way to go.  However, that is incorrect.  Native mode is needed.  I did not think to take screenshots of this error, but from my recollection this problem showed up when I was configuring TFS as an error with Reporting services.  The advice I found on how to fix this was to rollback or start over and choose the right option.  However, I found a way to get around that problem.  The resolution required the following:

  • Using the SQL Server 2008 R2 Management Studio
    • Detach the "ReportServer" database
  • Remove the files stored at C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA related to this database
    • ReportServer
    • ReportServer_log
  • Using the Reporting Services Configuration Manager
    • Start the tool and enter the SQL server / instance credentials
    • Click on "Database" to the left
    • Click on "Change Database" to the right - Note this will still look like the ReportServer database is there - but it is not
    • Add a new database in Native mode called ReportServer
    • [Note: I also had to setup the Report Manager URL with this tool by selecting that option to the left and hitting Apply so you may need to do that step as well]
Upon re-running the TFS setup, reporting services was setup correctly, but the last step of TFS configuration is setting up the default collection.  This step failed, and fails consistently.  Below is a screenshot of what the error detail looked like for me:


Now, this should have been fairly easy to fix.  I tried the following:
  • Start Sharepoint 3.0 Central Administration
  • Login using my personal user account (the same one I installed TFS with)
  • Click operations
  • Click Update farm administrator's group
  • Use the New pull down to add a new user named "NT AUTHORITY\LOCAL SERVICE"
    • This step failed, saying I had to be an administrator
This was confusing, because I am an administrator.  I am shown as being a Farm Administrator on that last screen we were on titled "People and Groups: Farm Administrators".  As it turns out, you have to use the account that was setup as part of the TFS configuration.  I named mine TFSREPORTS.  Once I logged on as that account and reran the above bullet list, I was able to add the LOCAL SERVICE user as a Farm Administrator.  Once it was there, creating collections seemed to work fine.  The one caveat is that while creating the collection had failed, it did actually make the databases for TFS_DefaultCollection.  I had to detach these and delete them from disk before the last step of TFS configuration would pass.  

I expect this error was injected because I did not use the right user account or right type of account somewhere along the way.  In my mind though, this is the simple case.  It should just work.  Since Sharepoint was installed by this step, I am not sure why the Sharepoint installation had an error.  But this error is repeatable, and it shouldn't exist.  The TFS installer has access to the account that can fix this problem in Sharepoint since it was created by the TFS installer.  It should automatically make the LOCAL SERVICE account a Sharepoint Farm Administrator, or at least clearly tell you what to do.  But then again, I'm a dreamer...

What would be a lot nicer though, is to not have to do any of this.  The VMWare gallery should have a virtual machine posted that has a working TFS server using trial licenses.  I should be able to download it, start it up, enter license keys, and be up and running without needing to do setup on my end.  This sort of thing may exist somewhere for Hyper-V, but it should be in the VMWare gallery as well.  If it is there, it's certainly not easy to find.

Monday, August 8, 2011

The First Taste is Free

I do a lot of development at home.  I do not find my professional life provides experience on the edge of technology, so I have projects I work on to keep my skills sharp and, more importantly, to develop new ones.  When doing this, I use Microsoft Team Foundation Server.  I have a license to MSDN Premium through work so this is a no-cost operation for me.   It is a nice tool.

But...

Now some friends of mine would like to join me on a project.  TFS is great, but it looks like it will cost around $500 / person in order to use TFS for a closed-source personal project.  This is unacceptable.  I spent a little time (and let me emphasize that "little") looking for another solution.  There are fragmented solutions that are free, but their quality does not impress me.  Where is the amazing end-to-end project management / source control / build automation tool that is free for non-commercial, small projects?

I do not understand the business of this.  Give the tools away for free for the little projects so that we are all hooked on them for the big projects.  As is, those that tend to drive the decisions are pushed into familiarity with the free tools and we end up using eclipse and subversion for C++ professional ventures when the tools are clearly inferior.

The number one rule for creating addicts:  the first taste is free.

And it can't be a trimmed down taste.  It needs to be the real thing.  Don't worry.  We'll come back with cash.


Rant Caveat:  Solutions need to provide something like Team Pulse with TFS integration.  There are free editions of some nice tools, but the free version always falls short.