Error when trying to delete build definitions in TFS web interface - tfs

I'm getting a server error when I try to delete build definitions from a project on the Team Foundation Server 2015 web interface.
The error message that pops up is:
Error(s):
500: 500: error
TFS.WebApi.Exception: 500: error
at k (http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/corejs?v=ITI0eYHCCehqqjk6JTyPaR5R793ETLoY2_Lqz191Pyo1:64:375)
at http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/corejs?v=ITI0eYHCCehqqjk6JTyPaR5R793ETLoY2_Lqz191Pyo1:64:2955
at d (http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/corejs?v=ITI0eYHCCehqqjk6JTyPaR5R793ETLoY2_Lqz191Pyo1:64:635)
at http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/corejs?v=ITI0eYHCCehqqjk6JTyPaR5R793ETLoY2_Lqz191Pyo1:64:2888
at l (http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/q.js:27:8122)
at http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/q.js:27:8348
at t.when (http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/q.js:27:3780)
at t.u.promiseDispatch (http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/q.js:27:2824)
at http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/q.js:27:1649
at MessagePort.t (http://timeweb:8080/tfs/_static/tfs/Dev14.M102/_scripts/TFS/min/q.js:27:5773)
I also get a similar error when I try to save changes to a build definition.
I'm doing everything with an administrator account on the server.
It's acting like the user has INSERT permission in the database but not DELETE or UPDATE, but I'm not sure if this is the cause and the permissions in the database seem OK (why would they be configured incorrectly after a fresh install?).
I'm using a local SQL Server Express instance. I'm using Windows Authentication for TFS, and I'm able to login with Windows Authentication and manually delete them from the database using SQL Server Management Studio.
I just did another uninstall/fresh install and I'm still seeing this error. Any insight into the cause or solution would be much appreciated.
UPDATE
A SQL Server trace isn't showing any relevant commands being received when I attempt the delete/edit, so it seems like the error is happening before it even reaches out to the database.

First, please make sure you have enough permission. Such as edit build definition . You can use tf permission command to list the realted permission info.
For example: tf permission /user:userID /collection:http://xxx:8080/tfs/defaultcollection
which will return the modified permission for that user under the collection path. Also work with server path.
Also add your user in Team Project Administrator Group and Build Administrator Group.
Try to clean browser cache and close the browser then try it again.

Related

Project administrator cannot run workitem query

TFS team project administrator not able to run work item query, when tried through the web browser, page shows the error:
TF401349: An unexpected error has occurred, please verify your request and try again
When tried using Visual Studio 2015, the below error:
TF201072: A user or group could not be found. Verify that the users and groups used in your work item type definition have been added to Team Foundation Server.
Event log in the application server shows the below event error:
System.Data.SqlClient.SqlException (0x80131904): error="600047";%:RebuildCallersViews: Connecting Domain User could not be alidated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
I am using TFS 2015 update 2.
Note: Same project other users can view normal.
Seems there is something wrong with that user account, although this user is already part of a TFS group, but he still can't access TFS work items. Maybe there is some snag in the TFS identity synch service, and it's usually related to a specific collection.
Attaching and re-attaching the collection will force a refresh of the identity synch data, and will usually resolve this kind issue.
If above is sitll not work.There are also many other articles on the web which help determine the root cause:
You can check whether built-in records were missing in table
TFSIntegration..tblsubscription. Refer to the link below for more
details: A case study on TFS identity replication
Another option is check if the SID of service account is correct.
Replace SID if not, you can refer to this thread for the steps.
Also take a look at the solution of this similar
error:Unable to shelve changes in VS2012 for TFS2010

TFS 2013 Need to remove collection that is stuck being serviced

Currently running TFS 2013 Update 4 (12.0.31101.0 (Tfs2013.Update4))
We're trying to upgrade to TFS 2015 and it fails with the error
[Error #18:03:16.990] TF255430: The database Tfs_DefaultCollection was partially upgraded during a failed upgrade. You must restore your data from a backup to its original state to continue.
The above database is for the Default Team Project Collection and we don't use it. That collection is offline, and has been for many months. There is nothing in that collection and we have no need to keep it. We just need to remove it as it's blocking our upgrade.
Looking in the Project collection status, I can see that there is an ApplyPatch job that failed. Have tried re-running the job but it continues to return the following failure messages.
[18:45:10.700] Database: Tfs_DefaultCollection, Sql Instance: MDCPTFS02
[18:45:10.967] [Error] TF400744: An error occurred while executing the following script: CollectionFrameworkDev10ToDev11CTP1.sql. Failed batch starts on the line 336. Statement line: 8. Script line: 343. Error: 1750 Could not create constraint. See previous errors.
[18:45:10.990] Microsoft.TeamFoundation.Framework.Server.TeamFoundationServicingException: TF400744: An error occurred while executing the following script: CollectionFrameworkDev10ToDev11CTP1.sql. Failed batch starts on the line 336. Statement line: 8. Script line: 343. Error: 1750 Could not create constraint. See previous errors.
Hope someone can provide some ideas on working around this issue.
Cheers
Phil
If you have the backup database, the simplest and safe way is following the instructions above as “You must restore your data from a backup to its original state to continue”. Restored the collection, re-ran the update and all should works well. Finally, you just need to delete the redundancy collection.
You can also choose to Detach the Collection first just as comment suggested and try the update again.
Update
If you really don't need that project collection. You can try to delete it through command line.
On TFS server, open Administrative Command Prompt and change to TFS Tools Directory.
%programfiles%\microsoft team foundation server[versionnumber]\tools
Type the command:
TFSConfig Collection /delete /collectionName:[COLLECTION NAME]
Details please refer this blog: how to delete a Team Project Collection
Then delete the collection database Open SQL Server Management Studio, connect to the instance of the SQL Server Database Engine that hosts the collection database, and expand the instance.
Highlight the name of the collection database (by default, TFS_CollectionName), and then delete the database. and delete the SharePoint site collection that supported the deleted collection.(If you have).

TFS - Build Service Starts and then throws a HTTP code 500: System.ServiceModel.ServiceActivationException

I have been working on restoring a build server (tfs 2012) from a backup and all manner of things got messed up (the tfsservice account password had been altered and I had to go to every service and app pool on the box and update it). Once sql was backup I was able to update the password via the TFS admin console app. Then I was able to re-register the build service and add a controller and a build agent. It starts briefly and shows green for a few seconds before stopping and a "details ..." button appears next to the Build Service. If I click the details button I see the following
"Please contact your administrator. There was an error contacting the server. Technical information (for administrator): HTTP code 500: System.ServiceModel.ServiceActivationException"
I have checked the http bindings in iis for the tfs site and there is only the one "*:8080"
I tried hardcoding it to the ip on the box and I still get the same error. If I go to one of the client machines and try and queue a build it shows the build server as being offline.
I have also checked for multiple host headers and the memory utilization which are the most common responses to this particular issue. Neither of them seem to be the cause or the solution.
Any ideas or suggestions are welcome I have run out of ideas to try here. Thanks in advance for any help you have to offer.
EDIT -- also found this in the log: Build machine MyMachine lost connectivity to message queue tfsmq://buildservicehost-25/.

Error TF218027 when creating a Team Project in TFS 2010

Consider the scenario of a user creating a new Team Project. The user is a developer who wants to create and manage their Team Project.
Why can't this user create a new Team Project, including the Reporting Services components?
What can be done to resolve this error?
The exception is
TF218027: the following reporting folder could not be created on the server running SQL Reporting Services.
SQL Reporting services is running under an Active Directory service account created expressly for this purpose.
The developer attempting this action is a member of a TFS group with the following permissions.
The workaround way that I implemented was to ensure the developer was in a group that had 'Content Manager' permissions in the SQL Reporting Services.
I simply added the appropriate AD group in the textbox, and the operation worked perfectly.
First I visited the SSRS page at http://myServer/TFS/Reports/MyCollection
Enter the "New Role Assignment" screen.
I actually blogged about this not too long ago. You usually see this error if Reporting Services gets set up with something other than the NETWORK SERVICE account.
FTA:
I was playing around with my test
instance of Team Foundation Server
today, trying to create a new project,
when I got error TF218027 when it
tried to create the Reporting Services
folder for the project. The strange
thing was, this was not my first
project created on this server.
I searched the Internet for anything
similar, and found a post that said
Reporting Services should be run with
the NETWORK SERVICE account. Since
this was a hastily put together
server, I was running it with the
Administrator account, so I tried
switching it over.
No dice. I got the same TF218027
error, but this time it was due to it
not being able to decrypt the
symmetric keys. Apparently, it's a
bad thing to change the account on the
Reporting Services service.
I hastily changed the account back to
Administrator and resarted the
service. Interestingly enough, this
seems to have fixed the problem.
I just run throught the same issue. I granted the user rights in SharePoint, TFS, and Report Server. And still I was getting the same error message. Then I realized something. I added that user to the Report Server's local administrator's group. It worked! Hopefully this help you out.

Can't create new project in Team Foundation Server

We're switching over to Team Foundation for our version control, and I have to learn it and set it up. Our IT guy did the installation of the both the data tier and the app tier, and he is of course convinced that it's right. However when i log in as tfssetup and try to create a new project, i get the error:
Error
Insufficient permissions to create a new SQL Server Reporting Services at tsttfsapp1.
Explanation
The permissions granted your user name and ID on the SQL Server Reporting Services at tsttfsapp1 do not allow you create a new project. You must be granted specific permission by the server administrator.
User Action
Contact the Administrator for the SQL Server Reporting Services at tsttfsapp1 and ask that the permission "Content Manager" be added to your user account
So i tried to log in to http://servername/Reports_TFS it asks for the credentials but doesn't accept them. Even stranger when i try to access it from a computer and user that aren't on the same domain as the app tier server, it doesn't ask for credentials and lets me right in. As far as i know the default name of the site should be Reports, not Reports_TFS is it possible that his renaming of that could be causing the problem?
tfssetup is definitely a "Content Manager" as far as i can tell, so i don't understand why we are getting this problem. Also any recommendation for good websites or books that can take a complete beginner and help me become an expert in 3 weeks (what's left of the 6 week time frame allowed for me to learn) would be appreciated.
Thanks
I'm not sure this will help, but we had this error at my place of work on our 2005 TFS server. We opened a ticket with Microsoft and sent them our TFS database. They were able to replicate the issue with the copy of the database. Somehow the TFS database had gotten into an invalid state, but they weren't able to determine how this happened or how to fix it. Unfortunately, this error kept us from being able to upgrade the server to TFS 2008 too. We ended up getting latest of all the code and adding it to source control on a new install of TFS. What a pain.
OK so it turns out it was only a problem because I was using a 2005 client with a 2008 server. A 2008 client has no problem creating a project on the 2008 server, but the 2005 client is not able to create a project on a 2008 server.

Resources