Issue description:

You may face issue while triggering the load test from VS2010 and controller and agents on different machines, status of the tests always in "In pending" status.

 

Error message in controller log file:

(QTController.exe,PID 6244, Thread 12) ControllerExecution.DoDeployment: System.Net.Sockets.SocketException (0x80004005): 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
121.121.121.001:12345

Server stack trace:

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

  at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)

  at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)

  
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& responseHeaders, Stream& responseStream)

  
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

 

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.VisualStudio.TestTools.Common.FileCopyService.get_DeploymentFlags()

  
at Microsoft.VisualStudio.TestTools.Controller.ControllerExecution.<DoDeployment>b__6(FileCopyService fileCopyService)

  
at Microsoft.VisualStudio.TestTools.Execution.RemoteObjectContainer`1.InvokeAsRemoteUser(Action`1 invoke)

  
atMicrosoft.VisualStudio.TestTools.Controller.ControllerExecution.DoDeployment()

  
atMicrosoft.VisualStudio.TestTools.Controller.ControllerExecution.RunStateDeploying()

 

Event log on the controller machine:

Log Name:  Application

Source: VSTTExecution

Date:  2/3/2012 3:30:57 PM

Event ID:  0

Task Category: None

Level: Error

Keywords: Classic

User: N/A

Computer:  ABC.XYZ.local

Description: The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

(devenv.exe, PID 7620, Thread 32) Test run 'tfsservice@XYZ.local 2012-02-03 15:28:53' could not be executed. Timed out waiting for agent plugins to initialize. the message resource is present but the message is not found in the string/message table

Event Xml:

<Event
xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

 
<System>

   
<Provider Name="VSTTExecution" />

   
<EventID Qualifiers="0">0</EventID>

   <Level>2</Level>

   
<Task>0</Task>

   
<Keywords>0x80000000000000</Keywords>

   
<TimeCreated SystemTime="2012-02-03T10:00:57.000000000Z" />

   
<EventRecordID>122287</EventRecordID>

   
<Channel>Application</Channel>

   
<Computer>ABC.XYZ.local

  
</Computer>

   
<Security />

 
</System>

 
<EventData>

   
<Data>(devenv.exe, PID 7620, Thread 32) Test run 'tfsservice@XYZ.local
2012-02-03 15:28:53' could not be executed. Timed out waiting for agent plugins
to initialize.</Data>

 
</EventData>

</Event>

 

Note: in the above error message, IP address and port number, domain name and computer name are not actual one.

 

Resolution: 

Load test triggered from VS2010 on one machine and controller and agents are on different machines.

When we triggered the test from VS2010, it was always in "In pending" status.

There was error message in the controller log and event entry in the controller machine as mentioned above.

 

Enabling logging on controller:

http://blogs.msdn.com/b/aseemb/archive/2009/11/28/how-to-enable-test-controller-logs.aspx

 

Architecture of communication between VS2010, controller says that when visual studio communicated with controller, it does that on 6901 port and controller communicates with the visual studio on a random port.

Looking at the error messages, it might be an issue when controller wants to communicate with visual studio on random port.

Please check the following to resolve this kind of issue:

 

  1. Check if controller can communicate on random ports properly.
  2. Check if any firewall exception set in the group policy in the infrastructure for communication on the random ports.
  3. If both a) and b) are fine, it might be an issue with server hardening which generally infrastructure team does for security reasons.
  4. Also you can create the below registry key and client will use ports from this range while receiving data from controller.

             HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\VisualStudio\10.0\EnterpriseTools\QualityTools\ListenPortRange\PortRangeStart

             HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\VisualStudio\10.0\EnterpriseTools\QualityTools\ListenPortRange\PortRangeEnd

 

Hope it would help.

 

Content developed by: Deepak Mittal
Content reviewed by: Teodora Stanev