locked
Test Agent Configuration Failure

    Question

  • I have two developer servers, one of which I was able to install and configure without any problems.  Both servers have an account created called TfsTestAgent which has administrative rights to the Controller machine using the same account/password.  On the first, registration worked correctly and I am able to run tests against it.  On the second, I keep getting an error (I've attached the portion of the log below).  The firewall is disabled on both machines. 

    I've enabled verbose logging on my test controller and nothing is being inserted in the log about this configuration, so it seems like it's not even connecting to the controller from my dev server.  Like it suggests in the log, I turned off custom errors on the controller machine but I am not getting any more information.  I can resolve the machine names in either direction so I know it isn't a DNS issue.

     

    I, 2010/09/17, 08:07:04.863, Listing agent configurations
    I, 2010/09/17, 08:07:04.910, Found that service VSTTAgent is installed and its current status is Stopped
    I, 2010/09/17, 08:07:04.910, Getting the service account of windows service VSTTAgent.
    I, 2010/09/17, 08:07:04.972, Checking whether account .\TfsTestAgent is a network service account or not
    V, 2010/09/17, 08:07:04.972, Created Nt account .\TfsTestAgent for userName .\TfsTestAgent
    I, 2010/09/17, 08:07:04.972, Observed that account .\TfsTestAgent is network service account? False
    I, 2010/09/17, 08:07:05.003, Domain: .
    I, 2010/09/17, 08:07:05.003, Final UserName: MITDEV\TfsTestAgent.
    I, 2010/09/17, 08:07:05.003, Loading account details for MITDEV\TfsTestAgent
    I, 2010/09/17, 08:07:05.035, Normalized account is MITDEV\TfsTestAgent and Sid is S-1-5-21-1840410638-2533626498-2042444630-1009
    I, 2010/09/17, 08:07:05.050, Found that service VSTTAgent is installed and its current status is Stopped
    V, 2010/09/17, 08:07:05.050, Created Nt account MITDEV\TfsTestAgent for userName MITDEV\TfsTestAgent
    V, 2010/09/17, 08:07:05.050, Found Sid S-1-5-21-1840410638-2533626498-2042444630-1009 for userName MITDEV\TfsTestAgent
    I, 2010/09/17, 08:07:05.050, GetControllerName : The controller name managed by lab is
    I, 2010/09/17, 08:07:05.160, IsManagedByLab : lab manaaged controller name :
    I, 2010/09/17, 08:07:05.160, Initializing UI : Found service already installed with user account
    I, 2010/09/17, 08:07:05.160, NotManagedByLab = True
    I, 2010/09/17, 08:07:16.118, Checking whether account TfsTestAgent is a network service account or not
    V, 2010/09/17, 08:07:16.118, Created Nt account TfsTestAgent for userName TfsTestAgent
    V, 2010/09/17, 08:07:16.118, Found Sid S-1-5-21-1840410638-2533626498-2042444630-1009 for userName TfsTestAgent
    I, 2010/09/17, 08:07:16.118, Observed that account TfsTestAgent is network service account? False
    I, 2010/09/17, 08:07:16.118, Domain:
    I, 2010/09/17, 08:07:16.118, Final UserName: MITDEV\TfsTestAgent.
    I, 2010/09/17, 08:07:16.118, Loading account details for MITDEV\TfsTestAgent
    I, 2010/09/17, 08:07:16.118, Normalized account is MITDEV\TfsTestAgent and Sid is S-1-5-21-1840410638-2533626498-2042444630-1009
    I, 2010/09/17, 08:07:16.133, Agent configuration update pack details :
    I, 2010/09/17, 08:07:16.133, Run as interactive process : False
    I, 2010/09/17, 08:07:16.133, Network service name NT AUTHORITY\NETWORK SERVICE
    I, 2010/09/17, 08:07:16.133, User name : TfsTestAgent
    I, 2010/09/17, 08:07:16.133, Change Port : False
    I, 2010/09/17, 08:07:16.133, Chang eService Account : True
    I, 2010/09/17, 08:07:16.133, Change Test Controller : True
    I, 2010/09/17, 08:07:16.133, Test Controller Uri : tfs2010
    I, 2010/09/17, 08:07:16.133, Disable Screensaver : False
    I, 2010/09/17, 08:07:16.133, Enable autologon : False
    I, 2010/09/17, 08:07:16.133, Port : -1
    I, 2010/09/17, 08:07:16.227, Validating user name and password.
    I, 2010/09/17, 08:07:16.258, Validated user name and password.
    I, 2010/09/17, 08:07:16.258, Starting firewall configuration...
    E, 2010/09/17, 08:07:16.290, System.Runtime.InteropServices.COMException (0x800706D9): There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)
       at NetFwTypeLib.INetFwPolicy.get_CurrentProfile()
       at Microsoft.VisualStudio.TestTools.ConfigCore.Firewall.get_Installed()
    E, 2010/09/17, 08:07:16.290, System.Runtime.InteropServices.COMException (0x800706D9): There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)
       at NetFwTypeLib.INetFwPolicy.get_CurrentProfile()
       at Microsoft.VisualStudio.TestTools.ConfigCore.Firewall.get_Installed()
       at Microsoft.VisualStudio.TestTools.ConfigCore.BaseConfiguration.AddFirewallExceptionIfRequired(FirewallExceptionDataPacket[] applications, DelegateStatusUpdate progressListener, Boolean throwOnError)
    W, 2010/09/17, 08:07:16.290, 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, 2010/09/17, 08:07:16.290, Exception occured while adding executables 'Microsoft Visual Studio Test Agent 2010 Service' in firewall exception list. System.Runtime.InteropServices.COMException (0x800706D9): There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)
       at NetFwTypeLib.INetFwPolicy.get_CurrentProfile()
       at Microsoft.VisualStudio.TestTools.ConfigCore.Firewall.get_Installed()
       at Microsoft.VisualStudio.TestTools.ConfigCore.BaseConfiguration.AddFirewallExceptionIfRequired(FirewallExceptionDataPacket[] applications, DelegateStatusUpdate progressListener, Boolean throwOnError)
    I, 2010/09/17, 08:07:16.290, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine
    I, 2010/09/17, 08:07:16.290, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 32 bit hive
    I, 2010/09/17, 08:07:16.305, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 32 bit hive
    I, 2010/09/17, 08:07:16.305, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 64 bit hive
    I, 2010/09/17, 08:07:16.305, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentVersion=2.0.0 on agent machine - 64 bit hive
    I, 2010/09/17, 08:07:16.305, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine
    I, 2010/09/17, 08:07:16.305, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 32 bit hive
    I, 2010/09/17, 08:07:16.305, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 32 bit hive
    I, 2010/09/17, 08:07:16.305, Adding agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 64 bit hive
    I, 2010/09/17, 08:07:16.305, Added agent setting Microsoft.TeamFoundation.Lab.TestIntegration.AgentContractVersion=2 on agent machine - 64 bit hive
    I, 2010/09/17, 08:07:16.305, Adding agent setting InstallationPath=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on agent machine
    I, 2010/09/17, 08:07:16.305, Adding agent setting InstallationPath=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 32 bit hive
    I, 2010/09/17, 08:07:16.305, Added agent setting InstallationPath=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 32 bit hive
    I, 2010/09/17, 08:07:16.305, Adding agent setting InstallationPath=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 64 bit hive
    I, 2010/09/17, 08:07:16.305, Added agent setting InstallationPath=C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on agent machine - 64 bit hive
    I, 2010/09/17, 08:07:16.305, Creating event sources VSTTAgent
    I, 2010/09/17, 08:07:16.305, Creating event sources VSTTAgent
    I, 2010/09/17, 08:07:16.305, Event source VSTTAgent already exists.
    I, 2010/09/17, 08:07:16.305, Creating event sources VSTTAgentProcess
    I, 2010/09/17, 08:07:16.305, Event source VSTTAgentProcess already exists.
    I, 2010/09/17, 08:07:16.305, Adding event source for event logging
    I, 2010/09/17, 08:07:16.305, ResetForceGuestKey : Getting the value of ForceGuest key
    I, 2010/09/17, 08:07:16.305, ResetForceGuestKey : The value of ForceGuest key is 0
    I, 2010/09/17, 08:07:16.321, Updating the startup registry
    I, 2010/09/17, 08:07:16.321, Removing VSTTAgentProcess from Run registry
    I, 2010/09/17, 08:07:16.321, Starting service configuration...
    I, 2010/09/17, 08:07:16.321, Started checking the status of agent service VSTTAgent.
    I, 2010/09/17, 08:07:16.337, Found that service VSTTAgent is installed and its current status is Stopped
    I, 2010/09/17, 08:07:16.337, Controller service VSTTAgent is already installed, so not doing anything here.
    I, 2010/09/17, 08:07:16.337, Configured service successfully.
    I, 2010/09/17, 08:07:16.337, Setting Tcp Parameters
    V, 2010/09/17, 08:07:16.337, Setting Tcp Parameters in 32bit Hive
    V, 2010/09/17, 08:07:16.337, Setting Tcp Parameters in 32bit Hive completed.
    V, 2010/09/17, 08:07:16.337, Setting Tcp Parameters in 64bit Hive.
    V, 2010/09/17, 08:07:16.337, Setting Tcp Parameters in 64bit Hive completed.
    I, 2010/09/17, 08:07:16.337, Setting Tcp Parameters completed.
    I, 2010/09/17, 08:07:16.337, Registering this test agent with the test controller. This may take few minutes...
    I, 2010/09/17, 08:07:16.337, AgentConfiguration: Starting controller configuration.
    I, 2010/09/17, 08:07:16.337, GetControllerName : The controller name managed by lab is
    I, 2010/09/17, 08:07:16.337, GetControllerName : The controller name managed by lab is
    I, 2010/09/17, 08:07:16.337, AgentConfiguration: Found agent is not configured on any controller.
    I, 2010/09/17, 08:07:16.337, AgentConfiguration: Adding agent MITDEV on controller tfs2010.
    I, 2010/09/17, 08:07:16.337, Adding agent MITDEV running under tfs2010 to controller MITDEV\TfsTestAgent
    I, 2010/09/17, 08:07:16.368, Creating Channel
    E, 2010/09/17, 08:07:16.415, System.Runtime.Remoting.RemotingException: Server encountered an internal error. For more information, turn off customErrors in the server's .config file.

    Server stack trace:


    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.Execution.IControllerCommands.GetAgentProperties(String agentName)
       at Microsoft.VisualStudio.TestTools.ConfigCore.TestControllerHelper.AgentExists(String agentName, IControllerCommands controllerCmds)
       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, 2010/09/17, 08:07:16.415, DetermineDomain:: User: MITDEV\TfsTestAgent
    I, 2010/09/17, 08:07:16.415, Domain: MITDEV
    I, 2010/09/17, 08:07:16.415, Machine Name: MITDEV
    I, 2010/09/17, 08:07:16.415, Final Domain: .  Final username: TfsTestAgent
    E, 2010/09/17, 08:07:16.415, 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 tfs2010, 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 TfsTestAgent exists on the test controller machine, and that the Windows Firewall Settings on the test controller machine has "File and Printer Sharing" exception.

    Friday, September 17, 2010 4:02 PM

