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).
Related
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)
I am trying to install Docker for Windows 10 Pro. I have downloaded the Docker Desktop Installer.exe and when I run it with Administrator role I got the follwing error when it starts the installation, just after downloading and unpackaging the files.
Installation failed
Library not registered.
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.RefreshCache()
at System.DirectoryServices.AccountManagement.PrincipalContext.DoMachineInit()
at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate)
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue)
at System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, String identityValue)
at CommunityInstaller.CreateGroupAction.<DoAsync>b__33_0()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CommunityInstaller.InstallWorkflow.<ProcessAsync>d__24.MoveNext(
I have changed my Windows user Group to Administrators and I also updated Windows 10.
Any help would be appreciated
Regards
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" />
Today we find our tfs bc (build controller) and ba (build agent) does work.
When bc and ba restart, following error event will be logged in Windows Events.
Exception Message: The build service host [build agent name] is currently owned by [build agent name]. A service host may only be active on one machine at a time. (type BuildServiceHostOwnershipException)
Exception Stack Trace: at Microsoft.TeamFoundation.Build.Hosting.BuildMachine.StartOperation.End(IAsyncResult result, HttpRouter& router, TfsMessageQueue& messageQueue, List`1& processHosts, MachineLifecycleActivity& traceActivity)
at Microsoft.TeamFoundation.Build.Hosting.BuildMachine.EndStart(IAsyncResult result)
at Microsoft.TeamFoundation.Build.Machine.WindowsService.EndStartMachine(IAsyncResult result)
Inner Exception Details:
Exception Message: The build service host [build agent name] is currently
owned by [build agent name]. A service host may only be active on one machine
at a time. (type SoapException)SoapException Details: Exception
Stack Trace:
Queued build job will be hang up on step: Run On Agent and at last will fail with following error:
Exception Message: TF400324: Team
Foundation services are not available from the server.Technical
information (for administrator): Unable to connect to the remote
server (type TeamFoundationServiceUnavailableException)Exception Data
Dictionary:AgentExecution = FalseException Stack Trace: at
System.Activities.Statements.Throw.Execute(CodeActivityContext
context) at
System.Activities.CodeActivity.InternalExecute(ActivityInstance
instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at
System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
executor, BookmarkManager bookmarkManager, Location
resultLocation)Inner Exception Details:Exception Message: Unable to
connect to the remote server (type WebException)Exception Stack Trace:
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult
asyncResult, TransportContext& context) at
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult
asyncResult) at
Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.CompleteGetRequestStream(IAsyncResult
result) at
Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.EndGetRequestStream(IAsyncResult
result)Inner Exception Details:Exception Message: 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 [tfs server ip] (type
SocketException)Exception Stack Trace: at
System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Exception&
exception)
We have tried to re-register build controller and build agent. But doesn't work.
We have tried following solution and it works:
Build controler:
1.Unregister from tfs
2.Unregister from DNS
3.Restart
4.Re-register to DNS
5.Re-register to tfs
Build agent:
1.Unregister from tfs
2.Unregister from DNS
3.Restart
4.Re-register to DNS
5.Re-register to tfs
Then issue is fixed.
==========Add 8/14/2014=======
Recently we faced this issue periodically on build server.
Now we found that all what we should do is to wait. Just about 1 hour later, all are working.
Not sure about root cause.
We ran into this exact issue and it turned out that we had a build server that was cloned which created 2 instances of the same build server. The fix was to unregister the cloned server and reconfigure the original server.
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.