locked
Visual studio Agent problem. Remote test agent cannot connect to the test controller. RRS feed

  • Question

  • I cannot register test agent on the test controller.
    Agent installed on the remote computer.

    OS - Win7

    Both computers has static wan IP,

    Ping controller on 6901 by telnet is ok,

    FireWall is turned off, service FireWall is turned off too(on the both computers),

    Test agent and test controller has the same login name and password for start service.This user added on the controller's machine to groups: TeamTestAgentService, TeamTestControllerAdmins, TeamTestControllerUsers, Administrators

    Trace:

    I, 2013/07/12, 19:23:00.104, Removing VSTTAgentProcess from Run registry
    I, 2013/07/12, 19:23:00.104, Starting service configuration...
    I, 2013/07/12, 19:23:00.105, Started checking the status of agent service VSTTAgent.
    I, 2013/07/12, 19:23:00.106, Found that service VSTTAgent is installed and its current status is Stopped
    I, 2013/07/12, 19:23:00.106, Controller service VSTTAgent is already installed, so not doing anything here.
    I, 2013/07/12, 19:23:00.107, Configured service successfully.
    I, 2013/07/12, 19:23:00.108, Setting Tcp Parameters
    V, 2013/07/12, 19:23:00.109, Setting Tcp Parameters in 32bit Hive
    V, 2013/07/12, 19:23:00.109, Setting Tcp Parameters in 32bit Hive completed.
    V, 2013/07/12, 19:23:00.109, Setting Tcp Parameters in 64bit Hive.
    V, 2013/07/12, 19:23:00.109, Setting Tcp Parameters in 64bit Hive completed.
    I, 2013/07/12, 19:23:00.109, Setting Tcp Parameters completed.
    I, 2013/07/12, 19:23:00.109, Registering this test agent with the test controller. This may take few minutes...
    I, 2013/07/12, 19:23:00.110, AgentConfiguration: Starting controller configuration.
    I, 2013/07/12, 19:23:00.111, GetControllerName : The controller name managed by lab is
    I, 2013/07/12, 19:23:00.111, GetControllerName : The controller name managed by lab is
    I, 2013/07/12, 19:23:00.111, AgentConfiguration: Found agent is not configured on any controller.
    I, 2013/07/12, 19:23:00.111, AgentConfiguration: Adding agent ARINA on controller ****:6901.
    I, 2013/07/12, 19:23:00.111, Adding agent ARINA running under ****:6901 to controller ARINA\Testuser
    I, 2013/07/12, 19:23:00.111, Creating Channel
    I, 2013/07/12, 19:23:05.748, CreateControllerObject: attempt 0, System.Net.Sockets.SocketException (0x80004005): Этот хост неизвестен

    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& 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.Controller.ControllerObject.Hello()
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
    I, 2013/07/12, 19:23:11.076, CreateControllerObject: attempt 1, System.Net.Sockets.SocketException (0x80004005): Этот хост неизвестен

    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& 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.Controller.ControllerObject.Hello()
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
    I, 2013/07/12, 19:23:16.403, CreateControllerObject: attempt 2, System.Net.Sockets.SocketException (0x80004005): Этот хост неизвестен

    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& 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.Controller.ControllerObject.Hello()
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
    E, 2013/07/12, 19:23:16.505, Microsoft.VisualStudio.TestTools.ConfigCore.ConfigToolException: Unable to connect to test controller service ****:6901
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddAgent(String agentName, String controllerUri, ServiceAccount agentServiceAccount)
    at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.BindToController(String testController, ServiceAccount agentServiceAccount)
    at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleControllerChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
    I, 2013/07/12, 19:23:16.505, DetermineDomain:: User: ARINA\Testuser
    I, 2013/07/12, 19:23:16.505, Domain: ARINA
    I, 2013/07/12, 19:23:16.505, Machine Name: ARINA
    I, 2013/07/12, 19:23:16.505, Final Domain: . Final username: Testuser
    E, 2013/07/12, 19:23:16.506, Failed to register this test agent with the test controller. Possible reasons could be you do not have the right permissions to connect to the test controller ****:6901, the log on account does not exist on the test controller machine, or a firewall is blocking the connection.
    To fix this problem, verify that you are a local administrator on the test controller machine, that the log on account Testuser exists on the test controller machine, and that the Windows Firewall Settings on the test controller machine has "File and Printer Sharing" exception.
    I, 2013/07/12, 19:23:16.516, Updating service account...
    I, 2013/07/12, 19:23:16.522, Updating the service account of agent service VSTTAgent to ARINA\Testuser.
    I, 2013/07/12, 19:23:16.526, Updating service account of windows service VSTTAgent to ARINA\Testuser
    I, 2013/07/12, 19:23:16.541, Updated service account of windows service VSTTAgent to ARINA\Testuser
    I, 2013/07/12, 19:23:16.541, Updated the service account of agent service VSTTAgent to ARINA\Testuser.
    I, 2013/07/12, 19:23:16.544, Found binary Sid 'System.Byte[]' for account ARINA\Testuser
    I, 2013/07/12, 19:23:16.546, Granted LogonAsService permission to agent service account ARINA\Testuser.
    I, 2013/07/12, 19:23:16.546, IsManagedByLab : lab manaaged controller name :
    I, 2013/07/12, 19:23:16.546, AgentConfiguration: Adding agent account ARINA\Testuser on controller ****:6901.
    V, 2013/07/12, 19:23:16.550, Adding agent service account ARINA\Testuser to TeamTestAgentService group on controller ****
    I, 2013/07/12, 19:23:16.552, Creating user ARINA\Testuser on machine ****
    V, 2013/07/12, 19:23:16.557, Created Nt account ARINA\Testuser for userName ARINA\Testuser
    V, 2013/07/12, 19:23:16.558, Found Sid S-1-5-21-2808228160-4032882579-4052926107-1003 for userName ARINA\Testuser
    I, 2013/07/12, 19:23:16.558, Using machine$ account ARINA\Testuser on machine ****
    I, 2013/07/12, 19:23:16.558, DetermineDomain:: User: ARINA\Testuser
    I, 2013/07/12, 19:23:16.558, Domain: ARINA
    I, 2013/07/12, 19:23:16.558, Machine Name: ARINA
    I, 2013/07/12, 19:23:16.558, Final Domain: . Final username: Testuser
    I, 2013/07/12, 19:23:38.737, Exception in HandleServiceAccountChange: System.Runtime.InteropServices.COMException (0x80070035): Не найден сетевой путь.

    at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
    at System.DirectoryServices.DirectoryEntry.Bind()
    at System.DirectoryServices.DirectoryEntry.get_IsContainer()
    at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
    at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
    at Microsoft.VisualStudio.TestTools.Execution.ExecutionUtilities.GetUserDirectoryEntry(DirectoryEntry computer, String domain, String userName, String userPassword, Boolean createIfNotFound)
    at Microsoft.VisualStudio.TestTools.ConfigCore.UserNameUtil.GetUserDirectoryEntry(String machineName, ServiceAccount userAccount, Boolean useRemoteName)
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddUserAccount(ServiceAccount account, String groupName, String machineName, Boolean useRemoteName)
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddAgentAccountToControllerGroup(ServiceAccount agentServiceAccount, String controllerUri)
    at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleServiceAccountChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
    E, 2013/07/12, 19:23:38.740, Got Exception : Microsoft.VisualStudio.TestTools.ConfigCore.ConfigToolException: Failed to add test agent account Testuser on test controller ****:6901. To fix this error, make sure the account exists on the test controller machine and try again. ---> System.Runtime.InteropServices.COMException: Не найден сетевой путь.

    at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
    at System.DirectoryServices.DirectoryEntry.Bind()
    at System.DirectoryServices.DirectoryEntry.get_IsContainer()
    at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
    at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
    at Microsoft.VisualStudio.TestTools.Execution.ExecutionUtilities.GetUserDirectoryEntry(DirectoryEntry computer, String domain, String userName, String userPassword, Boolean createIfNotFound)
    at Microsoft.VisualStudio.TestTools.ConfigCore.UserNameUtil.GetUserDirectoryEntry(String machineName, ServiceAccount userAccount, Boolean useRemoteName)
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddUserAccount(ServiceAccount account, String groupName, String machineName, Boolean useRemoteName)
    at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddAgentAccountToControllerGroup(ServiceAccount agentServiceAccount, String controllerUri)
    at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleServiceAccountChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
    --- End of inner exception stack trace ---
    at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleServiceAccountChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
    at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.Configure(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
    at Microsoft.VisualStudio.TestTools.AgentConfigUI.AgentConfigUI.ConfigureWorker_DoWork(Object sender, DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
    I, 2013/07/12, 19:23:38.741, Work completed for GetConfiguration() call : got out of turn error
    E, 2013/07/12, 19:23:38.742, Failed to add test agent account Testuser on test controller ****:6901. To fix this error, make sure the account exists on the test controller machine and try again.

    Thanks in advance!




    Wednesday, July 17, 2013 3:48 PM

Answers

All replies

  • System.Net.Sockets.SocketException (0x80004005): Этот хост неизвестен

    at System.Net.Dns.GetAddrInfo(String name)
    at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)

    at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)

    It looks like you may have fat fingered your host name.  Maybe just put in the IP address instead of the DNS name.

    Wednesday, July 17, 2013 7:57 PM
  • Hello,

    Thank you for your post.

    Just to make the issue clearly:

    1. Which version of test agent and test controller do you install?
    2. Whether the test controller machine and test agent machine are in different domains or in a work group?
    3. Do you install and configure test controller for Visual Studio load testing? Or in order to create a lab environment in MTM?

    If you plan to run your test controllers and test agents on machines that are in a work group and not in a domain, or machines that run in different domains that do not have a two-way trust relationship, you must follow some steps as part of your installation process. For detailed information, please see ’Requirements for workgroups and multiple domains’ section in this article: http://msdn.microsoft.com/en-us/library/hh546459.aspx

    And when you install test controller and test agent, you must be a member of the Administrators security group on the computers. When you register a test agent with a test controller, you must also be a member of the Administrators security group on the test controller machine. Moreover note that if the user that you select to start the service or process for the test agent is the current user, when you add this user to the test controller machine, you must log off or restart the machine.

    When you register test agent to test controller, please make sure that you have entered correct test controller machine name with the port 6901.

    About installing and configuring test controller and test agent, please see: http://msdn.microsoft.com/en-us/library/hh546459.aspx Please make sure that you have followed correct steps.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, July 18, 2013 6:32 AM
  • Hello, Amanda! Thanks for your help.

    I took your advice. It's helped but I have another exception.

    1) I installed test agent and test controller 2010 and use visual studio 2010

    2) Test controller and test agent located in different work group. Visual studio and controller installed on the same machine(First work group), test agent installed on the remote machine(Second work group)

    3) I installed and configured test controller for Visual Studio load testing.

    I followed the instructions "Requirements for workgroups and multiple domains"

    I followed the instructions "Setting Up Test Controllers and Test Agents to Manage Tests with Visual Studio"

    I have turn on file and printer sharing.

    On the both machines turned off FireWall and there are no antivirus programs.

    New trace:

    I, 2013/07/18, 15:16:01.429, Listing agent configurations
    I, 2013/07/18, 15:16:01.503, Found that service VSTTAgent is installed and its current status is Stopped
    I, 2013/07/18, 15:16:01.505, Getting the service account of windows service VSTTAgent.
    I, 2013/07/18, 15:16:01.541, Checking whether account .\testuser is a network service account or not
    V, 2013/07/18, 15:16:01.544, Created Nt account .\testuser for userName .\testuser
    I, 2013/07/18, 15:16:01.546, Observed that account .\testuser is network service account? False
    I, 2013/07/18, 15:16:01.577, Domain: .
    I, 2013/07/18, 15:16:01.577, Final UserName: DMITRY-PC\testuser.
    I, 2013/07/18, 15:16:01.578, Loading account details for DMITRY-PC\testuser
    I, 2013/07/18, 15:16:01.585, Normalized account is DMITRY-PC\Testuser and Sid is S-1-5-21-2802674678-1630337270-3801519593-1006
    I, 2013/07/18, 15:16:01.637, Found that service VSTTAgent is installed and its current status is Stopped
    V, 2013/07/18, 15:16:01.637, Created Nt account DMITRY-PC\testuser for userName DMITRY-PC\testuser
    V, 2013/07/18, 15:16:01.638, Found Sid S-1-5-21-2802674678-1630337270-3801519593-1006 for userName DMITRY-PC\testuser
    I, 2013/07/18, 15:16:01.639, GetControllerName : The controller name managed by lab is
    I, 2013/07/18, 15:16:01.709, IsManagedByLab : lab manaaged controller name :
    I, 2013/07/18, 15:16:01.715, Initializing UI : Found service already installed with user account
    I, 2013/07/18, 15:16:01.718, NotManagedByLab = True
    I, 2013/07/18, 15:16:42.489, Checking whether account Testuser is a network service account or not
    V, 2013/07/18, 15:16:42.489, Created Nt account Testuser for userName Testuser
    V, 2013/07/18, 15:16:42.490, Found Sid S-1-5-21-2802674678-1630337270-3801519593-1006 for userName Testuser
    I, 2013/07/18, 15:16:42.490, Observed that account Testuser is network service account? False
    I, 2013/07/18, 15:16:42.490, Domain:
    I, 2013/07/18, 15:16:42.490, Final UserName: DMITRY-PC\Testuser.
    I, 2013/07/18, 15:16:42.490, Loading account details for DMITRY-PC\Testuser
    I, 2013/07/18, 15:16:42.491, Normalized account is DMITRY-PC\Testuser and Sid is S-1-5-21-2802674678-1630337270-3801519593-1006
    I, 2013/07/18, 15:16:42.502, Agent configuration update pack details :
    I, 2013/07/18, 15:16:42.502, Run as interactive process : False
    I, 2013/07/18, 15:16:42.504, Network service name NT AUTHORITY\NETWORK SERVICE
    I, 2013/07/18, 15:16:42.504, User name : Testuser
    I, 2013/07/18, 15:16:42.504, Change Port : False
    I, 2013/07/18, 15:16:42.505, Chang eService Account : True
    I, 2013/07/18, 15:16:42.505, Change Test Controller : True
    I, 2013/07/18, 15:16:42.505, Test Controller Uri : 80.8*.**.***:6901
    I, 2013/07/18, 15:16:42.505, Disable Screensaver : False
    I, 2013/07/18, 15:16:42.505, Enable autologon : False
    I, 2013/07/18, 15:16:42.505, Port : -1
    I, 2013/07/18, 15:16:42.547, Validating user name and password.
    I, 2013/07/18, 15:16:42.556, Validated user name and password.
    I, 2013/07/18, 15:16:42.566, Starting firewall configuration...
    E, 2013/07/18, 15:16:42.586, System.Runtime.InteropServices.COMException (0x800706D9): Creating an instance of the COM component with CLSID {304CE942-6E39-40D8-943A-

    B913C40C9CD4} from the IClassFactory failed due to the following error: 800706d9 There are no more endpoints available from the endpoint mapper. (Exception from HRESULT:

    0x800706D9).
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean&

    bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Microsoft.VisualStudio.TestTools.ConfigCore.Firewall..ctor()
    E, 2013/07/18, 15:16:42.586, System.Runtime.InteropServices.COMException (0x800706D9): Creating an instance of the COM component with CLSID {304CE942-6E39-40D8-943A-

    B913C40C9CD4} from the IClassFactory failed due to the following error: 800706d9 There are no more endpoints available from the endpoint mapper. (Exception from HRESULT:

    0x800706D9).
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean&

    bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Microsoft.VisualStudio.TestTools.ConfigCore.Firewall..ctor()
       at Microsoft.VisualStudio.TestTools.ConfigCore.BaseConfiguration.AddFirewallExceptionIfRequired(FirewallExceptionDataPacket[] applications, DelegateStatusUpdate

    progressListener, Boolean throwOnError)
    W, 2013/07/18, 15:16:42.587, Skipped firewall configuration as no firewall is installed on this machine. If you add a firewall later, you need to run this tool again to

    configure the firewall properly.
    E, 2013/07/18, 15:16:42.589, Exception occured while adding executables 'Microsoft Visual Studio Test Agent 2010 Service' in firewall exception list.

    System.Runtime.InteropServices.COMException (0x800706D9): Creating an instance of the COM component with CLSID {304CE942-6E39-40D8-943A-B913C40C9CD4} from the IClassFactory

    failed due to the following error: 800706d9 There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9).
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean&

    bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Microsoft.VisualStudio.TestTools.ConfigCore.Firewall..ctor()
       at Microsoft.VisualStudio.TestTools.ConfigCore.BaseConfiguration.AddFirewallExceptionIfRequired(FirewallExceptionDataPacket[] applications, DelegateStatusUpdate

    progressListener, Boolean throwOnError)
    I, 2013/07/18, 15:16:42.589, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine
    I, 2013/07/18, 15:16:42.589, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 32 bit hive
    I, 2013/07/18, 15:16:42.591, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 32 bit hive
    I, 2013/07/18, 15:16:42.591, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 64 bit hive
    I, 2013/07/18, 15:16:42.592, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 64 bit hive
    I, 2013/07/18, 15:16:42.592, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine
    I, 2013/07/18, 15:16:42.592, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 32 bit hive
    I, 2013/07/18, 15:16:42.593, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 32 bit hive
    I, 2013/07/18, 15:16:42.593, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 64 bit hive
    I, 2013/07/18, 15:16:42.593, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 64 bit hive
    I, 2013/07/18, 15:16:42.593, Adding agent setting InstallationPath=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE on agent machine
    I, 2013/07/18, 15:16:42.594, Adding agent setting InstallationPath=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 32 bit hive
    I, 2013/07/18, 15:16:42.595, Added agent setting InstallationPath=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 32 bit hive
    I, 2013/07/18, 15:16:42.595, Adding agent setting InstallationPath=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 64 bit hive
    I, 2013/07/18, 15:16:42.596, Added agent setting InstallationPath=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 64 bit hive
    I, 2013/07/18, 15:16:42.597, Creating event sources VSTTAgent
    I, 2013/07/18, 15:16:42.597, Creating event sources VSTTAgent
    I, 2013/07/18, 15:16:42.598, Event source VSTTAgent already exists.
    I, 2013/07/18, 15:16:42.598, Creating event sources VSTTAgentProcess
    I, 2013/07/18, 15:16:42.598, Event source VSTTAgentProcess already exists.
    I, 2013/07/18, 15:16:42.598, Adding event source for event logging
    I, 2013/07/18, 15:16:42.599, ResetForceGuestKey : Getting the value of ForceGuest key
    I, 2013/07/18, 15:16:42.599, ResetForceGuestKey : The value of ForceGuest key is 0
    I, 2013/07/18, 15:16:42.604, Updating the startup registry
    I, 2013/07/18, 15:16:42.604, Removing VSTTAgentProcess from Run registry
    I, 2013/07/18, 15:16:42.606, Starting service configuration...
    I, 2013/07/18, 15:16:42.606, Started checking the status of agent service VSTTAgent.
    I, 2013/07/18, 15:16:42.651, Found that service VSTTAgent is installed and its current status is Stopped
    I, 2013/07/18, 15:16:42.651, Controller service VSTTAgent is already installed, so not doing anything here.
    I, 2013/07/18, 15:16:42.652, Configured service successfully.
    I, 2013/07/18, 15:16:42.652, Setting Tcp Parameters
    V, 2013/07/18, 15:16:42.653, Setting Tcp Parameters in 32bit Hive
    V, 2013/07/18, 15:16:42.653, Setting Tcp Parameters in 32bit Hive completed.
    V, 2013/07/18, 15:16:42.653, Setting Tcp Parameters in 64bit Hive.
    V, 2013/07/18, 15:16:42.653, Setting Tcp Parameters in 64bit Hive completed.
    I, 2013/07/18, 15:16:42.654, Setting Tcp Parameters completed.
    I, 2013/07/18, 15:16:42.657, Registering this test agent with the test controller. This may take few minutes...
    I, 2013/07/18, 15:16:42.658, AgentConfiguration: Starting controller configuration.
    I, 2013/07/18, 15:16:42.658, GetControllerName : The controller name managed by lab is
    I, 2013/07/18, 15:16:42.659, GetControllerName : The controller name managed by lab is
    I, 2013/07/18, 15:16:42.659, AgentConfiguration: Found agent is not configured on any controller.
    I, 2013/07/18, 15:16:42.660, AgentConfiguration: Adding agent DMITRY-PC on controller 80.8*.**.***:6901.
    I, 2013/07/18, 15:16:42.660, Adding agent DMITRY-PC running under 80.8*.**.***:6901 to controller DMITRY-PC\Testuser
    I, 2013/07/18, 15:16:42.680, Creating Channel
    I, 2013/07/18, 15:16:51.088, CreateControllerObject: attempt 0, System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine

    actively refused it 192.168.0.102:6901

    Server stack trace:
       at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
       at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(AddressFamily family)
       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.Controller.ControllerObject.Hello()
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
    I, 2013/07/18, 15:16:59.310, CreateControllerObject: attempt 1, System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine

    actively refused it 192.168.0.102:6901

    Server stack trace:
       at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
       at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(AddressFamily family)
       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.Controller.ControllerObject.Hello()
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
    I, 2013/07/18, 15:17:07.554, CreateControllerObject: attempt 2, System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine

    actively refused it 192.168.0.102:6901

    Server stack trace:
       at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
       at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(AddressFamily family)
       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.Controller.ControllerObject.Hello()
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
    E, 2013/07/18, 15:17:07.654, Microsoft.VisualStudio.TestTools.ConfigCore.ConfigToolException: Unable to connect to test controller service 80.8*.**.***:6901
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.CreateControllerObject(String controllerUri)
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddAgent(String agentName, String controllerUri, ServiceAccount agentServiceAccount)
       at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.BindToController(String testController, ServiceAccount agentServiceAccount)
       at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleControllerChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
    I, 2013/07/18, 15:17:07.656, DetermineDomain:: User: DMITRY-PC\Testuser
    I, 2013/07/18, 15:17:07.656, Domain: DMITRY-PC
    I, 2013/07/18, 15:17:07.656, Machine Name: DMITRY-PC
    I, 2013/07/18, 15:17:07.656, Final Domain: .  Final username: Testuser
    E, 2013/07/18, 15:17:07.657, Failed to register this test agent with the test controller. Possible reasons could be you do not have the right permissions to connect to the

    test controller 80.8*.**.***:6901, the log on account does not exist on the test controller machine, or a firewall is blocking the connection.
    To fix this problem, verify that you are a local administrator on the test controller machine, that the log on account Testuser exists on the test controller machine, and that

    the Windows Firewall Settings on the test controller machine has "File and Printer Sharing" exception.
    I, 2013/07/18, 15:17:07.666, Updating service account...
    I, 2013/07/18, 15:17:07.674, Updating the service account of agent service VSTTAgent to DMITRY-PC\Testuser.
    I, 2013/07/18, 15:17:07.676, Updating service account of windows service VSTTAgent to DMITRY-PC\Testuser
    I, 2013/07/18, 15:17:07.868, Updated service account of windows service VSTTAgent to DMITRY-PC\Testuser
    I, 2013/07/18, 15:17:07.868, Updated the service account of agent service VSTTAgent to DMITRY-PC\Testuser.
    I, 2013/07/18, 15:17:07.870, Found binary Sid 'System.Byte[]' for account DMITRY-PC\Testuser
    I, 2013/07/18, 15:17:07.872, Granted LogonAsService permission to agent service account DMITRY-PC\Testuser.
    I, 2013/07/18, 15:17:07.873, IsManagedByLab : lab manaaged controller name :
    I, 2013/07/18, 15:17:07.873, AgentConfiguration: Adding agent account DMITRY-PC\Testuser on controller 80.8*.**.***:6901.
    V, 2013/07/18, 15:17:07.875, Adding agent service account DMITRY-PC\Testuser to TeamTestAgentService group on controller 80.8*.**.***
    I, 2013/07/18, 15:17:07.879, Creating user DMITRY-PC\Testuser on machine 80.8*.**.***
    V, 2013/07/18, 15:17:07.880, Created Nt account DMITRY-PC\Testuser for userName DMITRY-PC\Testuser
    V, 2013/07/18, 15:17:07.881, Found Sid S-1-5-21-2802674678-1630337270-3801519593-1006 for userName DMITRY-PC\Testuser
    I, 2013/07/18, 15:17:07.881, Using machine$ account DMITRY-PC\Testuser on machine 80.8*.**.***
    I, 2013/07/18, 15:17:07.881, DetermineDomain:: User: DMITRY-PC\Testuser
    I, 2013/07/18, 15:17:07.881, Domain: DMITRY-PC
    I, 2013/07/18, 15:17:07.881, Machine Name: DMITRY-PC
    I, 2013/07/18, 15:17:07.881, Final Domain: .  Final username: Testuser
    I, 2013/07/18, 15:17:46.438, Exception in HandleServiceAccountChange: System.Runtime.InteropServices.COMException (0x80070035): The network path was not found.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_IsContainer()
       at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
       at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
       at Microsoft.VisualStudio.TestTools.Execution.ExecutionUtilities.GetUserDirectoryEntry(DirectoryEntry computer, String domain, String userName, String userPassword, Boolean

    createIfNotFound)
       at Microsoft.VisualStudio.TestTools.ConfigCore.UserNameUtil.GetUserDirectoryEntry(String machineName, ServiceAccount userAccount, Boolean useRemoteName)
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddUserAccount(ServiceAccount account, String groupName, String machineName, Boolean useRemoteName)
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddAgentAccountToControllerGroup(ServiceAccount agentServiceAccount, String controllerUri)
       at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleServiceAccountChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
    E, 2013/07/18, 15:17:46.441, Got Exception : Microsoft.VisualStudio.TestTools.ConfigCore.ConfigToolException: Failed to add test agent account Testuser on test controller

    80.8*.**.***:6901. To fix this error, make sure the account exists on the test controller machine and try again. ---> System.Runtime.InteropServices.COMException: The network

    path was not found.

       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_IsContainer()
       at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
       at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
       at Microsoft.VisualStudio.TestTools.Execution.ExecutionUtilities.GetUserDirectoryEntry(DirectoryEntry computer, String domain, String userName, String userPassword, Boolean

    createIfNotFound)
       at Microsoft.VisualStudio.TestTools.ConfigCore.UserNameUtil.GetUserDirectoryEntry(String machineName, ServiceAccount userAccount, Boolean useRemoteName)
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddUserAccount(ServiceAccount account, String groupName, String machineName, Boolean useRemoteName)
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AddAgentAccountToControllerGroup(ServiceAccount agentServiceAccount, String controllerUri)
       at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleServiceAccountChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.HandleServiceAccountChange(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
       at Microsoft.VisualStudio.TestTools.ConfigCore.AgentConfiguration.Configure(AgentConfigurationUpdatePack updatePack, DelegateStatusUpdate statusListener)
       at Microsoft.VisualStudio.TestTools.AgentConfigUI.AgentConfigUI.ConfigureWorker_DoWork(Object sender, DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
    I, 2013/07/18, 15:17:46.442, Work completed for GetConfiguration() call : got out of turn error
    E, 2013/07/18, 15:17:46.442, Failed to add test agent account Testuser on test controller 80.8*.**.***:6901. To fix this error, make sure the account exists on the test
    controller machine and try again.

    "No connection could be made because the target machine actively refused it 192.168.0.102:6901"

    I think problem with IP 192.168.0.102, it's computer's local IP address, maybe controller try send reply on this address? I think controller have to send reply on the external (Internet) IP.

    I tried to solve this problem by change file QTAgentService.exe.config(<add key="BindTo" value="109.17*.**.***"/> ) but I'v got the same trace with the same exception: "No connection could be made because the target machine actively refused it 192.168.0.102:6901"



    Thursday, July 18, 2013 1:39 PM
  • Hello,

    Glad to receive your reply.

    I assume that 192.168.0.102 is the IP address of test controller machine. If so, I suggest that you try to ping test agent from test controller to check if it is OK. And when you register test agent to test controller, you enter the name of test controller with 6901 port instead of the IP address of test controller machine to check the result.

    If you installed test controller and test agent on different workgroups, please makes sure the accounts which are logging on the test controller and test agent have the same username and password.

    For more information, please see ‘Requirements for workgroups’ section in this blog:

    http://blogs.msdn.com/b/edglas/archive/2007/02/17/load-agent-and-load-controller-installation-and-configuration-guide.aspx

    If still no help, I suggest that you refer to this article: http://social.msdn.microsoft.com/Forums/en-US/df043823-ffcf-46a4-9e47-1c4b8854ca13/troubleshooting-guide-for-visual-studio-test-controller-and-agent to troubleshoot your issues step by step.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Amanda Zhu Wednesday, July 24, 2013 9:54 AM
    Friday, July 19, 2013 3:22 AM
  • I've notice some weird quirks when having the test controller in the domain, and the agents outside my network in workgroup computers. I think the problems seem to be similar to yours. The controller seems to try to connect back to the agents using their netbios name, so you need to add that hostname to your hostfile with the public IP address if it isn't in your internal DNS. The agent seems to try to connect to the controller using the FQDN (active directory domain, not internet domain) of the controller, so that needs to go in the host file of the agent. You need to have the same account name and password for the agents and controller. If your controller is on a separate computer from your test manager, you need to have the controller service account be a domain account with the same username/password as the local service account on the agents. I have a complete walkthrough of what I did to make it work at http://nerdsknowbest.blogspot.com/2013/10/how-to-setup-visual-studio-tfs-test-agents-cloud.html
    Friday, November 1, 2013 1:29 AM