TF221122: An error occurred running job Test Management Warehouse Sync, ResultFailureTypeName (type IndexOutOfRangeException) - tfs

We have upgraded out TFS server 2012 update 2 to TFS 2012 Update 4. After update we found below error in event viewer. Now we cannot create new team project or cannot delete existing project. Now all the deleted project state showing as 'Deleted(Pending)'
TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 4/6/2018 5:23:09 AM
Machine: TFS
Application Domain: TfsJobAgent.exe
Assembly: Microsoft.TeamFoundation.Framework.Server, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v4.0.30319
Service Host:
Process Details:
Process Name: TFSJobAgent
Process Id: 4660
Thread Id: 4348
Account name: DOMAIN\TFSService
Detailed Message: TF221122: An error occurred running job Test Management Warehouse Sync for team project collection or Team Foundation server Default Collection.
Exception Message: ResultFailureTypeName (type IndexOutOfRangeException)
Exception Stack Trace: at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
at System.Data.SqlClient.SqlDataReader.get_Item(String name)
at Microsoft.TeamFoundation.TestManagement.Warehouse.AdapterFormatHelper.FormatDimensionData(DimensionMember dm, Column col, SqlDataReader reader)
at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.CreateDimensionEntries(Mapping mapping, SqlDataReader reader)
at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.CallbackCreateFactAndDimensionEntries(Mapping mapping, SqlDataReader reader)
at Microsoft.TeamFoundation.TestManagement.Warehouse.WarehouseResultDatabase.QueryTestResults(SqlBinary watermark, Int32 limit, ProcessRowCallback resetCallback, ProcessMappingDataCallback dataCallback)
at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.QueryForResults(WarehouseResultDatabase wrd, SqlBinary waterMark, Int32 limit)
at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.ProcessIntegratedResults(WarehouseRowVersionQueryDelegate wqd, String highWaterMarkProperty, String processLimitProperty, Int32 defaultLimit)
at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.MakeDataChanges()
at Microsoft.TeamFoundation.Warehouse.WarehouseSyncJobExtension`1.MakeDataChanges(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, String& resultMessage)
at Microsoft.TeamFoundation.Warehouse.WarehouseSyncJobExtension`1.RunInternal(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage)
at Microsoft.TeamFoundation.Warehouse.WarehouseJobExtension.Run(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage)

Try to clean the cache files by following the steps below:
Clean the Cache folder on client computer. The folder path is: C:\Users\username\AppData\Local\Microsoft\Team Foundation\4.0\Cache.
Clean the Cache folder on Server machine. The folder path is: C:\ProgramData\Microsoft\Team Foundation\Web Access\Cache_v11.0
After cleaned, on Server machine, click Start and select Run… to open the dialog box, then input iisreset.exe and click OK, wait it run completely.

Related

Docker and Visual Studio for Mac: "PrepareForBuild": task failed... Permission denied