All replies

  • Hello,

    Here is an article offers detailed information about troubleshooting guide on visual studio test controller and agent you can refer to which I believe it could help you resolve the issue: http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/df043823-ffcf-46a4-9e47-1c4b8854ca13

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, September 21, 2010 5:04 AM
    Moderator
  • I've read through that article already, and as I mentioned in the original post, have tried changing my log settings to no avail.  There is no log information generated on the controller, and because the agent doesn't start correctly on the development server I can't get any more log information there.

     

    For this message: E, 2010/09/17, 08:07:16.415, System.Runtime.Remoting.RemotingException: Server encountered an internal error. For more information, turn off customErrors in the server's .config file.

     

    Which server is it saying needs to have the config file changed?  I changed the web.config on the TFS application tier server and this error message didn't change.

     

    Tuesday, September 21, 2010 12:12 PM
  • Hello,

    I think when it comes about turn off customErrors in the server's .config file, it indicates the debug configuration in web.config file for ASP.NET Applicaiton.

    On the second, I keep getting an error (I've attached the portion of the log below). 

    When does this error happen and where you find the log files? When you install the agent, are there any issues? If you go to Test->Manage Test Controllers, what is the status of that agent in the prompted dialog? What version of VS are you working with?

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, September 23, 2010 8:50 AM
    Moderator
  • Which ASP .NET application?  I can't tell if the error is being thrown by the test controller or the test agent configuration tool.  If I could determine where I need to disable custom errors, I can probably get the additional information I need.  I've already disabled them in the web.config for the TFS services, but that didn't seem to work.

    The error and log are both from within the Test Agent Configuration tool.  I get an error in the configuration results saying that it was unable to register with the controller, and I am able to view the log directly from the tool itself.  I had no problems installing the agent, only configuring it.  Based on the exception in the error log, it looks like it is failing to communicate with the controller, although I don't know why.

    The test agent does not even show in the Test Controllers view, because I am unable to register it with the test controller to begin with (so the controller doesn't even know it's there).  This is all in Visual Studio 2010.

    Thursday, September 23, 2010 3:02 PM
  • Please enable logging inside QTAgentProcessUI.exe.config and send the log file.(bill_bo8@hotmail.com)

     

    In order to make sure that logging works the account used to run  QTAgentProcessUI.exe must have read/write permissions to the folder where thew logging file is located

    To be on the safe site

     

    •Enable tracing via .config file(s):

    •One of the advantages of using config files is that you can enable tracing for each component independently and using trace settings specific only to this component.

    •For Controller Service/Agent Service/Agent Process, you need the following sections in the corresponding .config file (qtcontroller.exe.config, qtagentservice.exe.config, qtagent.exe.config, qtagent32.exe.config which by default are located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE):

    •Inside the <appSettings> section:

    <add key="CreateTraceListener" value="yes"/>

     

    •Inside the <configuration> section (note: “Verbose” is equivalent to “4”):

    <system.diagnostics>

      <switches>

        <add name="EqtTraceLevel" value="Verbose" />

      </switches>

    </system.diagnostics>

     

    •Trace files (by default these are created in the same directory as where controller/agent service/process is located, C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE):

    •Controller: vsttcontroller.log

    •Agent Service: vsttagent.log

    •Agent Process: VSTTAgentProcess.log

    •Important: please make sure that the location is writable by controller/agent service/process.

    Thursday, September 30, 2010 11:23 AM
  • I have enabled tracing in the file you mentioned, but nothing is being written.  Isn't that config only used when running the agent as an interactive process (I am attempting to set this up a service)?  I switched the configuration to run as a process and got the same error. 

     

    All that was in the log was this:

    I, 5672, 1, 2010/10/08, 10:29:23.044, MITDEV\QTAgentProcessUI.exe, Create trace listener in path: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE FileName: VSTTAgentUI.log
    V, 5672, 1, 2010/10/08, 10:29:23.075, MITDEV\QTAgentProcessUI.exe, ExecutionUtilities.RegisterIpcClientServerChannel: Registering IPC channel on IPC port 'eqt-508258cd-87ad-60e1-a468-78fc08bbad96'
    V, 5672, 1, 2010/10/08, 10:29:23.091, MITDEV\QTAgentProcessUI.exe, ExecutionUtilities.RegisterIpcClientServerChannel: Successfully registered IPC channel on IPC port 'eqt-508258cd-87ad-60e1-a468-78fc08bbad96'
    I, 5672, 1, 2010/10/08, 10:29:24.216, MITDEV\QTAgentProcessUI.exe, Found that HyperV DataExchange service is not installed. So agent is not running in a lab.

     

    Since it can't connect to the test controller, nothing is being run.  What .config do I need to change to see why it is failing to connect in the original error message I posted?

    Friday, October 08, 2010 5:34 PM
  • Hi,

    If you have not resolved your issue or gained info at this time, you may want to consider support options.


    My suggestion is to see about what options to check out first, here is some info for more in depth level into the problems through support.

    There are various support options such as advisory and per issue. Please visit the below link to see the various paid

    support options that are available to better meet your needs.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone


    bill boyce

    bill boyce
    Tuesday, November 30, 2010 7:46 PM
  • Have you given the administrative rights for the account on both agent and the controller machines?
    ---Mark this post if this Answers or Helps---
    Cheers
    FunnyFox
    Wednesday, December 01, 2010 1:27 AM