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.
No comments:
Post a Comment