Visual Studio for Mac v17.0.6
MacOS Monterey v12.4
Docker v20.10.7
Docker Desktop v3.5.2
I am trying to run my project in a Docker container on my Mac using Visual Studio for Mac. At work, I run this on a Windows 10 machine without issue, and I did not set it up myself on my work machine so I am not sure if there are any steps or settings I'm missing.
What I have tried:
Adding /Users/Blake/Desktop/WOF/WOFFirebase to the list of file sharing paths as suggested by the troubleshooting link provided in the stack trace. I am not surprised this didn't work because the documentation says this is only for Visual Studio, not Visual Studio For Mac.
Restarting visual studio
Changing permissions to the WOF and WOFFirebase directories to be as permissive as possible.
I am wondering if I need to explicitly run this as the root user, but I am not sure how I would do that. What should I do next?
Please let me know if any more info is needed. Here is the full stack trace:
/Applications/Visual Studio.app/Contents/MonoBundle/AddIns/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(5,5): Error MSB4018: The "PrepareForBuild" task failed unexpectedly.
Microsoft.VisualStudio.Containers.Tools.Common.ContainerToolsException: An error occurred trying to start process '/Users/Blake/Desktop/WOF/WOFFirebase/docker' with working directory '/Users/Blake/Desktop/WOF/WOFFirebase'. Permission denied.
For more troubleshooting information, go to https://aka.ms/DockerToolsTroubleshooting
---> System.ComponentModel.Win32Exception (13): An error occurred trying to start process '/Users/Blake/Desktop/WOF/WOFFirebase/docker' with working directory '/Users/Blake/Desktop/WOF/WOFFirebase'. Permission denied
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.Docker.Utilities.CommandLineClient.<>c__DisplayClass0_0.<ExecuteAsync>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.Docker.DockerClient.ExecuteAsync(CommandLineParameters cmdParameters, IDockerLogger logger, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.Docker.DockerClient.ExecuteAsync(CommandLineParameters cmdParameters, IDockerLogger logger, CancellationToken cancellationToken)
at Microsoft.Docker.DockerClientExtensions.GetServerOperatingSystemAsync(IDockerClient client, IDockerLogger logger, CancellationToken cancellationToken)
at Microsoft.Docker.Prerequisites.DockerTargetOSCheckPrerequisite.EvaluateAsync(CancellationToken cancellationToken)
at Microsoft.Docker.Prerequisites.DockerCompositePrerequisite.EvaluateAsync(CancellationToken cancellationToken)
at Microsoft.Docker.BuildTasks.DockerBuildTask.EvaluateBuildPrerequisitesAsync(Exception ex, DockerBuildTaskContext context)
at Microsoft.Docker.BuildTasks.DockerBuildTask.ExecuteAsync(DockerBuildTaskContext context)
at Microsoft.Docker.BuildTasks.DockerBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
Error code: DT1003
Severity: Error
Command line: docker version --format {{.Server.Os}}
(MSB4018) (docker-compose)

IIS website : error trying to access site in browser (Kestrel problem)

I created a site in ASP.NET Core with VisualStudio and then copied the files to the server and linked IIS (8.5) to it.
I configured a binding with localhost:443.
However, when I browse to https://localhost:443 I obtain an error:
An error occurred while starting the application with the following message:
.NET Core 4.6.28008.01 X64 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.1.1-rtm-30846 | Microsoft Windows 6.3.9600 | Need help?
When I access the site via dotnet .\MVF2.dll, I obtain the following critical error:
crit: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass22_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
What's happening with Kestrel?
To see my Program.cs, Startup.cs and web.config see question https://stackoverflow.com/questions/59986062/website-deployment-via-iis-cant-access-site
I solved the problem. It was a problem with the app and connection strings.
I inserted in the web.config file in the server the option stdoutLogEnabled="true" and then saw the error in the log files.
This option is in the line of the file that says:
<aspNetCore processPath=".\myapp.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />

Connecting TeamCity to Visual Studio Online

I'm having trouble connecting TeamCity server (TeamCity Enterprise 8.0.6 (build 27767)) to Viusal Studio Online. I have searched and read many articals with the following being helpful : -
Connecting TeamCity to TFS
Connecting TFS to TeamCity
Unfortunately these did not solve the current issue.
I can successfully connect to (https://bobtbuilder.visualstudio.com) via VS2013 as well as via web browser using the bob.t.builder#live.co.uk credentials. I have set up the Alternative authentication Credentials and try all combinations, but from the error log below the issue does not appear to be authentication based.
Here is the current error message : -
TFS failed. ExitCode: 111, command: "D:\Program Files (x86)\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe" "##D:\Program Files (x86)\TeamCity\temp\TC-TFS-23-1111_263\command.params", in file: {https://bobtbuilder.visualstudio.com/DefaultCollection, /user:***** /password:***** /hash:S, /noProxy, D:\Program Files (x86)\TeamCity\temp\TC-TFS-23-1111_262.result, ConnectionTest, $/Builder}, completed in: 63 second(s)
stdout: TFS Native Verifier v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
Running under .NET Framework 4.0.30319.18408
INFO -
INFO - Use Team Explorer 2013
INFO -
TFS Native Accessor v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
INFO - Connecting to server https://bobtbuilder.visualstudio.com/DefaultCollection
INFO - WebProxy is disabled
Connection test:
Server='https://bobtbuilder.visualstudio.com/DefaultCollection'
Username='##LIVE##bob.t.builder#live.co.uk'
Root='$/Builder'
ERROR - TF400324: Team Foundation services are not available from server https://bobtbuilder.visualstudio.com/DefaultCollection.
Technical information (for administrator):
Unable to connect to the remote server
System.Exception: TF400324: Team Foundation services are not available from server https://bobtbuilder.visualstudio.com/DefaultCollection.
Technical information (for administrator):
Unable to connect to the remote server ---> Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException: TF400324: Team Foundation services are not available from server https://bobtbuilder.visualstudio.com/DefaultCollection.
Technical information (for administrator):
Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 65.52.8.37:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)
--- End of inner exception stack trace ---
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.Framework.Client.Registration.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.RegistrationProxy.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.RefreshMemoryCache()
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.RefreshCachesIfNeeded(Boolean direct)
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.FindServiceLocation(String serviceType, String toolId)
at Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.LocationForCurrentConnection(String serviceType, Guid serviceIdentifier)
at Microsoft.TeamFoundation.Client.TfsConnection.EnsureProviderConnected()
at Microsoft.TeamFoundation.Client.TfsConnection.Disconnect()
at JetBrains.TeamCity.Tfs.TfsLogin.TFSDispose(TfsTeamProjectCollection t) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\TfsLogin_VS12.cs:line 17
at JetBrains.TeamCity.Tfs.TfsLoginBase`1.DoWithAuthenticatedConnection(String server, String username, String password, JBAction`1 action) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\TfsLogin.cs:line 48
at JetBrains.TeamCity.Tfs.Command.Do() in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Command.cs:line 27
at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:line 134
--- End of inner exception stack trace ---
at JetBrains.TeamCity.Tfs.Program.Main(String[] args) in c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:line 438
Any help appreciated
I had almost exactly this problem and it was due to the companies proxy farking it up. You fix it by adding a file called internal.properties in your teamcity\data\config
with
teamcity.tfs.useSystemProxy=true
Obviously.

Cannot download TFS 2013 build process template, and build fails to initialize

I have recently installed TFS 2013 on a single server (10 GB, 8 core XEON server). The installation also includes VS 2013 (pro). I tried to create a build definition and run the build, but the build immediately fails (see log below).
I tried to download the template (TfvcTemplate.12.xaml), but after what I think is a 90 second timeout I get a "One or more errors have occurred" message. When I open my local folder, the file has a size of 0 bytes.
Any idea what might be the cause?
Update
The downloading issue might be limited to the Visual Studio (2013 pro) instance that was installed on the TFS server. Downloading it on a different machine worked.
Build error log:
TF215097: An error occurred while initializing a build for build definition \TeamProject\Continuous-Build:
Exception Message: One or more errors occurred. (type AggregateException)
Exception Stack Trace: at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.TeamFoundation.Build.Client.FileContainerHelper.GetFile(TfsTeamProjectCollection projectCollection, String itemPath, Stream outputStream)
at Microsoft.TeamFoundation.Build.Client.FileContainerHelper.GetFileAsString(TfsTeamProjectCollection projectCollection, String itemPath)
at Microsoft.TeamFoundation.Build.Client.ProcessTemplate.Download(String sourceGetVersion)
at Microsoft.TeamFoundation.Build.Hosting.BuildControllerWorkflowManager.PrepareRequestForBuild(WorkflowManagerActivity activity, IBuildDetail build, WorkflowRequest request, IDictionary2 dataContext)
at Microsoft.TeamFoundation.Build.Hosting.BuildWorkflowManager.TryStartWorkflow(WorkflowRequest request, WorkflowManagerActivity activity, BuildWorkflowInstance& workflowInstance, Exception& error, Boolean& syncLockTaken)
Inner Exception Details:
Exception Message: An error occurred while sending the request. (type HttpRequestException)
Exception Stack Trace: at Microsoft.VisualStudio.Services.WebApi.VssHttpRetryMessageHandler.d_0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.VisualStudio.Services.WebApi.HttpClientExtensions.d_2.MoveNext()
Inner Exception Details:
Exception Message: The underlying connection was closed: An unexpected error occurred on a receive. (type WebException)Exception Stack Trace: at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
Inner Exception Details:
Exception Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (type IOException)
Exception Stack Trace: at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
Inner Exception Details:
Exception Message: An existing connection was forcibly closed by the remote host (type SocketException)
Exception Stack Trace: at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
Not sure what the problem was but clearing the cache in VS' appdata folder solved the problem.
For future reference, you can clear the cache by going into {User Profile Folder}\AppData\Local\Microsoft\Team Foundation\5.0\Cache
And delete its contents. Restart Visual Studio.
FYI - the 5.0 is the version of TFS (v5.0 is 2013). Your actual cache folder will depend on the version of TFS you're connecting to (4.0 is 2012, 3.0 is 2010, 2.0 is 2008, and 1.0 is 2005).

TFS 2008 upgrade to 2010 failed upgrade pre tfs 2010 database failed

I'm currently in the process of upgrading the TFS server from 2008 to 2010 for trial. So basically, here is the following steps i have done:
back up database
restore the database on a new db server, DB.
install TFS 2010 on another server, TFS.
select the upgrade scenario
failed with the following error:
[Info #00:33:55.170] [2010-07-27
07:43:48Z][Informational] Step
Performer: Build
[Info #00:33:55.170] [2010-07-27
07:43:48Z][Informational] Step Type:
MigrateBuildDefinitionSchedules
[Info #00:33:55.170] [2010-07-27
07:43:48Z][Informational] Step Data
Text:
[Error #00:33:55.170] [2010-07-27
07:43:49Z][Error] Object reference not
set to an instance of an object.
[Info #00:33:55.170] [2010-07-27
07:43:49Z][Informational]
System.NullReferenceException: Object
reference not set to an instance of an
object.
at
Microsoft.TeamFoundation.Framework.Server.TeamFoundationJobSchedule.Validate(String
topLevelParamName, Int32
minimumScheduleInterval)
at
Microsoft.TeamFoundation.Framework.Server.TeamFoundationJobDefinition.Validate(String
topLevelParamName, Int32
minimumJobInterval)
at
Microsoft.TeamFoundation.Framework.Server.TeamFoundationJobService.UpdateJobDefinitions(TeamFoundationRequestContext
requestContext, IEnumerable1
jobsToDelete, IEnumerable1
jobUpdates, Boolean allowRunOnceJobs,
Boolean repairQueueOnly)
at
Microsoft.TeamFoundation.Build.Server.TeamFoundationBuildService.UpdateBuildDefinitions(TeamFoundationRequestContext
requestContext, IList`1 updates)
at
Microsoft.TeamFoundation.Server.Servicing.TFCollection.BuildStepPerformer.MigrateBuildDefinitionSchedules(String
stepData, ServicingContext
servicingContext, Boolean
validateOnly)
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, Boolean
validateOnly)
[Info #00:33:55.170] [2010-07-27
07:43:49Z] Servicing step Migrate
Build Definition Schedules failed.
(ServicingOperation:
UpgradePreTfs2010Databases; Step
group: Upgrade.TfsTeamBuild)
[Info #00:33:55.170] [2010-07-27
07:43:49Z][Informational] Clearing
dictionary, removing all items.
[Error #00:33:55.170] The servicing
operation failed.
I can't move on and have no idea what went wrong.
Please help.
Thanks,
Chen
Was your TFS 2008 server updated to Service Pack 1?
If not you need to update first. YOu can try following:
http://blog.hinshelwood.com/archive/2010/05/03/upgrading-team-foundation-server-2008-to-2010.aspx

Resources