But it works on my PC!

The random thoughts of Richard Fennell on technology and software development

TF50609 error when creating a new team project in TFS 2010

After upgrading a TFS 2010 RC server (which was previously upgraded from Beta1 to Beta2) to RTM I hit a problem when trying to create a new team project. The error I saw was

Event Description: TF30162: Task "GroupCreation1" from Group "Groups" failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: TF50609: Unable to retrieve information for action ADMINISTER_TEST_ENVIRONMENTS, it does not exist.

A quick search shows this is a known problem with TFS 2010 Beta 1 to Beta 2 upgrades, strange it did not show itself on our servers until we when to RTM. Grant Holiday provides the solution for Beta 1 to Beta 2, but the command line required for RTM is slightly different to the one he had to use. The fix involves using both the parts of this post, the TF50660 is a symptom of the underling TF237091 error

  • Make sure you have exported a good working process template from another TPC
  • Delete all the old (Beta 2 process templates) from problem TPC
  • ALSO delete the new RTM process templates, in my case MSF Agile V5 (if you don’t do this and then reload the template the witadmin edit seems to have no effect)
  • Run the witadmin command (note no /P: option that Grant mentions and it is dimension not dim at the end)

witadmin chnagefield /collection:http://myserver:8080/tfs/myprojectcollection /n:Microsoft.VSTS.TCM.AutomationStatus /reportingtype:dimension

  • Import the known good process template (if you had tried to do this before the witadmin edit you would have got the error ‘TF237091: Actual reporting settings for the field Microsoft.VSTS.TCM.AutomationStatus are different from those specified in the XML. Changing these settings is prohibited.’
  • You should now be able to create new team projects
  • You need to repeat this for each TPC you have that shows the problem

TF261007 error message when attaching a collection

Whist moving Team Project Collections (TPC) from our old TFS2010 Beta/RC server to new production hardware I got a TF261007, exactly as detailed in Marcel de Vries post. However, I was in the better position than he was as I still had full access to my original server, so I thought I could go back, re-attached the TPC on the old server, run the command

tfsconfig lab /delete /collectionName:MyCollection /External

re-detach and all would be OK.

This was not the case, you still get the same problem as TF261007. It seems that if you have a TPC what has ever been on a TFS 2010 RC server with Lab Management configured then it can only be moved to a new server that also has Lab management configured, or at least SCOM VMM console installed and pointed at VMM Host.

I checked this with Microsoft and was told it is a known issue with the Lab Management RC and will be fixed in the RTM, for now there is no other workaround other than the one Marcel detailed.

Looking for a good overview of Visual Studio 2010 and ALM?

Visual Studio 2010 provides many new features to aid Application Lifecycle Management. Learning its capabilities can be a bit daunting, especially if you are new to Team Foundation Server.

So enter the new book ‘Professional Application Lifecycle Management with Visual Studio 2010: with Team Foundation Server 2010’ by Mickey Gousset, Brian Keller, Ajoy Krishnamoorthy and Martin Woodward. This provides a great overview of all the the key features of Visual Studio and TFS 2010, presented with a view as to how TFS gives an end to end delivery of an ALM process.

Don’t go expecting this book will tell you everything about TFS, even at 600 pages it cannot be that detailed, it is a huge product, you think SharePoint is big, well it is just a subset of TFS! To address this potential problem the book contains many links of to relevant sources both on MSDN and blogs to fill in the extra detail you are bound to need concerning TFS and general development processes. Think of it as a “get you started” book, or a “what’s new in this release”, not a day to day administrators guide.

My one complaint, and it is very minor, is that it does read a bit like a collection articles as opposed to a single book. However, given it has four authors and the scope of the subject it covers this is forgivable.

So if you are are considering TFS 2010, whether as a developer, a sys-admin or manager this book will give you a good introduction into that you can achieve in your ALM process. Well worth a read.

 

51GBrWYIk1L__BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU02_

Notes from our TFS 2010 upgrade

Got time today to start our proper internal TFS 2010 rollout. This involves linking up the new TFS to our SharePoint 2010 farm and merging in the contents from 2008 TFS and 2010 RC servers.

All went fairly well, our SharePoint farm caused a few problems with its rather nice redirection feature. This  allows you to gradually move SharePoint content from an older server to a new one. A page is requested from the new server, if it is there it is used, if it is not the content on the old server is used. This caused a couple of problems during the install of TFS that content was not on the new SharePoint server so it redirected to the old one. However, the correct response was that the content was not there and TFS need to install or configure it. Once we realised this was going on there were no major issues with the TFS 2010 installation.

So we had a nice new TFS 2010 install. The next task was to move over content from the 2008 server. Our 2008 server was virtualised so I snaphot’d it, made sure we had a good SQL backup and did an in-place upgrade, and this is where I hit a problem. Our new TFS 2010 install and the 2008 were using the same central SQL server. Our new TFS 2010 install had created a TFS_Configuration DB, I had had the option to put in prefix such as TFS_2010_Configuration but decided I did not need it. This choice came back to bite me. When you do an in-place upgrade of 2008 to 2010 it rolls up all the old TFS DBs into the new structure, creating a new DB, with you guess it, the name TFS_Configuration. If you are doing a new install you can alter this DB name, but this is not the case for a upgrade, you have to use the standard name. So I was a bit stuck. The solution was to:

  1. take my new TFS 2010 server temporarily off line
  2. rename the TFS_Configuration DB
  3. do the in-place upgrade on the new 2008 server to 2010, so it creates as new TFS_Configuration DB
  4. detach the newly upgraded Team Project Collection on the TFS admin console
  5. take my upgraded TFS 2008 server off line
  6. rename its TFS_Configuration DB (if really confident you could delete it)
  7. rename the original TFS_Configuration DB back
  8. restart the main TFS 2010 server
  9. attached the upgraded TPC in the TFS admin console

Simple really !

TF237195 error when creating a new team project

After upgrade TFS 2010 RC to RTM you might see a problem when you try to create a new team project. The creation fails with error:

Module: Engine
Event Description: TF30162: Task "Queries" from Group "WorkItemTracking" failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: TF237195: The following user name is not supported: [SERVER]\$$PROJECTCOLLECTIONADMINGROUP$$

The answer is simple, but I had missed it!

Make sure that you are creating your new team project from a copy of the 2010 RTM version of Team Explorer. If you use the RC version you will see the error.

TFS 2010 RC –> RTM upgrade problem with the warehouse

I recently did an in-place upgrade of a TFS 2010 RC  to RTM box. All appeared to be going fine, all the verification in the upgrade wizard passed, but when I hit configure the first step failed. It said there was a missing  dbo.sysobjects in the warehouse DB. I then had to resort the configuration DB as it was partly upgraded to try again as the DB was left partially upgraded.

I got round this problem by telling the upgrade to ignore the reporting side of TFS. The upgrade completed without issue. I was then able to re-add the reporting via the TFS administration console (optional configuration of features in 2010 is really useful!). I actually chose to recreate the warehouse DBs anew to make sure I was bringing over no corruption. Once TFS had rebuild all the DBs and cubes all was working fine.

So the technical tip: if upgrading TFS 2010 and you are getting a problem with the reporting sub system, consider bypassing the upgraded and just rebuilding that system when you are finished

[Update 19th May 2010] 

Saw the problem again today on another site going a RC->RTM upgrade. the exact error message you get is

Exception Message: TF255356: The following error occurred when configuring the Team Foundation databases: Error occurred while executing servicing step Upgrade Warehouse for component Tfs2010WarehouseBeta2ToRTM during Tfs2010Beta2ToRTM: Errors in the metadata manager. The dimension with the name of 'Work Item Tree' already exists in the 'Tfs_Analysis' database.

TF246064 upgrading TFS 2010RC to RTM

I have a basic installation of TFS 2010 running on my Windows 7 laptop. This is really useful for testing build customisation and the like, a great new feature for 2010. Today I got around to trying to upgrade it from RC to RTM, but on the verification test I got the error

[ Configuration Database ] TF255407: An error occurred while attempting to validate the configuration database. Error message: TF246064: No database could be found for the following host: TestCollection. The host has the following ID: eaf3c572-8657-4268-9852-3d73a799cdf5. To fix this problem, use the TFSConfig RemapDBs command-line tool and make sure that you specify the SQL Server instance that contains this database.

Turns out I had been a bit stupid. I had created a couple of test team project collections (TPC) whilst testing some attach/detach scenarios for a client. I deleted the underlying SQL DBs, but not deleted the TCP in TFS, I guess as part of some test, but for the life of me I cannot remember why.

So as the error message suggested I tried to run the TFSConfig command

C:\Program Files\Microsoft Team Foundation Server 2010\Tools>tfsconfig remapdbs /sqlinstances:Typhoon\sqlexpress /databaseName:typhoon\sqlexpress;TFs_configuration
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\CFG_CFG_AT_0504_090019.log
Command: remapDBs
TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.
The Team Foundation Server configuration could not be reconfigured. The following errors were encountered:

TF246064: No database could be found for the following host: test1. The host has the following ID: 4e9b737a-b666-48f4-9411-20249aed7ae0. To fix this problem, use the TFSConfig RemapDBs command-line tool and make sure that you specify the SQL Server instance that contains this database.
TF246064: No database could be found for the following host: TestCollection. The host has the following ID: eaf3c572-8657-4268-9852-3d73a799cdf5. To fix this problem, use the TFSConfig RemapDBs command-line tool and make sure that you specify the SQL Server instance that contains this database.

So the same error as the upgrade wizard. I also tried detaching and deleting the TCP, but got:

C:\Program Files\Microsoft Team Foundation Server 2010\Tools>tfsconfig collection /delete /collectionName:TestCollection
Logging sent to file C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs\CFG_TPC_AT_0504_090828.log
Command: collection
TfsConfig - Team Foundation Server Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.
Could not find file 'C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\web.config'.

But this failed as I had already removed the 2010RC instance, so there was no web.config to read.

So what to do?

I opened SQL Management Studio and connected to my local SQL instance, open the Tfs_Configuration DB and found the tbl_ServiceHost table. I then removed the rows that referenced the TPC that had I deleted the DB for. Of course I had made sure I had a backup of the DB before I started.

Once this was done the upgrade wizard passed verification and completed without error.

Now I would not recommend this as a good way to work, but it did get me out of a hole. In my case it was only a test system so if I lost it, it was not that important. However it is good to know there is a reasonably simple solution address problems with missing TPC DBs

Technical Tip: Make sure all your TPCs are valid before you start the upgrade process, so you don’t see this issue in the first place!

Speaking at Developer Day South West

I have just heard I will be speaking at Developer Day South West on June the 5th. My subject is Using the new Developer and Test features of VS 2010 to track down and fix bugs, this is basically the same session as I have at our TechDays fringe event yesterday.

Hope to see you there

DDDSouthWest2BadgeSmall[1]