Test agent configuration tool is crashing during the configuration


We were configuring test controller and test agent on same machine for the automated test execution. However the test agent configuration tool was crashing during the configuration.


We were logged in to machine using the test controller service account. We verified that the service account is admin on test controller and test agent (both are same in this case) machine. Also the service account is part of Team Project Collection Test Service user group in TFS. Verified that the Test controller and Test Agent version are identical versions (TFS 2012 update 4 - 11.0.61030.0).

Validating the event viewer log on the machine, we noticed the below error being logged:

The description for Event ID 0 from source VSTTAgent 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:

(QTAgentService.exe, PID 9744, Thread 1) AgentService: Could not register TCP channel: System.Net.Sockets.SocketException (0x80004005): The requested address is not valid in its context

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

at System.Net.Sockets.Socket.Bind(EndPoint localEP)

at System.Net.Sockets.TcpListener.Start(Int32 backlog)

at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)

at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)

at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()

at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)

at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)

at Microsoft.VisualStudio.TestTools.Execution.TcpClientServerChannelContainer..ctor(String channelNamePrefix, Hashtable channelProperties, Boolean useMachineName, Boolean useNetBiosName)

at Microsoft.VisualStudio.TestTools.Agent.AgentService.RegisterTcpChannel(Boolean useMachineNameIfPossible)

For more detailed error log, we enabled test controller trace logs (ref: http://blogs.msdn.com/b/aseemb/archive/2009/11/28/how-to-enable-test-controller-logs.aspx) and test agent trace logs (ref: http://blogs.msdn.com/b/aseemb/archive/2009/11/28/how-to-enable-test-controller-logs.aspx). From this trace file we noticed the test agent configuration is hanged at network emulator installation.

Hence to repair the network emulator on the machine we performed this command VSTestConfig NETWORKEMULATION /Repair. However this command showed there is no network emulator installed on this machine.


To install the network emulator manually on the machine, we performed VSTestConfig NETWORKEMULATION /install command. And this command succeeded with network emulator installation.


After installing network emulator on the machine, we were able to configure the test agent successfully.

Content created by – Sinjith Haridasan Reeja
Content reviewed by – Romit Gulati

Skip to main content