Ibrahim ben Salah
Ibrahim ben Salah

Reputation: 733

VSTS fails only when triggered by a commit

VSTS build definition is configured with 'continuous integration' enabled and when a commit is detected the build queued but it fails immediately, by immediately i really mean immediately, even before Get sources task. Also I don't get any log information from the detail page of the failed build, just a big white empty canvas, event with system.debug is set to true.

enter image description here

Furthermore I tried different branch settings in Branch property of Get sources task and Branch filter of the CI settings page, varying from 'develop', 'refs/heads/develop', '', 'refs/heads/' etc... and again no success

The agent running the build and the external git repository are behind a firewall (intranet). I assume the failure has somehow to do with that but have no idea how to work around it.

Has anybody experienced the same issues and has found a solution?

EDIT:

@jessehouwing pointed me to look into _diag and there I found this error message but still looking around to find information about the cause of this:

[2017-12-22 14:56:14Z WARN VisualStudioServices] Authentication failed with status code 401.
Date: Fri, 22 Dec 2017 14:56:13 GMT
P3P: CP="CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"
Server: Microsoft-IIS/10.0
WWW-Authenticate: Bearer authorization_uri=https://login.microsoftonline.com/0278d500-4cee-4ff3-ba11-a727fc9c10bb, Basic realm="https://tfsprodweu2.app.visualstudio.com/", TFS-Federated
X-TFS-ProcessId: *************************************
Strict-Transport-Security: max-age=31536000; includeSubDomains
ActivityId: *************************************
X-TFS-Session: *************************************
X-VSS-E2EID: *************************************
X-FRAME-OPTIONS: SAMEORIGIN
X-TFS-FedAuthRealm: https://tfsprodweu2.app.visualstudio.com/
X-TFS-FedAuthIssuer: https://ridercorp.visualstudio.com/
X-VSS-AuthorizationEndpoint: https://ridercorp.vssps.visualstudio.com/
X-VSS-ResourceTenant: *************************************
X-TFS-SoapException: %3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3Csoap%3AEnvelope%20xmlns%3Asoap%3D%22http%3A%2F%2Fwww.w3.org%2F2003%2F05%2Fsoap-envelope%22%3E%3Csoap%3ABody%3E%3Csoap%3AFault%3E%3Csoap%3ACode%3E%3Csoap%3AValue%3Esoap%3AReceiver%3C%2Fsoap%3AValue%3E%3Csoap%3ASubcode%3E%3Csoap%3AValue%3EUnauthorizedRequestException%3C%2Fsoap%3AValue%3E%3C%2Fsoap%3ASubcode%3E%3C%2Fsoap%3ACode%3E%3Csoap%3AReason%3E%3Csoap%3AText%20xml%3Alang%3D%22en%22%3ETF400813%3A%20Resource%20not%20available%20for%20anonymous%20access.%20Client%20authentication%20required.%3C%2Fsoap%3AText%3E%3C%2Fsoap%3AReason%3E%3C%2Fsoap%3AFault%3E%3C%2Fsoap%3ABody%3E%3C%2Fsoap%3AEnvelope%3E
X-TFS-ServiceError: TF400813%3A%20Resource%20not%20available%20for%20anonymous%20access.%20Client%20authentication%20required.
X-VSS-S2STargetService: 00000002-0000-8888-8000-000000000000/visualstudio.com
X-TFS-FedAuthRedirect: https://app.vssps.visualstudio.com/_signin?realm=ridercorp.visualstudio.com&reply_to=https%3A%2F%2Fridercorp.visualstudio.com%2F_apis%2Fdistributedtask%2Fpools%2F7%2Fmessages%3FsessionId%3D88f0cd4f-94e8-4b7b-a736-45663feb4c19%26lastMessageId%3D1606&redirect=1&context=eyJodCI6MiwiaGlkIjoiNDE3MWQ3YmEtYTc1ZS00YmYyLTlmYmEtZWU5MTA1N2E4YjQxIiwicXMiOnt9LCJyciI6IiIsInZoIjoiIiwiY3YiOiIiLCJjcyI6IiJ90#ctx=eyJTaWduSW5Db29raWVEb21haW5zIjpbImh0dHBzOi8vbG9naW4ubWljcm9zb2Z0b25saW5lLmNvbSIsImh0dHBzOi8vbG9naW4ubWljcm9zb2Z0b25saW5lLmNvbSJdfQ2
X-Powered-By: ASP.NET
X-Content-Type-Options: nosniff

EDIT jan/2/2018

in _admin/_AgentPool 's page, builds look happy (green), but with impossible build duration of 2 sec, but in build summary of the build definition it's actually red.

enter image description here enter image description here

enter image description here

enter image description here

Upvotes: 1

Views: 326

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29968

There is some issue with VSTS that the error message will not display in some condition. We are investigating this issue. You can track the issue here: CI trigger on Bonobo Git server.

The issue usually occurs when you use an external repository and VSTS cannot access to that repo successfully. According to the screenshot you provided, you are using "http" connection with Basic auth while VSTS requires "https" connection with Basic Auth. Get the build via the Rest API here, you will see the detailed error message.

Upvotes: 1

Related Questions