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
-
Dynamic block allows to create nested multi level block structures in terraform code. Conditional usage of such blocks are really useful in...
-
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...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
No comments:
Post a Comment