Unable to create the Team Project Query

by Xavier Dilip Kumar 14. August 2013 18:17

Soultion

You need to set “Edit project-level information" permission to allow to create\edit any work item query

Tags: ,

TFS | TFS 2010 | TFS 2012 | Visual Studio 2012

TF221122: An error occurred running job Full Analysis Database Sync for team project collection. The trust relationship between the primary domain and the trusted domain failed

by Xavier Dilip Kumar 8. August 2013 11:40

Errors:

Microsoft.TeamFoundation.Server.WarehouseException: TF221122: An error occurred running job Full Analysis Database Sync for team project collection or Team Foundation server TEAM FOUNDATION.
Microsoft.TeamFoundation.Server.WarehouseException: Failed to Process Analysis Database 'Tfs_Analysis'.
System.SystemException: The trust relationship between the primary domain and the trusted domain failed.

Explanation

Analysis Database Sync failed all of a sudden stating "The trust relationship between the primary domain and the trusted domain failed".  The domain trust was fine.  

Soultion

1. open Microsoft SQL Server Management Studio

2. Connect to TFS Analysis Service

3. Expand Analysis Service Server name --> Database --> Tfs_Analysis --> Roles 

4. Double click on TfsWarehouseAdministrator --> Membership

5. Remove the invalid Ids (In my case I removed the SID ids displayed in the users list)

6. Repeat step 4 and 5 for TfsWarehouseDataReaders

7. open Microsoft SQL Server Management Studio

8. Connect to TFS Warehouse database

9. Expand Tfs_Warehouse database --> Security --> Roles --> Database Roles 

10. Double click on TfsWarehouseAdministrator

11. Remove the invalid Ids (In my case I removed the non domain ID which was not related to TFS.)

12. Start the sync again. Open http://<Server Name>:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx

13. Click on ProcessAnalysisDatabase link

14. Invoke Full sync

15. Full sync should succeed :)

Tags: ,

TFS | TFS 2010 | TFS 2012

How to add users to Team Foundation Service Accounts group?

by Xavier Dilip Kumar 8. August 2013 11:19

Solution:

Execute the following command:

TFSSecurity.exe /g+ "Team Foundation Service Accounts" n:"[Domain]\[User Id]" /server:http://tfs:8080/tfs

Tags: , ,

TFS | TFS 2010 | TFS 2012

TF30171: The Microsoft.ProjectCreationWizard.Portal plug-in used to create the new team project could not be initialized and returned the following error: TF30270: Project site folder “ProjectName” already exists.User Action

by Xavier Dilip Kumar 4. August 2013 12:16

Explanation:

I was not able to create a new team project due to the following exception even though the site with the new team project name does not exist in share point.

Module: Initializer
Event Description: TF30207: Initialization for plugin “Microsoft.ProjectCreationWizard.Portal” failed
Exception Type: Microsoft.TeamFoundation.Client.PcwException
Exception Message: TF30270: Project site folder “ProjectName” already exists
Stack Trace:
at Microsoft.VisualStudio.TeamFoundation.WssSiteCreator.Initialize(ProjectCreationContext context)
at Microsoft.VisualStudio.TeamFoundation.EngineStarter.InitializePlugins(MsfTemplate template, PcwPluginCollection pluginCollection)

Solution:

Exception message misguided me. The real problem was with the Share Point connectivity. I was not able to connect to Share Point server using the server name but IP worked. I changed the Share Point sever name to IP in TFS administration console which fixed the issue.

Tags: ,

TFS | TFS 2010 | TFS 2012

TF271001: The server response was: 4.4.1 Connection timed out type SmtpException. TFS Email Notifications Delayed or Not Sent

by Xavier Dilip Kumar 17. July 2013 19:53

Detailed Message:

