You might encounter “Deployment on this environment was cancelled.” when you have setup a new build/release agent and try to do a deployment, with on premise TFS. It is a confusing error message and not enough information at all to identify the issue. How to identify where the problem is easier if the agent is on premise. Then you have the ability to look at additional diagnostic logs. Lets look at one example scenario you are getting this error.
The following links discussing the issue might be useful.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9e0b3c33-fe7f-4b28-bb88-005c0a1ec01a/vsts-deployment-on-this-environment-was-cancelled?forum=TFService
http://answers.flyppdevportal.com/MVC/Post/Thread/56e9ec27-d8a6-4543-8811-029e3b0340d0?category=tfservice
When checked in the _diag folder logs, this particular issue revealed it was due to untrusted certificate.
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.
08:08:58.214252 at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
08:08:58.214252 at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
08:08:58.214252 --- End of inner exception stack trace ---
08:08:58.214252 at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
08:08:58.214252 at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
08:08:58.214252 --- End of inner exception stack trace ---
The TFS instance had a SSL configured with a privately generated certificate. To fix the issue had to add the certificate to the Trusted Root Certificates of the agent machine. This enabled the agent to work with the TFS.
Subscribe to:
Post Comments (Atom)
Popular Posts
-
az aks get-credentials is used to get the kubeconfig updated so that we can access AKS clusters from a terminal (You need to first use az ...
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
GitHub Actions are the CI/CD workflow implementation tool built into GitHub repos. While using the GitHub Actions workflows you may want to ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
-
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...
No comments:
Post a Comment