TFS 2017 Agent: and error occured while sending the request - tfs

I have a personal laptop running Windows 10 Home edition.
I log into the laptop with my hotmail account.
I installed TFS 2017 locally and I have it woring in the browser. I can clone the repository and push to it.
Now when I try to setup the build I have to add an agent. I downloaded the agent and when I try to configure it I get this:
PS D:\TfsAgent> .\config.cmd
Connect:
Enter server URL > http://localhost:8080/tfs/
Enter authentication type (press enter for Integrated) >
Connecting to server ...
An error occurred while sending the request.
Failed to connect. Try again or ctrl-c to quit
Enter server URL >
Soo, for some reason an error happens when it tries to connect to the server.
I do not see any verbose parameter to the config.cmd or any logs for that matter.
Any reasons why?

Home edition of Windows does not support the full TCP stack nor does it have all of the tools expected by applications. You need Professional edition at a minimum.
I would recommend that you go to http://tfs.visualstudio.com and let Microsoft provision you a free TFS instance that you can use.

Related

TFS 2017 - Build Agent Connection Error - Failed to Connect

We have a 3 tier TFS environment: 1 application server, 1 build server and 1 DB Server. TFS 2017 is installed and configured. We are attempting to connect the Build server with the Application server using config.cmd but receive the following error:
PS D:\agent01> .\config.cmd
Connect:
Enter server URL > https://tfs.domain.com
Enter authentication type (press enter for Integrated) >
Connecting to server ...
An error occurred while sending the request.
Failed to connect. Try again or ctrl-c to quit
Firewall Settings:
Source: TFS Build Server
Destination: TFS Application Server
Ports: 443 and 8080
What other ports need to be allowed between servers?
Since you are using https as your public TFS url.
Please make sure you have created the Self Signed Certificate over TFS server and installed the same over build agent machine.
More details take a look at this similar issue here: TFS Build Agent Fails to Configure & Run with TFS2018 Self-Signed SSL Certificate
If you still have the same error after above actions, then please give a try with below steps which may help to narrow down the issue:
Make sure you add the user running the installation of agent, to the
pool and queue administrators
Try to use PAT if you are using username/passwoard
Temporarily turn off the firewall and try again
I reimported the wildcard certificate and I imported DigiCert High Assurance CA in Trusted Root on both TFS Build and Application server.

Azure remote debugger from Visual Studio not working