TF271001: An error occurred while attempting to send an e-mail notification to the following address: email id. Further e-mail notification errors that occur within the next five minutes might not be logged. Verify that the e-mail notification settings are correct in the Team Foundation Administration Console.
Exception Message: Service not available, closing transmission channel. The server response was: 4.4.1 Connection timed out (type SmtpException)

Error :

TFS Email Notifications Delayed or Not Sent

Explanation:

I started experiencing problems with TFS alert notification mails. TFS Email Notifications were Delayed or Not received. The TFS alert notification was working fine for the past 2 years.

Solution:

Following are the investigation done to fix the notification problem

1. Verified the SMTP server and found out no problems with it. (Anonymous sender was enabled in Exchange for tfs@domain.com)
2. Verified whether "Visual Studio Team Foundation Background Job Agent" service is running in TFS App tier. Service was running fine. (Restarted the service too)


3. I ran the follwoing query to find tfs job failures in the tbl_JobHistory table in the Tfs_Configuration database

SELECT TOP 10 DATEADD(hour, -7, StartTime) as StartTimePDT, Result, ResultMessage
FROM [Tfs_Configuration].[dbo].[tbl_JobHistory] WHERE JobId = 'A4804DCF-4BB6-4109-B61C-E59C2E8A9FF7' AND Result <> 0
ORDER BY StartTime DESC

Note: The JobId GUID for the “Team Foundation Server Event Processing” job with the namespace: “Microsoft.TeamFoundation.JobService.Extensions.Core.NotificationJobExtension” is 'A4804DCF-4BB6-4109-B61C-E59C2E8A9FF7'

Query result:

"There were errors or warnings during notification delivery.    35573/35598 emails delivered.  0/0 soap notifications delivered.   25 errors.  0 warnings.    Set /Service/Integration/Settings/NotificationJobLogLevel in the TF registry to 2 to see errors and warnings"   

4. Queried [dbo].[tbl_EventNotification] table in the [Tfs_DefaultCollection] database to see for failures.

SELECT * FROM [Tfs_DefaultCollection].[dbo].[tbl_EventNotification]

Found many records with failed status.

5. Deleted all records with failed status

Delete FROM [Tfs_DefaultCollection].[dbo].[tbl_EventNotification] where [status] = 'failed'

Note : I dint see any harm in deleting all the records from FROM [Tfs_DefaultCollection].[dbo].[tbl_EventNotification]

Delete FROM [Tfs_DefaultCollection].[dbo].[tbl_EventNotification]

6. Queried [dbo].[tbl_EventNotification] table in the [Tfs_DefaultCollection] database to see the notification event backlogs count.

SELECT * FROM [Tfs_DefaultCollection].[dbo].[tbl_ClientEvent]

Found around 1000 pending events that need to be processed.

7. Deleted all pending events backlogs

Delete FROM [Tfs_DefaultCollection].[dbo].[tbl_ClientEvent] 

Verified the fix by trigging the new alerts, All the alerts got processed and also received the notification mails.

link to turn on verbose log

link to Decrease or Increase notification delay settings in TFS

 

Tags: ,

TFS | TFS 2010 | TFS 2012

Decrease or Increase notification delay settings in TFS

by Xavier Dilip Kumar 16. July 2013 21:39

Explanation:

By default notification delay is set to 120 seconds. The notifications are processed in batchs for every 2 minutes. The notification delay can be set in the TF registry
Note: The TFS registry mentioned is not the Windows Registry on the TFS server.

Solution:

The registry value can be changed using the PowerShell script or using the TfsReg tool

Following is the command to set the notification delay to 1 minute using the tool:

tfsreg.exe /server:http://tfs:8080/tfs /path:/Service/Integration/Settings/NotificationJobDelay /value:60

Note: Restart the TFS IIS app pool for the change to take effect.

Tags: ,

TFS | TFS 2010 | TFS 2012

TFS event 7005 and 7006 warnings

by Xavier Dilip Kumar 4. July 2013 10:47

Explanation:

