title: "No such host is known" for Visual Studio 2013 Web Performance Test agent configuration
body: <p>I am attempting to set up a controller and agents for a Visual Studio 2013 web performance test, and when configuring the agent receive the error message "Failed to register this test agent with the test controller.  Connection to the test controller MyController:6901 failed because either the test controller is accessible or the service is not running."</p>
  
  <p>The detailed error message from the log is:  "System.Net.Sockets.SocketException (0x80004005): No such host is known"</p>
  
  <p>I downloaded "Agents for Microsoft Visual Studio 2013," from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=40750" rel="nofollow">http://www.microsoft.com/en-us/download/details.aspx?id=40750</a></p>
  
  <p>The controller MyController is a 64-bit physical machine running Windows 7 Professional SP1. MyDomain\MyUser is an administrator on this machine.  Windows Firewall is not enabled.</p>
  
  <p>I logged into the controller machine as MyDomain\MyUser and ran the controller install.  I specified the logon account as MyDomain\MyUserName and checked "Configure test controller for load testing."</p>
  
  <p>After the install I found:</p>
  
  <ol>
  <li>The service "Visual Studio Test Controller" running under the identity of the domain user account MyDomain\MyUser.</li>
  <li>The documentation says the service listens on port 6901 by default.  The service resides at C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\QTController.exe.  When I look in QTController.exe.config I notice the appsettings key ControllerServicePort is set to "6901", which is the default value.</li>
  <li>When I run netstat -a -n I see TCP 0.0.0.0:6901   0.0.0.0.:0   LISTENING, so it looks like the machine is listening on port 6901 and taking all callers.</li>
  <li>MyDomain\MyUser is in the Administrators group on the controller machine.</li>
  <li>MyDomain\MyUser is in the TeamTestControllerUsers group on the controller machine.  This group was created by the Visual Studio controller installer and MyDomain\MyUser was added by the installer.</li>
  <li>I can successfully ping MyAgent.</li>
  <li>I rebooted the machine.</li>
  </ol>
  
  <p>The problem comes when attempting to configure the agent.  </p>
  
  <p>The agent machine is a 64-bit virtual machine running Windows 7 Professional SP1.  MyDomain\MyUser is an administrator on this machine.  Windows Firewall is not enabled.</p>
  
  <p>I logged into the agent machine as MyDomain\MyUser and ran the agent install.  At the end of the install the "Configure Test Agent" dialog appears.  It asks 2 questions:</p>
  
  <ol>
  <li>Run test agent as a service.  I entered MyDomain\MyUser.</li>
  <li>I checked "Register with Test Controller" and entered "MyController:6901" and click Apply Settings.</li>
  </ol>
  
  <p>The error message is "Failed to register this test agent with the test controller.  Connection to the test controller MyController:6901 failed because either the test controller is accessible or the service is not running."</p>
  
  <p>The test agent has a detailed error log.  Here is the relevant section:</p>
  
  <p>I, 2015/03/26, 09:35:57.872, AgentConfiguration: Found agent is not configured on any controller.
  I, 2015/03/26, 09:35:57.872, Getting information about controller: MyController:6901.
  I, 2015/03/26, 09:35:57.872, Creating Channel
  I, 2015/03/26, 09:35:57.997, CreateControllerObject : ControllerVersion : 12.0
  I, 2015/03/26, 09:36:02.943, CreateControllerObject: attempt 0, System.Net.Sockets.SocketException (0x80004005): No such host is known</p>
  
  <p>Server stack trace: 
     at System.Net.Dns.GetAddrInfo(String name)
     at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
     at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
     at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
     at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
     at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
     at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
     at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders&amp; responseHeaders, Stream&amp; responseStream)
     at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)</p>
  
  <p>I rebooted MyAgent and get the same error.</p>
  
  <p>From MyAgent I can successfully ping MyController.</p>
  
  <p>From MyAgent I can telnet MyController 6901 and get the blank screen (which means the port is open).</p>
  
  <p>I attempted the fix noted here (<a href="http://support.microsoft.com/en-us/kb/2823477" rel="nofollow">http://support.microsoft.com/en-us/kb/2823477</a>), to append the DSN suffix of the domain of the controller machine to the TCP\IP settings for the NIC on both the controller machine and the agent machines.  Since MyAgent and MyController are able to ping each other using only the machine name I did not expect this solution to work, and it did not work.</p>
  
  <p>I repeated this agent install on a Windows 7 64-bit physical machine (instead of a virtual machine) and recieved the exact same error.</p>
  
  <p>There are hotfixes for previous versions of Visual Studio (eg <a href="http://support.microsoft.com/en-us/kb/2643086" rel="nofollow">http://support.microsoft.com/en-us/kb/2643086</a>), but nothing for VS 2013.</p>