I was able to remotely debug this website before. Now when I try to do it, through VS 2013 Server Explorer (Attach debugger), it is giving me
The following error occurred while launching remote debugging: Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named 'mywebsite.azurewebsites.net'. The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.
This website has a certificate and it's running over https. The remote debugging is enabled in the Settings with the correct VS version.
I have two other websites on this host and I can attach a debugger to them.
It is driving me crazy, I have googled and tried all the suggested solutions but it just seems that the remote debugger is not responding form Azure.
Even when attaching manually (https://stackoverflow.com/a/35738995/1057052), I still get the same error in return.

Why is Web Deploy using the wrong account?

I've verified that Web Deploy works (using NTLM authorization) when I fire it from Visual Studio on my local machine. Now I want my build server to auto-deploy (if appropriate) every night. I'm using Jenkins on the build server, and I've granted the account access in IIS on the remote machine. My parameters to MSBuild are as follows:
/p:DeployOnBuild=true
/p:Configuration=Debug
/p:Platform=x86
/p:PublishProfile=DEV
/p:AuthType=NTLM
/p:AllowUntrustedCertificate=True
/p:Username=
The DEV publish profile specifies my DEV server which uses a self-signed certificate thus necessitating an untrusted certificate. The NTLM and blank username should use the current user/account to connect.
However, the Jenkins' job's MSBuild step fails with this error
msdeploy error ERROR_USER_UNAUTHORIZED: Web deployment task failed. (Connected to the remote computer ("DEV-SERVER") using the 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 site. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.)
When I look at the IIS logs on DEV-SERVER, I see the following:
2016-01-06 23:55:10 159.212.19.186 HEAD /msdeploy.axd site=MySite 8172 - 159.212.19.123 - 401 2 5 0
2016-01-06 23:55:10 159.212.19.186 HEAD /msdeploy.axd site=MySite 8172 CO\BUILD-SERVER$ 159.212.19.123 - 401 2 64 78
I was expecting to see CO\jenkins, the account Jenkins is running under, instead of CO\BUILD-SERVER$. (And what's with the $ on the end?) Am I correct in thinking the wrong account is being used? What do I need to do to get this working?
CO\BUILD-SERVER$ is the machine account of your build server.
If you have a slave running on that machine, is it running as a windows service? If so it's probably running as "System"
Also re Selenium tests, if the tests are running on the build server then the service may need to set to run interactively so that the tests can run against a UI.

TFS 2013 Release Management Client not communicating with Server

I am trying to configure Release Management Client to work with a Release Management Server for Microsoft TFS 2013 on a Windows Server 2008 R2 Standard.
I installed (without any errors) the following two from our subscription downloads:
en_release_management_server_for_team_foundation_server_2013_with_update_4_x64_web_installer_5920525
en_release_management_client_for_visual_studio_2013_with_update_4_x86_x64_web_installer_5920526
I have not installed any Microsoft Deployment Agents.
I have installed and configured the RM server for a SQLExpress db (different from the TFS db in our case) and for now I used my own network credentials (being a member of Administrators group on the server and a member of Default Collection Administrators on TFS, with "Make requests on behalf of others" set to "Allow" on TFS).
When I copy the RM Server URL from "Configure Release Management Server" screen (http://xxx:1000/ReleaseManagement) and paste it into a browser, the page loads without any errors.
However, when the same URL is used in RM Client Configuration, I get an error: "The server specified could not be reached":
We have VS2012 on the server and VS2013 Ultimate on my own dev machine.
I tried installing and configuring the client on both the server (Win Server 2008 R2 Standard) and my dev machine (Win 8.1 Pro), and I still get the same error (so I assume the version of VS is not an issue).
Looking at the event log, I get two errors.
ERROR ONE:
The remote server returned an error: (404) Not Found.: \r\n\r\n at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.TeamFoundation.Release.Data.WebRequest.PlatformHttpClient.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.TeamFoundation.Release.Data.WebRequest.RestClientResponseRetriever.EndGetAsyncMemoryStreamFromResponse(IAsyncResult asyncResult, IPlatformHttpClient platformHttpClient)
.... [edited out for brevity]
Process Name: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\Client\bin\ReleaseManagementConsole.exe
ERROR TWO:
Error communicating to the web server URL: http://xxx:1000/ReleaseManagement/account/releaseManagementService/_apis/releaseManagement/
Indeed, when I enter that URL in a browser, I get "404 - File or directory not found". Here is what the site structure is:
What I should do to be able to configure our Release Management Client without errors, please?
Additional observations:
I cannot see "Release Management" role on our server, but have seen in mentioned in relation to RM installs.
The client installer reads "Release Management Client for Visual Studio 2013 Update 4", whereas instructions here indicate it should be "Release Management Client for Team Foundation Server 2013 Update 4". Surprisingly, when I ran the installer recommended by that article, the title again read "...for Visual Studio" as opposed to "...for Team Foundation Server".
Many thanks in advance!
You're entering the wrong URL. The URL should be http://<RM Server Name>:<Port>. No /ReleaseManagement/.
The /ReleaseManagement/ folder is not for the desktop client, but rather for the approval dashboard.

MSDeploy WMSVC is not working in .net environment

I have a build/test server which is currently running Jenkins for my continuous integration and it also is acting as my test server where code will be deployed to once built (i hope to rectify this and seperate these at a later date when budget allows)
I have a .NET web solution (nothing complex just Umbraco essentially) that i have in SVN and Jenkins is now building correctly. I now want to deploy it onto the same server using MSDeploy. After the build completes the package is generated but the deploy fails with the error
ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("xxxxx.xxxxxxx.xxx.xxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started
Here is my msbuild parameters that Jenkins uses
/P:Configuration=Release
/P:DeployOnBuild=True
/P:MSDeployPublishMethod=WMSVC
/P:DeployTarget=MSDeployPublish
/P:PublishProfile=GetSomePixels
/P:MsDeployServiceUrl=https://build.########
/P:AllowUntrustedCertificate=True
/P:CreatePackageOnPublish=True
/P:UserName=#######
/P:Password=########
I've checked the server and the Web Management Service is running and is starting up manually
I've also gone into IIS 8 manager (server 2012) and checked the "Allow Remote Connections" box under "Management Service". Restarted IIS and the WMSVC and still not working.
If i go to https://myserver.co.uk:8172/MsDeploy.axd in a browser it resolves (gives you the warning about an untrusted cert) and then displays a blank page.
Anyone got any ideas as to what i can do? I thought that it may be firewall related and even though it had added an exception to windows firewall for 8172 i have turned the entire firewall off to completely rulle that out and still no luck.
Have run this on the server to check its listening on the correct port
C:\Users\Administrator>netstat -a | findstr 8172
TCP 0.0.0.0:8172 GSP-BUILD:0 LISTENING
TCP [::]:8172 GSP-BUILD:0 LISTENING
Ok i've resolved this. It appears you have to activate the web management service first and then install web deploy and i'd done it the other way round. I uninstalled WebDeploy and re-installed it, restarted the server and its working
Agree with comment.
We had a similar issue. Initial installation even post Web Management Service activation appeared to be incomplete. In our case, even though the service said it was started we couldn't achieve the "green tick" when testing the connection from the Publish dialog when defining a profile.
Reinstalling WebDeploy 3.6 made it function properly.

Resources