Unable to connect to the controller on 'MyController:6901'. There is no agent with the name 'MyAgent' registered on the controller.
If you click on the "View Log" link after attempting to configure the Test Agent, you will see the follwing detailed error:
V, 2013/10/28, 17:33:25.342, Observed that agent 'MyAgent' does not exist. Microsoft.VisualStudio.TestTools.Exceptions.EqtException: There is no agent with
the name 'MyAgent' registered on the controller.
Server stack trace:
at Microsoft.VisualStudio.TestTools.Controller.AgentManager.GetAgentMachine(String agentName)
at Microsoft.VisualStudio.TestTools.Controller.AgentManager.GetAgentProperties(String agentName)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object args, Object server, Object& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at :
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.VisualStudio.TestTools.Execution.IControllerCommands.GetAgentProperties(String agentName)
at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AgentExists(String agentName, IControllerCommands controllerCmds)
Cause: The problem I had was that the agent's host file had some entries in there pointing to the loopback IP address of 127.0.0.1. For some reason, the controller grabbed the host names from the hosts file on the agent machines, and was trying to talk back to them based on the information in DNS. In our case, this was the load balancers, not the agent machines.
- Comment out any hostfile entries on the agent machines that have the 127.0.0.1 IP address with a "#" pound sign.
- Run "ipconfig /flushdns" on the agent and the controller.
- Restart all of the services starting with "Visual Studio" on both the agent and the controller.
- Rerun the agent configuration.