I have setup one TFS On-Premise Build Agent as a service using the instructions listed here. I setup the accompanying Agent pool, permissions, build controller, etc.. and worked through most of the setup challenges around getting the agent to connect and run. I now have a agent that is connected and able to run builds:
My configuration looks something like this:
"settings.json" - "ServerURL": http://tfs.XXXXXXXXX.com:80/tfs
"Listen for Build Agent communication on:" http://XXXXXXXXXXX.com:9191/Build/v5.0/Services
But when I try to run any build using my newly configured Agent Pool it always fails when an entry in the Agent's log:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
The Agent failed to start this job. Error: An error occurred while sending the request.
This is very confusing to me because nowhere in my TFS configuration am I using SSL. How would it fail on a bad certificate(in this case self-signed) if I'm not using port 443 to connect to it. When I connect through a web browser(firefox) to that location I'm not automatically redirected to "https". Is the agent somehow being redirected? Again, I'm able to connect without issue(or failing certificate) to the listed URLs, but It seems for some reasons the agent is not.
I'm not sure if I'm the only one who's got this issue. I think this is related, but not the same version of software. There's a million other references to this error message, but I don't see a single one with the same context or configuration. Has anyone ever seen this issue before?