"Test agent could not connect to the test controller" VS2013 Agents - visual-studio-2013

I am receiving the error when trying to register a test agent to the load test controller
Configuration started on 2015/10/16, 16:05:47.
OS Version : Microsoft Windows NT 6.3.9600.0
Executable version : 12.0.21005.1
I, 2015/10/16, 16:06:07.812, Restarted service successfully.
I, 2015/10/16, 16:06:07.968, Verifying that the test agent is able to connect to the test controller.
E, 2015/10/16, 16:08:10.005, Test agent could not connect to the test controller.
I, 2015/10/16, 16:08:10.005, Disabling auto logon on the machine...
I, 2015/10/16, 16:08:10.005, Adding agent setting AutoLogonEnabledByAgentConfiguration=0 on agent machine
In the windows event log, this is seen:
Unable to connect to the controller on 'machinename:6901'. The server has rejected the client credentials.
The logon attempt failed
I've tried all I can find for people that have reported similar issues (Firewall is disabled, no antivirus, UAC is disabled, user is in admin group as well as TeamTestAgentService/ControllerAdmins/ControllerUsers). I've tried running the setup under different users/same user/"as admin" while still using the same username/pass for the log on. Trying to point different machines Test Agents to this controller and the same error occurs. Per another site, I also tried adding this to QTAgentService.exe.config
<appSettings>
<add key="BindTo" value="x.x.x.x"/>
</appSettings>
I have also tried using a different account for the Controller vs Test Agent. IE Both CtrlUser and TestUser are in the same groups listed above. As I understand it thought, this should work since they should be the same name/pass for Workgroup authentication.
I've referenced these pages among others and unless I've missed something, those solutions do not apply.
"Test Agent could not connect to the test controller" VS2012 Agents
VS2013 Test agent and controller not communicating
VS2013 Remote load test agent can't connect to controller
https://social.msdn.microsoft.com/Forums/en-US/59bc2270-37d9-4297-ac3f-e0da21d10a95/test-agent-could-not-connect-to-the-test-controller-vs2012-agents
Any thoughts/suggestions?

I was using a version downloaded by a prior employee that we have been using for CodedUI testing (12.0.21005.1). I downloaded the latest version (2013 Update 5) and after installing that, it worked with the same settings I was using before.

Related

Visual Studio 2017 Load Test “No such host is known” with remote controller

Issue: When running a load test from my client, with a remote controller on a second machine and a remote agent on a third machine, I receive the following error
Error 8/28/2017 6:59:18 AM Failed to queue test run '': No
such host is known.
I have Visual Studio 2017 on my client. The 2017 Test Controller is installed and configured on a second machine running Windows Server 2016. The 2017 Test Agent is installed and configured on a third machine running Windows Server 2016. The Test DB is on SQL Express on the second machine, same box as the Test Controller.
The configuration of all items worked fine (Test Controller, Test Agent, etc) without any issues or errors.
I installed VS 2017 on the Test Controller machine and was able to run tests without issue.
I can debug from my client without issue, but when I try RUNNING the test, it states the error above.
I can "manage test controllers" and see my controller, as well as the test agent listed, all in "ready status." Additionally, setting the LoadTest DB has a "test connection successful" message when setting it up.
My current .testsettings file is set up with the role to have all agents associated with my test controller be for running tests. It is set as the active test setting.
I've put the FQDN in all the setup, and added all the associated machines to the host files on each box.
The firewall has been disabled on every box to try that to no avail. Network Sharing is on, Printer sharing is on, ports are open. Verified this with port scanners, checking settings on the servers, and I can ping and NSLookUp each box from each other.
I've tried recording brand new tests and running existing tests (ones that worked if I ran VS2017 on the Test Controller) to no avail.
At this point, I'm really not sure what else to do or try, nor what other information to provide. I'm dumbfounded as I've read all the troubleshooting docs on network permissions, local permissions, etc. The only thing I haven't done is made an AD group for the machines involved and adding those to local admin groups.
If anyone could help, PLEASE, feel free to ask questions and I'll do my best to provide the info.
You can confirm these:
Create a load test in VS17.
On one computer, you configure a test controller in a domain.
On another computer, you configure a test agent in a different domain.
Note: The two domains trust one another.
You run the load test on the test controller computer and the test agent computer.
Edit:
Connect your controller computer and get its hostname.
Go to host file "C:\Windows\System32\drivers\etc".
And add hostname as IP address.
At last VS17 will successfully connected to your controller.
I had the same issue. The problem is that there was no route BACK to the client. I needed to add a fully qualified entry for the cient to the hosts file on the controller. This was compunded by using a VPN to Azure.
To clarify you need the FQDN of your client added to the hosts file of your controller.