The default threshold is set to 30 seconds, The warning occurs when the threshold exceeds.

Log Name:      Application
Source:        TFS Services
Date:          1/27/2013 8:53:37 AM
Event ID:      7006
Task Category: None
Level:         Warning
Detailed Message: There are no active requests for service host DefaultCollection that exceed the warning threshold of 30.
 
Log Name:      Application
Source:        TFS Services
Date:          1/27/2013 8:52:22 AM
Event ID:      7005
Task Category: None
Level:         Warning
Detailed Message: A request for service host DefaultCollection has been executing for 37 seconds, exceeding the warning threshold of 30.

Solution:

Increase the threshold limit, if you experience performance issues due to these warnings. execute the following SQL statements

use [<Collection DB name>]

DECLARE @registryUpdates typ_KeyValuePairStringTableNullable
INSERT @registryUpdates ([Key], [Value])
SELECT '#\Configuration\ServiceHostMonitor\TotalExecutionElapsedThreshold\', '300'
 
EXEC prc_UpdateRegistry 1, 'Test', @registryUpdates, 1

Tags: ,

TFS | TFS 2010 | TFS 2012

Roll Back a checkin in TFS

by Xavier Dilip Kumar 26. June 2013 12:26

Solution

TFS rollback is a client side component which is available in TFS 2010 power tools install. http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f

1) Through UI

Right click on the source folder
Select View History menu
 

 Select rollback entire changeset menu 

 Check-in the pending rollback changes 

2) Through Command line :
 
tf rollback /changeset:changesetfrom~changesetto [itemspec] [/recursive]
[/lock:none|checkin|checkout] [/version:versionspec]
[/keepmergehistory] [/noprompt] [/login:username,[password]]

tf rollback /toversion:versionspec itemspec [/recursive]
[/lock:none|checkin|checkout] [/version:versionspec]
[/keepmergehistory] [/noprompt] [/login:username,[password]]

Note :If you are attempting to rollback changes for another user, make sure you get latest on the files you are attempting to rollback; otherwise you will see the error: "No changes to roll back."

 

Tags: ,

TFS | TFS 2010

TF900560: Could not start build: The file exists.

by Xavier Dilip Kumar 25. June 2013 14:43

Explanation:

TFS2012 server process the build request but the build controller fails.

Workaround:

Reimaged the build controller,Since the controller was not responding to any command and also TFS admin console crashed.

Tags: , ,

TFS | TFS 2010 | TFS 2012

TF215097: An error occurred while initializing a build for build definition <Build Definition Name> rootArgumentValues

by Xavier Dilip Kumar 25. June 2013 14:27

Error:

The values provided for the root activity's arguments did not satisfy the root activity's requirements: ''Build Parameter':
The following keys from the input dictionary do not map to arguments and must be removed: <Parameter Name>. 
Please note that argument names are case sensitive. Parameter name: rootArgumentValues

Explanation:

The error appears when the build parameter is removed from the template template and still avaiable in the build tables.

The table tbl_BuildDefinition contains all information for a build definition. ProcessParameters column will contains the build parameter details

Solution:

Refresh the build definition and save it. In the process tab, there is a Refresh button that will reload the build definition and the process template and synchronize them

 

Tags: , ,

TFS | TFS 2010 | TFS 2012

About the author

My name is Xavier Dilip Kumar Jayaraj and I am a Software Configuration Management Engineer with a background in application development, Build & packaging using Install Shield.

Profile in LinkedIn

  

Quotes I Like

"Failure will never overtake me if my determination to succeed is strong enough."  - Dr. APJ. Abdul Kalam

"Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it." - Bruce Lee

"Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important." - Bill Gates

"Innovation distinguishes between a leader and a follower." - Steve Jobs

Disclaimer

The information provided here is based on my expreriences, troubleshooting and online/offline findings. It can be used as is on your own risk without any warranties and I impose no rights.

Month List