OpsHub Migration - Rename Task Timing Out - tfs

I've run into an issue using the OpsHub VS Online Migration Utility (OVSMU-V1.2.0.000) with a migration. The process is failing on a rather large changeset - renaming 10901 files. However, one previous changeset Renamed 21493 files in about 4 seconds.
Here is the original error from the OpsHubTFSService.log:
20:33:25,737 [32] DEBUG Imcoming Pend Rename - 10901 files.
20:34:52,848 [27] DEBUG Connecting to the team foundation server instance http://myserver.com:8080/tfs/
20:34:52,865 [27] DEBUG Login successful for token cc15f8a2-a930-42fa-b7ab-ea7037f11f23
20:34:52,918 [27] DEBUG Logout successful for token cc15f8a2-a930-42fa-b7ab-ea7037f11f23
20:44:52,968 [27] DEBUG Connecting to the team foundation server instance http://myserver.com:8080/tfs/
20:44:52,984 [27] DEBUG Login successful for token 58bae319-da16-43eb-8346-fe57a4d5b4db
20:44:53,040 [27] DEBUG Logout successful for token 58bae319-da16-43eb-8346-fe57a4d5b4db
20:54:52,940 [27] DEBUG Connecting to the team foundation server instance http://myserver.com:8080/tfs/
20:54:52,961 [27] DEBUG Login successful for token 9bd99b77-655e-4dc6-a027-cb3a842f1b59
20:54:53,320 [27] DEBUG Logout successful for token 9bd99b77-655e-4dc6-a027-cb3a842f1b59
21:01:28,096 [32] DEBUG Exception in thread of CheckinALL process.
21:01:28,576 [35] ERROR Error occured in thread of CheckinAll:TF400324: Team Foundation services are not available from server myserver.visualstudio.com\DefaultCollection.
Technical information (for administrator):
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.ReadResponse(HttpWebResponse webResponse, WebException webException)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.IsAuthenticationChallenge(TfsMessage requestMessage, HttpWebResponse webResponse, WebException webException, TfsMessage& responseMessage)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
at Microsoft.TeamFoundation.VersionControl.Client.Repository5.PendChanges(String workspaceName, String ownerName, ChangeRequest[] changes, Int32 pendChangesOptions, Int32 supportedFeatures, String[] itemPropertyFilters, String[] itemAttributeFilters, Int32 maxClientPathLength, Failure[]& failures, Int32& changePendedFlags)
at Microsoft.TeamFoundation.VersionControl.Client.WebServiceLayerLocalWorkspaces.PendChanges(String workspaceName, String ownerName, ChangeRequest[] changes, Int32 pendChangesOptions, Int32 supportedFeatures, Failure[]& failures, String[] itemAttributeFilters, String[] itemPropertyFilters, Boolean updateDisk, Boolean& onlineOperation, Int32& flags)
at Microsoft.TeamFoundation.VersionControl.Client.Client.PendChanges(Workspace workspace, ChangeRequest[] changeRequests, Boolean updateDisk, PendChangesOptions options, String[] itemAttributeFilters, String[] itemPropertyFilters, Int32 operationId)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendChanges(ChangeRequest[] changeRequests, Boolean updateDisk, PendChangesOptions options, String[] itemAttributeFilters, String[] itemPropertyFilters)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendRename(String oldPath, String newPath, LockLevel lockLevel, Boolean updateDisk, Boolean detectFolderAtTarget, Boolean silent, String[] itemAttributeFilters)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendRename(String oldPath, String newPath, LockLevel lockLevel, Boolean updateDisk, Boolean detectFolderAtTarget, Boolean silent)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.PendRename(String oldPath, String newPath, LockLevel lockLevel, Boolean updateDisk, Boolean detectFolderAtTarget)
at Service.Adapters.TFSCheckinWorkspaceContext.pendRenames() in e:\5.7Checkout\VSMUOpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSCheckinWorkspaceContext.cs:line 2020
at Service.Adapters.TFSCheckinWorkspaceContext.pendChanges() in e:\5.7Checkout\VSMUOpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSCheckinWorkspaceContext.cs:line 2484
at Service.Adapters.TFSVCAdapter.checkIn(List`1 checkinItems, String checkinComment, String checkinUser, List`1 workitemId, List`1 otherCheckInProperties) in e:\5.7Checkout\VSMUOpsHubV2\TFSWCFServiceSource\Service\Service\TFSVersionControl\AdapterComponents\TFSVCAdapter.cs:line 121
at com.opshub.tfs.test.TFSWebService.<>c__DisplayClass2.<CheckInAll>b__0() in e:\5.7Checkout\VSMUOpsHubV2\TFSWCFServiceSource\Service\Service\TFSWebService.cs:line 760
21:01:28,579 [35] ERROR Error : An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
I cleared the local TFS user cache and restarted the OpsHub Migration Utility. On re-running the migration, the changeset ran again for over an hour then failed.
14:49:19,683 [5] DEBUG Imcoming Pend Rename - 10901 files.
14:57:30,677 [4] DEBUG Connecting to the team foundation server instance http://myserver.com:8080/tfs/
14:57:30,712 [4] DEBUG Login successful for token dd0735cf-4ac7-49f1-b00b-c9c4c3cc3b5c
14:57:31,810 [4] DEBUG Logout successful for token dd0735cf-4ac7-49f1-b00b-c9c4c3cc3b5c
... (repeat Connect, Login, Logout every 10 mins) ...
16:17:37,230 [5] DEBUG Renamed 1000/10901 items processed.
16:17:48,605 [6] DEBUG Connecting to the team foundation server instance http://myserver.com:8080/tfs/
16:17:48,621 [6] DEBUG Login successful for token 7ed122d5-cf0f-4775-a33e-385a55fd8313
16:17:48,668 [6] DEBUG Logout successful for token 7ed122d5-cf0f-4775-a33e-385a55fd8313
16:27:25,769 [5] DEBUG Exception in thread of CheckinALL process.
16:27:26,659 [6] ERROR Error occured in thread of CheckinAll:TF400324: Team Foundation services are not available from server myserver.visualstudio.com\DefaultCollection.
Technical information (for administrator):
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
(same as above)
It seems like it isn't keeping a session to myserver.visualstudio.com after the end of running a very long process on myserver.com:8080/tfs/.
There are many similar issues logged here in SO, but I've found none with a resolution for this issue.
Any ideas on how to proceed with this migration?

Are you facing this error continuously? Could you please restart the utility and start the migration again after retrying the failures under failure management. Let us know the outcome. Sometime this type of error might occurred due to minor network outage or packet drop.
Also one more thing, try increasing time-out limit from TFS server side. Information is provided inside following blog. Sometimes this type of error might occurred in case TFS is hosted on the vm environment/shared servers.
http://blogs.msdn.com/b/ablock/archive/2008/09/16/increasing-the-time-out-time.aspx
Let us know if you have any questions/queries around this.
Thanks & Regards,
OpsHub Support

Related

TFS build failing because of registry access is not allowed

I am configuring New bulid server I am having TFS 2013. I am an admin on the build server and the account which is used for configuring build server is also a admin on build server.
I am able to access my TFS and able to Checkin code as well from build server.
I don't know what access rights I have to give to my user or to the account used for configuring build server.
Exception Message: Requested registry access is not allowed. (type SecurityException)
Exception Stack Trace:
Server stack trace:
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at Microsoft.TeamFoundation.Common.Internal.TeamFoundationEnvironment.OpenOrCreateRootUserRegistryKey()
at Microsoft.TeamFoundation.VersionControl.Client.Workstation.get_AttemptToAutoResolveConflicts()
at Microsoft.TeamFoundation.VersionControl.Client.Client.Get(Workspace workspace, GetRequest[] requests, GetOptions options, GetFilterCallback filterCallback, Object userData, String[] itemAttributeFilters, String[] itemPropertyFilters, Boolean alwaysQueryConflicts, Conflict[]& conflicts, Int32 operationId)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.Get(GetRequest[] requests, GetOptions options, GetFilterCallback filterCallback, Object userData, String[] itemAttributeFilters, String[] itemPropertyFilters, Boolean alwaysQueryConflicts, Conflict[]& conflicts)
at Microsoft.TeamFoundation.VersionControl.Client.Workspace.Get(GetRequest[] requests, GetOptions options, GetFilterCallback filterCallback, Object userData)
at Microsoft.TeamFoundation.Build.Workflow.Activities.TfGet.TfGetCore.RunCommand(VersionControlScope versionControlScope, Workspace workspace, String getting, String nonFatalError, String version, String fileSpec, GetOptions options, RecursionType recursion)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Func`9.EndInvoke(IAsyncResult result)
at Microsoft.TeamFoundation.Build.Workflow.Activities.TfGet.TfGetCore.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity`1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
The service account configured for the build service needs the rights. The TFS service and the build service may or may not be configured to run under the same account. Your personal account is not part of this equation.
MSDN outlines the permissions required for each service account here https://msdn.microsoft.com/en-us/library/ms253149(v=vs.120).aspx Look at the entry for TFSBuild
The setup is also outlined in https://msdn.microsoft.com/en-gb/library/ms181712(v=vs.120).aspx and explains how to pick what type of account you should choose when setting up your build server

How to use cached ticket with KerberosRestTemplate?

I want to implement integration test for my spring security kerberos authentication.
There is KerberosRestTemplate (reference) for this purpose. KerberosRestTemplate has got a default constructor with description "Leave keyTabLocation and userPrincipal empty if you want to use cached ticket".
For research i wrote a trivial class:
public static void main(String[] args) {
KerberosRestTemplate krt = new KerberosRestTemplate();
String result = krt.getForObject("http://testserver.testad.local:8080/", String.class);
System.out.println(result);
}
When i run it, exception has thrown:
Exception in thread "main" org.springframework.web.client.RestClientException: Error running rest call; nested exception is java.lang.IllegalArgumentException: Null name not allowed
at org.springframework.security.kerberos.client.KerberosRestTemplate.doExecute(KerberosRestT
emplate.java:196)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:530)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:237)
at edu.mezlogo.Application.main(Application.java:9)
Caused by: java.lang.IllegalArgumentException: Null name not allowed
at sun.security.krb5.PrincipalName.<init>(Unknown Source)
at sun.security.krb5.PrincipalName.<init>(Unknown Source)
at javax.security.auth.kerberos.KerberosPrincipal.<init>(Unknown Source)
at javax.security.auth.kerberos.KerberosPrincipal.<init>(Unknown Source)
at org.springframework.security.kerberos.client.KerberosRestTemplate.doExecute(KerberosRestT
emplate.java:182)
... 3 more
My klist contain correct cached ticket, for my service.
#2> Client: deniz # TESTAD.LOCAL
Server: HTTP/testserver.testad.local # TESTAD.LOCAL
KerbTicket Encryption Type: RSADSI RC4-HMAC(NT)
Ticket Flags 0x40a10000 -> forwardable renewable pre_authent name_canonicalize
Start Time: 2/5/2016 6:17:39 (local)
End Time: 2/5/2016 16:16:32 (local)
Renew Time: 2/12/2016 6:16:32 (local)
Session Key Type: RSADSI RC4-HMAC(NT)
And my browser (firefox) has successful authenticated with kerberos sso.
I use Windows server 2012. And Windows 7 as client.
How to use cached ticket? (And does ktpass can generate client keytab?)
P.s. sorry for my English.
You are checking the Windows credentials cache - while Java is maintaining it's separate. In order to view the Java's credentials cache you should execute the klist command from your JRE/bin folder

Issue with Sitefinity 7.3 on azure webrole

I am migrating a sitefinity application onto an azure web role. The database is already migrated to sql azure. And with that connectionstring in DataConfig.config the application runs fine in my local machine. But once I add a cloud project and (made the necessary changes mentioned in telerik documentation - azure assemblies redirection,dataconfig change,app.dll.config file , internal endpoint, local storage) and set this application as a web role it does not work. When I run the cloud project in azure emulator locally or deploy as a cloud service I get the following error.
Enum conversion failed as the property/field is not nullable and no
value has been read from the database. Description: An unhandled
exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and
where it originated in the code.
Exception Details: System.InvalidOperationException: Enum conversion
failed as the property/field is not nullable and no value has been
read from the database.
Source Error: An unhandled exception was generated during the
execution of the current web request. Information regarding the origin
and location of the exception can be identified using the exception
stack trace below.
Stack Trace:
[InvalidOperationException: Enum conversion failed as the
property/field is not nullable and no value has been read from the
database.] OpenAccessRuntime.Data.EnumConverter.Read(DataHolder&
holder) +470
OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(ResultSet
rs, FetchGroupField[] fetchGroups, Int32 firstCol) +346
[DataStoreException: Error reading field
Telerik.Sitefinity.Forms.Model.FormDraft.k__BackingField
from ResultSet: System.InvalidOperationException: Enum conversion
failed as the property/field is not nullable and no value has been
read from the database. at
OpenAccessRuntime.Data.EnumConverter.Read(DataHolder& holder) at
OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(ResultSet
rs, FetchGroupField[] fetchGroups, Int32 firstCol)
System.InvalidOperationException: Enum conversion failed as the
property/field is not nullable and no value has been read from the
database. at OpenAccessRuntime.Data.EnumConverter.Read(DataHolder&
holder) at
OpenAccessRuntime.Relational.RelationalGenericState.copyPass1Fields(ResultSet
rs, FetchGroupField[] fetchGroups, Int32 firstCol)]
DynamicModule.ns.Wrapped_OpenAccessFormsProvider_f4f053b2c49247a8908c30d75bf02970.GetForm(Guid formId) +413
Telerik.Sitefinity.Modules.Forms.Web.UI.FormsControl.get_FormData()
+759 Telerik.Sitefinity.Modules.Forms.Web.UI.FormsControl.ProcessFormInitialization()
+21 Telerik.Sitefinity.Modules.Forms.Web.UI.FormsControl.InitializeControls(GenericContainer
container) +55
Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +88
System.Web.UI.Control.EnsureChildControls() +189
System.Web.UI.Control.PreRenderRecursiveInternal() +60
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+4297
I checked the telerik forum as well and found only 2 posts with this error but the solutions suggested did not work.
any solutions to resolve this issue will be helpful.
After adding assembly redirect for all the telerik dlls and other third party DLLs in web. Config and app.DLL.config I also ran 3 update scripts mentioned in sitefinity forum in the db. This fixed the issue and site came up.

Error in TFS Release Management Server after Upgrading to Update 3

Some weird and unexplained error logged in InRelease aka (Release Management) server event log after upgrading Release Management Update 1 to update 3.
Below error started getting logged only after upgrading to Update 3.
Even though we started the Inrelease Server and all agents but no luck.
Any immediate help would be much helpful.
Timestamp: 12/15/2014 10:22:18 AM
Message: 'LambdaValue>' is not of type 'ServerActivity'. When loading this instance you must ensure that the activity with name 'LambdaValue>' implements 'ServerActivity'.: \r\n\r\n at
System.Activities.ActivityInstance.System.Activities.Runtime.ActivityInstanceMap.IActivityReference.Load(Activity activity, ActivityInstanceMap instanceMap)
at System.Activities.Runtime.ActivityInstanceMap.InstanceList.Load(Activity activity, ActivityInstanceMap instanceMap)
at System.Activities.Runtime.ActivityInstanceMap.LoadActivityTree(Activity rootActivity, ActivityInstance rootInstance, List1 secondaryRootInstances, ActivityExecutor executor)
at System.Activities.Runtime.ActivityExecutor.OnDeserialized(Activity workflow, WorkflowInstance workflowInstance)
at System.Activities.Hosting.WorkflowInstance.InitializeCore(IDictionary2 workflowArgumentValues, IList1 workflowExecutionProperties)
at System.Activities.Hosting.WorkflowInstance.Initialize(Object deserializedRuntimeState, DynamicUpdateMap updateMap)
at System.Activities.WorkflowApplication.LoadCore(DynamicUpdateMap updateMap, TimeoutHelper timeoutHelper, Boolean loadAny, IDictionary2 values)
at System.Activities.WorkflowApplication.Load(Guid instanceId, TimeSpan timeout)
at System.Activities.WorkflowApplication.Load(Guid instanceId)
at Microsoft.TeamFoundation.Release.ServiceProcessor.Processor.WorkflowInstance.WorkflowInstanceCacheSingleton.<.cctor>b__1(WorkflowApplication app, Guid id)
at
Microsoft.TeamFoundation.Release.ServiceProcessor.Processor.WorkflowInstance.WorkflowInstanceCache.CreateApplicationInCache(CreateParameters createParameters, Guid id)
at Microsoft.TeamFoundation.Release.ServiceProcessor.Processor.WorkflowInstance.WorkflowInstanceCache.GetInstance(CreateParameters createParameters, Guid id)
at Microsoft.TeamFoundation.Release.ServiceProcessor.Processor.WorkflowInstance.CachedWorkflowInstanceLoader.GetInstance(DeploymentLog log, CreateParameters createParams)
at Microsoft.TeamFoundation.Release.ServiceProcessor.Processor.DeploymentControllerServiceProcessor.ContinueDeploymentWithFinalComponentState(DeploymentLog log)
at Microsoft.TeamFoundation.Release.ServiceProcessor.Processor.DeploymentControllerServiceProcessor.ContinueDeployment(String log)
Category: General
Priority: -1
EventId: 0
Severity: Error
Title:
Machine: **********
Application Domain: /LM/W3SVC/1/ROOT-1-130630102320068767
Process Id: 6628
Process Name: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Win32 Thread Id: 1344
Thread Name:
Extended Properties:
=============== Update (Solution) ==================
Issue/Error resolved after upgrading RM to Release Management 2015.

TFS 2012 update failed: Sync error for identity ... No mapping between account names and security IDs was done

Upgrading our TFS 2010 to TFS 2012, I get this error on one of the collections:
[Error] Sync error for identity: System.Security.Principal.WindowsIdentity, S-1-5-21-xxxxxxx - No mapping between account names and security IDs was done
The upgrade fails. Re-running the servicing job from the admin console causes the same error.
I looked in the database, and there is an entry in ADObjects where both SamAccountName and ObjectSID have that SID. It looks like an account from an old domain. fDeleted is 1.
How do I clean this up so I can upgrade?
Added information (from the SQL trace):
declare #p3 dbo.typ_ServicingStepDetail2
insert into #p3 values(1,'ToDev11Beta1FinalConfiguration','BuildToDev11Beta1FinalConfiguration','Grant Administer Build Permissions to Project Administrators','2013-04-12 14:17:55.617',NULL,0,N'Microsoft.TeamFoundation.Framework.Server.IdentitySyncException: Sync error for identity: System.Security.Principal.WindowsIdentity, S-1-5-21-xxxxx - No mapping between account names and security IDs was done
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationIdentityService.TryReadIdentityFromSourceInternal(TeamFoundationRequestContext requestContext, IdentityDescriptor descriptor, Boolean withDirectMembership, TeamFoundationIdentity& identity)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationIdentityService.AddMemberToApplicationGroup(TeamFoundationRequestContext requestContext, IdentityDescriptor groupDescriptor, IdentityDescriptor memberDescriptor, Boolean errorOnDuplicate, Boolean logSync, Boolean ensureKnown)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationIdentityService.EnsureIsMember(TeamFoundationRequestContext requestContext, IdentityDescriptor groupDescriptor, IdentityDescriptor descriptor)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSecurityNamespace.EnsureIdentityIsKnownInternal(TeamFoundationRequestContext requestContext, IdentityDescriptor identity, Boolean throwOnFailure)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSecurityNamespace.SetAccessControlEntries(TeamFoundationRequestContext requestContext, String token, IEnumerable1 accessControlEntries, Boolean merge, Boolean throwOnInvalidIdentity)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSecurityNamespace.SetAccessControlEntries(TeamFoundationRequestContext requestContext, String token, IEnumerable`1 accessControlEntries, Boolean merge)
at Microsoft.TeamFoundation.Server.Servicing.TFCollection.BuildStepPerformer.GrantAdministerPermissionsToProjectAdmins(TeamFoundationRequestContext requestContext, ServicingContext servicingContext)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation, String stepType, String stepData, ServicingContext servicingContext)
at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation, Int32 stepNumber, Int32 totalSteps)')
insert into #p3 values(2,'ToDev11Beta1FinalConfiguration','BuildToDev11Beta1FinalConfiguration','Grant Administer Build Permissions to Project Administrators','2013-04-12 14:17:55.617',5,NULL,NULL)
exec prc_AddServicingStepDetails #jobId='xxx',#queueTime='2013-04-12 14:17:50.840',#stepDetails=#p3,#hostId='xxx',#completedStepCount=419`
So it looks like I might have a project administrator who doesn't exist anymore. Any thoughts on how to remove that membership manually?
Okay, I got the upgrade to complete by doing the following.
THIS IS EXTREMELY FILTHY AND DANGEROUS. DO NOT TRY WITHOUT A GOOD BACKUP. YOUR WARRANTY HAS ALREADY EXPIRED. THIS VERY WELL MIGHT NOT WORK FOR YOU. IT MIGHT BREAK YOUR ENTIRE TFS SETUP AND GIVE DISEASES TO YOUR PUPPY.
Anyway.
Open SQL Server Management Studio. Punch up a new query window for the project collection that won't upgrade (usually Tfs_NameOfCollectionThatWontUpgrade). Execute this command:
Select TeamFoundationId From ADObjects
Where ObjectSID='S-1-xxxx'
(Obviously, insert the proper SID from your error message.)
This will give you the internal GUID for the identity that is causing the problem. The step my upgrade failed on was giving Build Administrator rights to Project Administrators, and whoop-dee-doo, I can do that myself.
Now nuke the Active Directory link from orbit (you do have that GUID copied, right?)
Delete From ADObjects
Where ObjectSID='S-1-xxxxx'
(Obviously, insert the proper SID from your error message. Also note that this step might not be strictly necessary, but it is one I performed and I'll be damned if I roll back to see if you can do without it.)
Ah, gotta love chain-saw surgery. More to do. Let's remove this identity from all groups. NOTE: if you do this to your only administrator account, you're likely to shut yourself out of the collection and/or the projects within. You have been warned.
Switch to the configuration database (usually Tfs_Configuration) and execute
Delete From tbl_GroupMembership
Where MemberId='The GUID you remembered'
At this point, the user is no longer a member of anything and the upgrade should complete. Everything should be there: builds, work items and source.
I had a very similar issue (almost identical) when my TFS Server was using TFS 2012 Update 1. I also came up with this hack in order to resolve it. When I had a TFS Server running TFS 2012 RTM or TFS 2012 Update 2 I didn't encounter the issue.
Here a link to that thread.
http://social.msdn.microsoft.com/Forums/en-US/tfsadmin/thread/238cad96-8e74-4f14-869a-3bb5e0629fd7

Resources