Web Test Fails With SocketException

I have recorded a simple web test in VS 2013 Ultimate and im attempting to run it on a remote agent.
I get the following error:
Request failed: No connection could be made because the target machine actively refused it 127.0.0.1:23109
If i change my run settings to only run the test locally it succeeds.
When i view the "Manage Test Controller" dialog the agents are registered and in the ready state.
I have checked the Controller and agent LAN settings and none of them is configured (or required) to use a proxy.
Does anyone have any idea whats going on?
So the problem was the Internet Explorer security settings on the agents and also Internet explorer was configured to use a proxy on the agents.
I logged onto the server and checked this initially but as my own user account. I then checked by logging on as the user the agents run as and removed the configured proxy from IE, lowered the security settings and all was well.

Test Controller exception: No such host is known

I'm getting following errors on the test controller machine, when I'm trying to run CodedUI Tests remotely:
(QTController.exe, PID 3032, Thread 12)
ControllerDeployment.DoDeployment: System.Net.Sockets.SocketException
(0x80004005): No such host is known
During controller and agent configuration no errors came up. And when I go to Manage test controller dialog in Visual Studio I can see all the agents active. But when I try to execute any CodedUI test remotely it's hanging forever.
Not sure if it's connected with the fact that I've upgraded client/controller/agents to 2012 versions recently, but I've started seeing the problem only after this upgrade.
From Microsoft KB 2643086:
This issue occurs because the test agent computer sends its Network
Basic Input/Output System (NetBIOS) name instead of sending its Fully
Qualified Domain Name (FQDN) name to the test controller computer.
When the DNS server of the test controller computer does not have the
IP address mapping of the NetBIOS name of the test agent computer, the
issue that is described in the "Symptoms" section occurs.
You should ensure you are using fully qualified domain names (FQDN).
There is also a hotfix is available from Microsoft. However, you have to contact Microsoft Customer Support Services to obtain the hotfix.
I had similar problem, still not completely resolved but a workaround is to install Visual Studio on controller box and keeping result DB on same box.
Mostly the issue is restriction / firewall on VPN which might be blocking incoming traffic on TCP ports of machine / laptop.

WebDeploy - just can't get it to work

