Question

I have a problem with a running build machine, where the agent suddenly does not want to start. It's been a part of a remote controller and for trouble shooting this issue, if started a local controller. The symptoms are, at the agent(s) initializes correct (says 'Ready'), but has the stopped icon and in the status area says 'BuildController has not been started in 1 minutes. The AD account running the build service works on another build machine (seperate controller + build agents). I've tried the following

  • Reinstall the build service
  • running with machine name, fully qualified domain name and IP address for endpoint address
  • un- and re-registered build service
  • rebooted
  • cleaned up build agent registrations with script

If I change the service account running the build service to my own AD account, it works. However, running under our dedicated build user failes on this particular machine, but not the other. Any suggestions what to do? Here's the error from the event log:

Service 'Default Agent - tfs2010build1' had an exception: 
Exception Message: There was no endpoint listening at http://tfs2010build1:9191/Build/v3.0/Services/Controller/31 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. (type EndpointNotFoundException)

Exception Stack Trace: 
Server stack trace: 
   at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
   at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
   at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.TeamFoundation.Build.Machine.IBuildControllerService.TestConnectionFromController(String agentUri)
   at Microsoft.TeamFoundation.Build.Machine.ServiceProxies.ServiceProxy`1.<>c__DisplayClass3.<Do>b__2(T channel)
   at Microsoft.TeamFoundation.Build.Machine.ServiceProxies.ServiceProxy`1.Do[TResult](Func`2 action)
   at Microsoft.TeamFoundation.Build.Machine.BuildAgentService.<>c__DisplayClass12.<TestConnection>b__11(Object )

Inner Exception Details:

Exception Message: Unable to connect to the remote server (type WebException)
Exception Stack Trace:    at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()

Inner Exception Details:

Exception Message: No connection could be made because the target machine actively refused it 127.0.0.1:38742 (type SocketException)

Exception Stack Trace:    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, Int32 timeout, Exception& exception)
Was it helpful?

Solution

Found the problem. Proxy server was enabled under IE options. Not sure why the build service worked under my AD user account and not the dedicated build user, but it solved the problem.

---->>>>>Update!

So we have 2 machines (B1 & B2), each with 2 agents. B1 had the initial problem and was solved by disabling the proxy settings under IE. Yesterday B2 suddenly started showing the same symptons and error messages on the 2 agents. Proxy setting is NOT enabled. While it did fix B1, it's not the universal solution for this particular problem. It's hard work keeping these build agents running :( - Miss TeamCity...

---->>>>Update again! So yesterday when I looked at the proxy configuration, it wasn't set. However this morning the checkbox was checked. Disabled the proxy and the agents went online. Very strange behavior! Wonder if Windows Update changes these settings...

OTHER TIPS

I often get this same issue with the proxy when I am forced to manually stop a build. I have not been able to find any decent resolutions for this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top