I've installed Web Deploy 2.1 on a Server 2008 R2 running under VMWare.
In the IIS Manager (Management Service applet) I can see that "Enable Remote Connections" is checked and the port is set to 8172. Under "IIS Manager Permissions" I've added my Windows account (CORP\ekkis) and under the "Authentication" applet (for IIS) I have enabled "Windows Authentication".
I've also turned off the firewall.
So from the command line I test the system to work like this:
C:\Program Files\IIS\Microsoft Web Deploy V2>msdeploy -verb:dump -source:contentPath=\temp,wmsvc=192.168.0.70,username=CORP\ekkis,password=MyPass,authType=Basic -allowUntrusted=True
and get this:
Info: Using ID '9b954a0f-ff07-4e77-ba2c-d27472f5fda0' for connections to the rem
ote server.
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the destination computer ("192.168.0.70") using t
he Web Management Service, but could not authorize. Make sure that you are using
the correct user name and password, that the site you are connecting to exists,
and that the credentials represent a user who has permissions to access the sit
e.
Error: Object of type 'contentPath' and path '\temp' cannot be created.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.
I've also tried deploying with Visual Studio 2010 from the host OS with the following service urls (I haven't found proper documentation on how to form this url):
https://192.168.0.70/
https://192.168.0.70:8172/
https://192.168.0.70:8172/MsDeployAgentService/
https://192.168.0.70/MsDeployAgentService/
I've tried the non-secure versions as well but just cannot get it to work. What is the correct format for the url? and what permissions am I missing?
the errors from VS have varied depending on how I attempt it but below is a sample:
Could not complete the request to remote agent URL 'http://192.168.0.70:8172//MSDEPLOYAGENTSERVICE'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
there really should be a guide out there to do this (yes, I've googled myself blue in the face)!
thanks - ekkis
ok, I've figured out that the correct url is:
https://192.168.0.70:8172/MsDeploy.axd
and that having the "Windows Authentication" enabled doesn't seem to make a difference. Also, having my account in the "Managers" list doesn't seem to make a difference either.
so the back end was all working fine (I've turned off the Web Deployment Agent Service). it was just the url I had wrong.

TFS 2010: Service Unavailable 503

I've been trying to solve this problem for about a week now. I posted this question on Microsoft website and only received one reply, which did not solve my issue. The following is a combination of my posts on Microsoft website.
I installed and configured TFS 2010 on Window 7 PC 64-bit. When I navigate to http://localhost:8080/tfs in my browser, I get
Service Unavailable – HTTP Error 503. The service is unavailable.
Any help to solve this problem would be greatly appreciated.
Based on previous reading, I have done much work to figure this out. Following are the steps I have gone through to solve this issues. The list is fairly long, but I want to make sure all the information that may be pertinent to solving this problem is available.
I have uninstalled and reinstalled TFS many times
The application pool "Microsoft Team Foundation Server Application Pool" is running
The application pool "Microsoft Team Foundation Server Web Access Application Pool" is running
Other website in IIS that point to the "ASP.NET v4.0" app pool seem to run fine.
If I point my other sites to "Microsoft Team Foundation Server Application Pool" they
seems to run fine
The Windows user "TFS" is in the following rolls: Administrator, IIS_IUSRS, - TFS_APPTIER_SERVICE_WPG, Users
I'm able to run SQL Server Management Studio (SSMS) as the user "TFS" and access the databases "Tfs_Configuration" and "Tfs_DefaultCollection"
I have confirm the account for "TFS" is not disabled or expired
For IIS application "Team Foundation Server", I Configured "Failed Request Tracing Rules" to log status codes 401.3-999
After IIS Reset and browser refresh, no files in the "FailedReqLogFiles" directory
No log information in IIS Logs
In Team Foundation Server Administration Console, I can change account info(Update Password, Change Account, Reapply Account).
In Team Foundation Server Administration Console, when I try to changing Group Membership or Administer Security I get the error "Team Foundation services are not available from server http://localhost:8080/tfs. Technical information (for administrator): HTTP code 503: Service Unavailable"
In Event Viewer, I do not see anything that may be of value
In Sql Server Configuration Manager, confirmed "SQL Native Client 10.0 Configuration - (32bit)", "SQL Server Network Configuration", and "SQL Native Client 10 Configuration" all have the following protocols enabled (Shared Memory, TCP/IP, and Named Pipes"
In IE confirmed that that Proxy server is not enable.
I installed Team Foundation Server 2010 Power Tools. The following are the Critical Issues returned by the tool
Accessing "AuthorizationService" Web service at "/DefaultCollection/Services/v3.0/AuthorizationService3.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
Accessing "BuildService" Web service at "/DefaultCollection/Build/v3.0/BuildService.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The Web service call "CommonStructureService.ListAllProjects" at "/Services/v1.0/CommonStructureService.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable."
Accessing "GroupSecurityService" Web service at "/DefaultCollection/Services/v1.0/GroupSecurityService.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
Accessing "IdentityManagementService" Web service at "/DefaultCollection/Services/v3.0/IdentityManagementService.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The Web service call "Integration Services ProcessTemplate.GetTemplateName" at http://MyServer:8080/tfs/DefaultCollection/Services/v1.0/ProcessTemplate.asmx failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
Accessing "LabService" Web service at "/DefaultCollection/Lab/v3.0/LabService.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The Web service call "ProcessTemplate.TemplateHeaders" at "/Services/v1.0/ProcessTemplate.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable."
Accessing "Repository" Web service at "/DefaultCollection/VersionControl/v1.0/repository.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
Accessing "SecurityService" Web service at "/DefaultCollection/Services/v3.0/SecurityService.asmx" failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The Web service call "TeamProjectCollection.GetDefaultCollectionId" at http://MyServer:8080/tfs/TeamFoundation/Administration/v3.0/TeamProjectCollectionService.asmx failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The Web service call "VersionControl.Administration.QueryRepositoryInformation" at http://MyServer:8080/tfs/DefaultCollection/VersionControl/v1.0/administration.asmx failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The Web service call "VersionControl.Administration.QueryRepositoryInformation" at http://MyServer:8080/tfs/DefaultCollection/VersionControl/v1.0/administration.asmx failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The Web service call "ConfigurationSettings.ServiceGetWorkitemTrackingVersion" at http://MyServer:8080/tfs/DefaultCollection/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx failed. Error message: "The remote server returned an error: (503) Server Unavailable.".
The follow are additional issues that were not critical:
SharePoint Products is not installed or integrated with Team Foundation Server.
Team Foundation Server is not configured to use the data warehouse.
Team Foundation Server is not configured to use Report Manager.
Results for rules that require access to Team Foundation Build cannot be included in the report.
Cannot validate the configuration of Visual Studio Lab Management. Results for rules that check the health of Visual Studio Lab Management will not be included in the report.
Paged pool memory on MyServer is over the warning threshold of 180 MB. This may not be a problem if a backup is currently in progress. Current value: 490 MB.
The follow are Information Items:
Computer: MyServer. Manufacturer: System manufacturer. Model: System Product Name.
The application tier connected to Team Foundation Server at 12/2/2010 9:09:49 PM.
The connection string in config file c:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web ervices\Web.config on MyServer is: Data Source=MyServer;Initial Catalog=Tfs_Configuration;Integrated Security=True;.
The connection string stored in the Team Foundation Server registry is: Data Source=MyServer;Initial atalog=Tfs_Configuration;Integrated Security=True.
Logical disk C: on MyServer is 500 GB in size.
No Sharepoint Site is configured for this Team Project Collection "DefaultCollection".
No Sharepoint Site is configured for this Team Project Collection "DefaultCollection".
The MyServer is running the 64-bit version of Windows.
The SQL Server (MSSQLSERVER) service on MyServer is configured to run as user NT AUTHORITY\NETWORK SERVICE.
The account Identity for the Team Foundation Server application pool on MyServer is MyServer\TFS. This is the same as the Team Foundation Server service account.
The Team Foundation Server Product Version is 10.0.30319.317
The Team Foundation Server Service Level is Tfs2010.RTM.KB2135068.P#3.
The MyServer has 1 processor(s) installed.
The MyServer has 6134 MB of memory installed.
Volume C:\ on MyServer is a mount point.
I started up a Virtual Machine with Windows 7. Installed and configured TFS. Everything seems to work fine on the Virtual Machine. With an environment working, I started to compare differences between the two.
Here are some of the differences I found between the two environments:
My primary computer is 64-bit and the Virtual Machine is 32-bit.
On my primary computer, IIS "Team Foundation Server Website" has a "aspnet_client" directory. On the virtual machine, this directory does not exist
On my primary computer, in IIS Manager for "Team Foundation Server" the section ASP.NET are the same on both my primary computer and virtual machine.
On my primary computer, IIS Manager IIS Section has these additional feature that the virtual machine does not include (ASP, Authorization Rules, CGI, IP Address and Domains, and WebDav Authorization)
On my primary computer, IIS Application Pool setting has a property call "Enabled 32-Bit Application". This was set to false and I changed it to true. Understandably this feature is not available on the virtual machine.
Thanks.
My application pool had been stopped as well and when I looked into why or how, I discovered that it was running under a domain account of one of our admins who initially installed TFS (months ago).
B/C of a corporate domain policy, he was forced to recently enter a new password for his account. Then after business hours last night, an update was applied to the IIS server on which TFS runs, and the update required a reboot. B/C the password of the identity under which the app pool runs had changed, IIS could not restart the pool, as the identity was still set to the original domain account and password.
Once I had the admin enter his new password with the app pool's identity, the pool would restart. However, b/c corporate enforces password expiration like every 90 days, I ultimately changed the identity to local system account in order to avoid this problem in the future (choosing local system may not be the best choice).
Start -> Administrative Tools -> IIS
{Server name} -> Application Pools
Right Click on Microsoft Team Foundation Server Application Pool -> Advanced Settings
Identity -> Choose Custom Account -> Click Set -> Enter the username and password of the system admin
Stop then Start Microsoft Team Foundation Server Message Queue Application Pool
Stop then Start Microsoft Team Foundation Server Application Pool
I got this error as well. In the application pool there is a TFS App Pool that was stopped. Once this was started again the 503 error stopped occuring
I never got it to work. I created a VM and installed Team Foundation Server (TFS) 2010 and everything seem to work good. To conclude, I'm not sure what was wrong, but if I install it on a fresh server everything works fine
The very first thing you must do is to ensure that the application pool is running.
I just ran into this problem. Our TFS server is not part of a domain. I noticed that the HTTP log file seemed to list IPv6 addresses at times and at other times IPv4.
I turned off IPv6 and we were able to once again connect to TFS.
Uncheck Limit connection on IIS to solve this problem.
Limiting Connections (IIS 6.0)
In my case... (my problems aren't related to how TFS is setup but accessed from a workstation)
I work for a large bank and have a sophisticated firewall/proxy - suffice it to say I have had to play with clicking various options to properly connect to our TFS AND connect to the Internet (to download Visual Studio extensions). I fix my error under the proxy settings in IE under OPTIONS | Connections | LAN Settings...
I've had some 503 errors from TFS myself, if my memory serves correctly (I can't test much as my test server is currently down) I had some issues with the versions of ASP.NET the TFS website was configured to use.
Check that ASP.NET is configured to use version 4.0 in IIS (right click the site > Properties > ASP.NET). Also make sure that no other non TFS sites are in the same application pool as your TFS site (actually a virtual directory in your TFS site) and configured separately (they don't seem to play well together!).
I just checked my team foundation services from application pool through inetmgr and found my services was not running.i started it and now i am able to connect to the server.
After installing several times I got it working with installing SQL Server 2008 R2 (Developer) instead of using SQLExpress.
I encountered the same problem today.
Resolution is start installation distrib of TFS and repair product
(in my way i re-install only tfs 2010 service pack 1).
Go to Application Tier in TFS Administration Console and change account; it may fix the problem
I very recently ran into a similar issue. One of our tools sporadically failed when attempting to contact our TFS resource. Comparing the machines in our TFS VIP, only one machine had IIS errors, namely (truncated): 503 8080 QueueFull Microsoft+Team+Foundation+Server+Application+Pool. A quick comparison of app pool settings showed that the good machine had a queue length of 1000, the bad had only 10. 1000 might be excessive, but 10 was apparently too small. I am yet to verify that changing queue length from 10 to 1000 fixed my issue. Hopefully I remember to complete my post! Hope this helps someone...
If the TFS server name is longer than 15 characters it could be an issue with the netbios name being different than the servername. In our case the AppFabric Service was crashing, and we had to use the following to fix the Cache Host name:
http://www.andrewjbillings.com/long-server-name-causing-app-fabric-service-to-crash/
This resolved the TF24668: The following team project collection is stopped errors that we were getting, along with some TF400732: The request has been canceled. and TF246066: Team Foundation Server is offline. error messages
I have TFS installed on my local machine and TFS is running under custom account.
I solved 503 error by setting the App Pool credentials again (Microsoft Team Foundation Server Application Pool and Microsoft Team Foundation Server Message Queue Application Pool)
Another, pretty special reason could be, that you set "Logon as a batch job" in AD explicitly. If you do not specify this setting it defaults to "Administrators;Backup Operators". If you overwrite it e. g. to allow a custom account to schedule a task you must make to not forget adding the default values. Else exactly this problem 503 Service unavailable and a stopped app pool appears.

Resources