Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL7 agent config #1054

Closed
samindustry opened this issue Jul 5, 2017 · 10 comments
Closed

RHEL7 agent config #1054

samindustry opened this issue Jul 5, 2017 · 10 comments

Comments

@samindustry
Copy link

samindustry commented Jul 5, 2017

Have you try trouble shooting doc?

Link to trouble shooting doc: https://www.visualstudio.com/en-us/docs/build/troubleshooting
Yes

Agent version and platform

Version of your agent? 2.102.0/2.100.1...
vsts-agent-rhel.7.2-x64-2.112.0.tar.gz


OS of the machine running the agent? OSX/Windows/Linux...
Red Hat Enterprise Linux Server release 7.3 (Maipo)

VSTS type and version

VisualStudio.com or On-Prem TFS?
On-prem 2017


If On-Prem TFS, which release, 2015 RTM/QU1/QU2?
Version 15.117.26526.0


If VisualStudio.com, what is your account name? http://account.visualstudio.com

What's not working?

Please include error messages and screenshots
Hi,
I'm attempting to install build agent on RHEL7.
Pre-reqs installed (except icu?):

[ec2-user@ip-10-245-113-108 myagent]$ sudo yum install -y deltarpm epel-release unzip libunwind gettext libcurl-devel openssl-devel zlib libicu-devel libunwind.x86_64 icu
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Package deltarpm-3.6-3.el7.x86_64 already installed and latest version
Package epel-release-7-9.noarch already installed and latest version
Package unzip-6.0-16.el7.x86_64 already installed and latest version
Package 2:libunwind-1.1-5.el7_2.2.x86_64 already installed and latest version
Package gettext-0.18.2.1-4.el7.x86_64 already installed and latest version
Package libcurl-devel-7.29.0-35.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.1e-60.el7_3.1.x86_64 already installed and latest version
Package zlib-1.2.7-17.el7.x86_64 already installed and latest version
Package libicu-devel-50.1.2-15.el7.x86_64 already installed and latest version
Package 2:libunwind-1.1-5.el7_2.2.x86_64 already installed and latest version
No package icu available.
Nothing to do

I've tested connecting with curl which works with NTLM:

[ec2-user@ip-10-245-113-108 myagent]$ curl -vvv https://tfsdev.domain/tfs/_apis/distributedtask/pools --ntlm -u DPI\\tfsdevbl:password
* About to connect() to tfsdev.domain port 443 (#0)
*   Trying IP...
* Connected to tfsdev.domain (IP) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
*       subject: CN=domain
*       start date: Jun 01 00:00:00 2017 GMT
*       expire date: Jul 01 12:00:00 2018 GMT
*       common name: domain
*       issuer: CN=Amazon,OU=Server CA 1B,O=Amazon,C=US
* Server auth using NTLM with user 'DPI\tfsdevbl'
> GET /tfs/_apis/distributedtask/pools HTTP/1.1
> Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
> User-Agent: curl/7.29.0
> Host: tfsdev.domain
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Content-Type: text/html; charset=us-ascii
< Date: Wed, 05 Jul 2017 04:15:51 GMT
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAwADADgAAAAGgokCmbVsaInUqXsAAAAAAAAAALQAtAA7AAAABgOAJQAAAA9EUEkCAAYARABQAEkAAQAaAEEATQBBAEQARQBWAFQARgBTAEMATwBSAEUABAAcAEQAUABJAC4ATgBTAFcALgBHAE8AVgAuAEEAVQADADgAYQBtAGEAZABlAHYAdABmAHMAYwBvAHIAZQAuAEQAUABJAC4ATgBTAFcALgBHAE8AVgAuAEEAVQAFABwARABQAEkALgBOAFMAVwAuAEcATwBWAC4AQQBVAAcACACAnkBjRfXSAQAAAAA=
< Content-Length: 341
< Connection: keep-alive
<
* Ignoring the response-body
* Connection #0 to host tfsdev.domain left intact
* Issue another request to this URL: 'https://tfsdev.domain/tfs/_apis/distributedtask/pools'
* Found bundle for host tfsdev.domain: 0x2483f70
* Re-using existing connection! (#0) with host tfsdev.domain
* Connected to tfsdev.domain (IP) port 443 (#0)
* Server auth using NTLM with user 'DPI\tfsdevbl'
> GET /tfs/_apis/distributedtask/pools HTTP/1.1
> Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAMAAwBwAAAACAAIAHMAAAARABEAewAAAAAAAAAAAAAABoKJAp6QzllGV9QTAAAAAAAAAAAAAAAAAAAAACuRTPJZKUi/cth3cgeIVyeHpXTkGVjqOURQSXRmc2RldmJsaXAtMTAtMjQ1LTExMy0xMDg=
> User-Agent: curl/7.29.0
> Host: tfsdev.domain
> Accept: */*
>
< HTTP/1.1 200 OK
< ActivityId: 3a250756-b083-436f-965a-532e2eee0213
< Cache-Control: no-cache
< Content-Type: application/json; charset=utf-8; api-version=3.1
< Date: Wed, 05 Jul 2017 04:15:51 GMT
< Expires: -1
< Lfs-Authenticate: NTLM
< 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"
< Persistent-Auth: true
< Pragma: no-cache
< Server: Microsoft-IIS/8.5
< X-AspNet-Version: 4.0.30319
< X-Content-Type-Options: nosniff
< X-FRAME-OPTIONS: SAMEORIGIN
< X-Powered-By: ASP.NET
< X-TFS-ProcessId: 4d362418-fe21-45a6-aa02-9e3a6b6080c0
< X-TFS-Session: 3a250756-b083-436f-965a-532e2eee0213
< X-VSS-E2EID: 3a250756-b083-436f-965a-532e2eee0213
< X-VSS-UserData: d028b97f-2b6d-4057-8082-04621883d5af:tfsdevbl
< Content-Length: 1024
< Connection: keep-alive
<
{"count":1,"value":[{"size":4,"createdOn":"2016-10-26T00:43:53.123Z","autoProvision":true,"createdBy":{"id":"d01a252c-7c1e-4f25-afe4-fae71b1cc42b","displayName":"[Agent Pools]\\Agent Pool Administrators","uniqueName":"vstfs:///Framework/Generic/18968611-4fe9-4dc4-b08f-1e7796d63c3a\\Agent Pool Administrators","isContainer":true},"groupScopeId":"c7be8649-bc33-44e4-a3f8-9c3682d547dd","provisioned":true,"administratorsGroup":{"id":"abf3824b-471f-4b42-9ff7-1a14f5aa8634","displayName":"[Agent Pool 1]\\Agent Pool Administrators","uniqueName":"vstfs:///Framework/Generic/c7be8649-bc33-44e4-a3f8-9c3682d547dd\\Agent Pool Administrators","isContainer":true},"serviceAccountsGroup":{"id":"e9dc6ff8-75c0-4a34-a8ad-808032e3afa6","displayName":"[Agent Pool 1]\\Agent Pool Service Accounts","uniqueName":"vstfs:///Framework/Generic/c7be8649-bc33-44e4-a3f8-9c3682d547dd\\Agent Pool Service Accounts","isContainer":true},"id":1,"scope":"15d9c977-e7b6-45ec-aa28-e8f24db8c3c0","name":"Default","isHosted":false,"poolType":"automation"}]}* Connection #0 to host tfsdev.domain left intact

## **Agent and Worker's diag log** Logs are located at the `_diag` under agent root folder, agent log prefix with `Agent_`, worker log prefix with `Worker_`. all sensitive information should already be masked out, please double check before paste here.
[2017-07-05 04:23:34Z INFO AgentProcess] Agent is built for Linux - rhel.7.2-x64.
[2017-07-05 04:23:34Z INFO AgentProcess] RuntimeInformation: Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017.
[2017-07-05 04:23:34Z INFO AgentProcess] Version: 2.112.0
[2017-07-05 04:23:34Z INFO AgentProcess] Commit: 7f51dc44f64f29b26d5f0f00c26f99352201418e
[2017-07-05 04:23:34Z INFO AgentProcess] Culture: en-US
[2017-07-05 04:23:34Z INFO AgentProcess] UI Culture: en-US
[2017-07-05 04:23:34Z INFO HostContext] Well known directory 'Bin': '/home/ec2-user/myagent/bin'
[2017-07-05 04:23:34Z INFO HostContext] Well known directory 'Root': '/home/ec2-user/myagent'
[2017-07-05 04:23:34Z INFO AgentProcess] Validating directory permissions for: '/home/ec2-user/myagent'
[2017-07-05 04:23:34Z INFO CommandLineParser] Parse
[2017-07-05 04:23:34Z INFO CommandLineParser] Parsing 1 args
[2017-07-05 04:23:34Z INFO CommandLineParser] parsing argument
[2017-07-05 04:23:34Z INFO CommandLineParser] HasArgs: False
[2017-07-05 04:23:34Z INFO CommandLineParser] Adding Command: configure
[2017-07-05 04:23:34Z INFO AgentProcess] Arguments parsed
[2017-07-05 04:23:34Z INFO ProxyConfiguration] Config proxy at: proxyserver:8080.
[2017-07-05 04:23:34Z INFO ProxyConfiguration] Config proxy use DefaultNetworkCredentials.
[2017-07-05 04:23:34Z INFO Agent] ExecuteCommand
[2017-07-05 04:23:34Z INFO ConfigurationStore] currentAssemblyLocation: /home/ec2-user/myagent/bin/Agent.Listener.dll
[2017-07-05 04:23:34Z INFO ConfigurationStore] binPath: /home/ec2-user/myagent/bin
[2017-07-05 04:23:34Z INFO ConfigurationStore] RootFolder: /home/ec2-user/myagent
[2017-07-05 04:23:34Z INFO ConfigurationStore] ConfigFilePath: /home/ec2-user/myagent/.agent
[2017-07-05 04:23:34Z INFO ConfigurationStore] CredFilePath: /home/ec2-user/myagent/.credentials
[2017-07-05 04:23:34Z INFO ConfigurationStore] ServiceConfigFilePath: /home/ec2-user/myagent/.service
[2017-07-05 04:23:34Z INFO CommandSettings] Flag 'help': 'False'
[2017-07-05 04:23:34Z INFO CommandSettings] Flag 'version': 'False'
[2017-07-05 04:23:34Z INFO CommandSettings] Flag 'commit': 'False'
[2017-07-05 04:23:34Z INFO CommandSettings] Command 'configure': 'True'
[2017-07-05 04:23:34Z INFO ConfigurationManager] ConfigureAsync
[2017-07-05 04:23:34Z INFO ConfigurationStore] IsConfigured()
[2017-07-05 04:23:34Z INFO ConfigurationStore] IsConfigured: False
[2017-07-05 04:23:34Z INFO ConfigurationManager] Is configured: False
[2017-07-05 04:23:35Z INFO Terminal] WRITE LINE:
[2017-07-05 04:23:35Z INFO Terminal] WRITE LINE: >> End User License Agreements:
[2017-07-05 04:23:35Z INFO Terminal] WRITE LINE:
[2017-07-05 04:23:35Z INFO Terminal] WRITE LINE: Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

A copy of the Team Explorer Everywhere license agreement can be found at:
  /home/ec2-user/myagent/externals/tee/license.html
[2017-07-05 04:23:35Z INFO Terminal] WRITE LINE:
[2017-07-05 04:23:35Z INFO CommandSettings] Flag 'acceptteeeula': 'False'
[2017-07-05 04:23:35Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 04:23:35Z INFO PromptManager] ReadValue
[2017-07-05 04:23:35Z INFO Terminal] WRITE: Enter (Y/N) Accept the Team Explorer Everywhere license agreement now? (press enter for N) >
[2017-07-05 04:23:35Z INFO Terminal] READ LINE
[2017-07-05 04:23:36Z INFO Terminal] Read value: 'Y'
[2017-07-05 04:23:36Z INFO CommandSettings] Flag 'machinegroup': 'False'
[2017-07-05 04:23:36Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2017-07-05 04:23:36Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2017-07-05 04:23:36Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.MachineGroupAgentConfigProvider, Agent.Listener
[2017-07-05 04:23:36Z INFO Terminal] WRITE LINE:
[2017-07-05 04:23:36Z INFO Terminal] WRITE LINE: >> Connect:
[2017-07-05 04:23:36Z INFO Terminal] WRITE LINE:
[2017-07-05 04:23:36Z INFO CommandSettings] Arg 'url': ''
[2017-07-05 04:23:36Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 04:23:36Z INFO PromptManager] ReadValue
[2017-07-05 04:23:36Z INFO Terminal] WRITE: Enter server URL >
[2017-07-05 04:23:36Z INFO Terminal] READ LINE
[2017-07-05 04:23:47Z INFO Terminal] Read value: 'https://tfsdev.domain/tfs'
[2017-07-05 04:23:47Z INFO ConfigurationManager] GetCredentialProvider
[2017-07-05 04:23:47Z INFO CommandSettings] Arg 'auth': ''
[2017-07-05 04:23:47Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 04:23:47Z INFO PromptManager] ReadValue
[2017-07-05 04:23:47Z INFO Terminal] WRITE: Enter authentication type (press enter for Negotiate) >
[2017-07-05 04:23:47Z INFO Terminal] READ LINE
[2017-07-05 04:23:48Z INFO Terminal] Read value: ''
[2017-07-05 04:23:48Z INFO PromptManager] Falling back to the default: 'Negotiate'
[2017-07-05 04:23:48Z INFO ConfigurationManager] Creating credential for auth: Negotiate
[2017-07-05 04:23:48Z INFO CredentialManager] GetCredentialProvider
[2017-07-05 04:23:48Z INFO CredentialManager] Creating type Negotiate
[2017-07-05 04:23:48Z INFO CredentialManager] Creating credential type: Negotiate
[2017-07-05 04:23:48Z INFO PersonalAccessToken] EnsureCredential
[2017-07-05 04:23:48Z INFO CommandSettings] Arg 'username': ''
[2017-07-05 04:23:48Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 04:23:48Z INFO PromptManager] ReadValue
[2017-07-05 04:23:48Z INFO Terminal] WRITE: Enter user name >
[2017-07-05 04:23:48Z INFO Terminal] READ LINE
[2017-07-05 04:23:54Z INFO Terminal] Read value: 'DPI\\tfsdevbl'
[2017-07-05 04:23:54Z INFO CommandSettings] Arg 'password': ''
[2017-07-05 04:23:54Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 04:23:54Z INFO PromptManager] ReadValue
[2017-07-05 04:23:54Z INFO Terminal] WRITE: Enter password >
[2017-07-05 04:23:54Z INFO Terminal] READ SECRET
[2017-07-05 04:23:57Z INFO Terminal] Read value: '********'
[2017-07-05 04:23:57Z INFO NegotiateCredential] GetVssCredentials
[2017-07-05 04:23:57Z INFO NegotiateCredential] User name retrieved.
[2017-07-05 04:23:57Z INFO NegotiateCredential] Password retrieved.
[2017-07-05 04:23:57Z INFO NegotiateCredential] URL retrieved: https://tfsdev.domain/tfs
[2017-07-05 04:23:57Z INFO ConfigurationManager] cred retrieved
[2017-07-05 04:23:57Z INFO Terminal] WRITE LINE: Connecting to server ...
[2017-07-05 04:23:59Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 04:23:59Z ERR  Terminal] WRITE ERROR (exception):
[2017-07-05 04:23:59Z ERR  Terminal] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Failure when receiving data from the peer
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__42`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.AgentServer.<ConnectAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider.<TestConnectionAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<ConfigureAsync>d__7.MoveNext()
[2017-07-05 04:23:59Z ERR  Terminal] WRITE ERROR: Failed to connect.  Try again or ctrl-c to quit
[2017-07-05 04:23:59Z INFO CommandSettings] Arg 'url': ''
[2017-07-05 04:23:59Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 04:23:59Z INFO PromptManager] ReadValue
[2017-07-05 04:23:59Z INFO Terminal] WRITE: Enter server URL >
[2017-07-05 04:23:59Z INFO Terminal] READ LINE
[2017-07-05 04:24:02Z INFO Terminal] WRITE LINE: Exiting...
@TingluoHuang
Copy link
Contributor

@samindustry thanks for your detail log and all you have been tried.
Can you try use curl access the same endpoint agent trying to access?

Are you able to try latest version agent? since we add more trace in the newer version agent for debug, basically the agent can trace out http request and response.

Here is the doc: https://www.visualstudio.com/en-us/docs/build/troubleshooting#http-trace-logs

export VSTS_AGENT_HTTPTRACE=true before config the agent, then the agent diag log should contains which endpoint the error happen, then you can use curl try that endpoint.

also, can you try run yum list installed | grep curl to display all curl version you have on that box?

@samindustry
Copy link
Author

@TingluoHuang thanks for the prompt response.

I have tested curl and didn't see any issues there, please see OP. Please advise if I should try a different URL.

Where can I get latest agent as the doco says to download from my TFS install. I did enable httptrace but maybe my agent is too old.

[ec2-user@ip-10-245-113-108 myagent]$ yum list installed | grep curl
Repo rhui-REGION-client-config-server-7 forced skip_if_unavailable=True due to: /etc/pki/rhui/cdn.redhat.com-chain.crt
Repo rhui-REGION-client-config-server-7 forced skip_if_unavailable=True due to: /etc/pki/rhui/product/rhui-client-config-server-7.crt
Repo rhui-REGION-client-config-server-7 forced skip_if_unavailable=True due to: /etc/pki/rhui/rhui-client-config-server-7.key
Repo rhui-REGION-rhel-server-releases forced skip_if_unavailable=True due to: /etc/pki/rhui/cdn.redhat.com-chain.crt
Repo rhui-REGION-rhel-server-releases forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content-rhel7.crt
Repo rhui-REGION-rhel-server-releases forced skip_if_unavailable=True due to: /etc/pki/rhui/content-rhel7.key
Repo rhui-REGION-rhel-server-rh-common forced skip_if_unavailable=True due to: /etc/pki/rhui/cdn.redhat.com-chain.crt
Repo rhui-REGION-rhel-server-rh-common forced skip_if_unavailable=True due to: /etc/pki/rhui/product/content-rhel7.crt
Repo rhui-REGION-rhel-server-rh-common forced skip_if_unavailable=True due to: /etc/pki/rhui/content-rhel7.key
curl.x86_64                7.29.0-35.el7       @anaconda/7.3
libcurl.x86_64             7.29.0-35.el7       @anaconda/7.3
libcurl-devel.x86_64       7.29.0-35.el7       @rhui-REGION-rhel-server-releases
python-pycurl.x86_64       7.19.0-19.el7       @anaconda/7.3

@TingluoHuang
Copy link
Contributor

@samindustry you can always get it from github.
https://github.com/Microsoft/vsts-agent/releases/tag/v2.117.2

@TingluoHuang
Copy link
Contributor

@samindustry do you have any proxy between you agent and AT?

@samindustry
Copy link
Author

samindustry commented Jul 5, 2017

@TingluoHuang yes, proxy is set (export VSTS_HTTP_PROXY=). With updated agent (2.117.2) I am getting past that error now!

Now I am getting auth error on default agent pool:

[ec2-user@ip-10-245-113-108 myagent]$ ./config.sh

>> End User License Agreements:

Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

A copy of the Team Explorer Everywhere license agreement can be found at:
  /home/ec2-user/myagent/externals/tee/license.html

Enter (Y/N) Accept the Team Explorer Everywhere license agreement now? (press enter for N) > Y

>> Connect:

Enter server URL > https://tfsdev.domain/tfs
Enter authentication type (press enter for Negotiate) >
Enter user name > DPI\tfsdevbl
Enter password > *******
Connecting to server ...

>> Register Agent:

Enter agent pool (press enter for default) >
TF400813: Resource not available for anonymous access. Client authentication required.
Failed to find pool name. Try again or ctrl-c to quit
Enter agent pool (press enter for default) >
Enter agent name (press enter for ip-10-245-113-108) >
Scanning for tool capabilities.
Connecting to the server.
TF400813: Resource not available for anonymous access. Client authentication required.

Diag:

[2017-07-05 05:00:05Z WARN HostContext] *****************************************************************************************
[2017-07-05 05:00:05Z WARN HostContext] **                                                                                     **
[2017-07-05 05:00:05Z WARN HostContext] ** Http trace is enabled, all your http traffic will be dumped into agent diag log.    **
[2017-07-05 05:00:05Z WARN HostContext] ** DO NOT share the log in public place! The trace may contains secrets in plain text. **
[2017-07-05 05:00:05Z WARN HostContext] **                                                                                     **
[2017-07-05 05:00:05Z WARN HostContext] *****************************************************************************************
[2017-07-05 05:00:05Z INFO AgentProcess] Agent is built for Linux - rhel.7.2-x64.
[2017-07-05 05:00:05Z INFO AgentProcess] RuntimeInformation: Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017.
[2017-07-05 05:00:05Z INFO AgentProcess] Version: 2.117.2
[2017-07-05 05:00:05Z INFO AgentProcess] Commit: 38c028a22fde25ec5deff999b2518392ba750446
[2017-07-05 05:00:05Z INFO AgentProcess] Culture: en-US
[2017-07-05 05:00:05Z INFO AgentProcess] UI Culture: en-US
[2017-07-05 05:00:05Z INFO HostContext] Well known directory 'Bin': '/home/ec2-user/myagent/bin'
[2017-07-05 05:00:05Z INFO HostContext] Well known directory 'Root': '/home/ec2-user/myagent'
[2017-07-05 05:00:05Z INFO AgentProcess] Validating directory permissions for: '/home/ec2-user/myagent'
[2017-07-05 05:00:05Z INFO CommandLineParser] Parse
[2017-07-05 05:00:05Z INFO CommandLineParser] Parsing 1 args
[2017-07-05 05:00:05Z INFO CommandLineParser] parsing argument
[2017-07-05 05:00:05Z INFO CommandLineParser] HasArgs: False
[2017-07-05 05:00:05Z INFO CommandLineParser] Adding Command: configure
[2017-07-05 05:00:05Z INFO AgentProcess] Arguments parsed
[2017-07-05 05:00:05Z INFO VstsAgentWebProxy] No proxy setting found.
[2017-07-05 05:00:05Z INFO Agent] ExecuteCommand
[2017-07-05 05:00:05Z INFO ConfigurationStore] currentAssemblyLocation: /home/ec2-user/myagent/bin/Agent.Listener.dll
[2017-07-05 05:00:05Z INFO ConfigurationStore] binPath: /home/ec2-user/myagent/bin
[2017-07-05 05:00:05Z INFO ConfigurationStore] RootFolder: /home/ec2-user/myagent
[2017-07-05 05:00:05Z INFO ConfigurationStore] ConfigFilePath: /home/ec2-user/myagent/.agent
[2017-07-05 05:00:05Z INFO ConfigurationStore] CredFilePath: /home/ec2-user/myagent/.credentials
[2017-07-05 05:00:05Z INFO ConfigurationStore] ServiceConfigFilePath: /home/ec2-user/myagent/.service
[2017-07-05 05:00:05Z INFO CommandSettings] Flag 'help': 'False'
[2017-07-05 05:00:05Z INFO CommandSettings] Flag 'version': 'False'
[2017-07-05 05:00:05Z INFO CommandSettings] Flag 'commit': 'False'
[2017-07-05 05:00:05Z INFO CommandSettings] Command 'configure': 'True'
[2017-07-05 05:00:05Z INFO ConfigurationManager] ConfigureAsync
[2017-07-05 05:00:05Z INFO ConfigurationStore] IsConfigured()
[2017-07-05 05:00:05Z INFO ConfigurationStore] IsConfigured: False
[2017-07-05 05:00:05Z INFO ConfigurationManager] Is configured: False
[2017-07-05 05:00:05Z INFO Terminal] WRITE LINE:
[2017-07-05 05:00:05Z INFO Terminal] WRITE LINE: >> End User License Agreements:
[2017-07-05 05:00:05Z INFO Terminal] WRITE LINE:
[2017-07-05 05:00:05Z INFO Terminal] WRITE LINE: Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

A copy of the Team Explorer Everywhere license agreement can be found at:
  /home/ec2-user/myagent/externals/tee/license.html
[2017-07-05 05:00:05Z INFO Terminal] WRITE LINE:
[2017-07-05 05:00:05Z INFO CommandSettings] Flag 'acceptteeeula': 'False'
[2017-07-05 05:00:05Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:05Z INFO PromptManager] ReadValue
[2017-07-05 05:00:05Z INFO Terminal] WRITE: Enter (Y/N) Accept the Team Explorer Everywhere license agreement now? (press enter for N) >
[2017-07-05 05:00:05Z INFO Terminal] READ LINE
[2017-07-05 05:00:07Z INFO Terminal] Read value: 'Y'
[2017-07-05 05:00:07Z INFO CommandSettings] Flag 'machinegroup': 'False'
[2017-07-05 05:00:07Z INFO CommandSettings] Flag 'deploymentgroup': 'False'
[2017-07-05 05:00:07Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Configuration.IConfigurationProvider'
[2017-07-05 05:00:07Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider, Agent.Listener
[2017-07-05 05:00:07Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Configuration.DeploymentGroupAgentConfigProvider, Agent.Listener
[2017-07-05 05:00:07Z INFO Terminal] WRITE LINE:
[2017-07-05 05:00:07Z INFO Terminal] WRITE LINE: >> Connect:
[2017-07-05 05:00:07Z INFO Terminal] WRITE LINE:
[2017-07-05 05:00:07Z INFO CommandSettings] Arg 'url': ''
[2017-07-05 05:00:07Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:07Z INFO PromptManager] ReadValue
[2017-07-05 05:00:07Z INFO Terminal] WRITE: Enter server URL >
[2017-07-05 05:00:07Z INFO Terminal] READ LINE
[2017-07-05 05:00:14Z INFO Terminal] Read value: 'https://tfsdev.domain/tfs'
[2017-07-05 05:00:14Z INFO ConfigurationManager] GetCredentialProvider
[2017-07-05 05:00:14Z INFO CommandSettings] Arg 'auth': ''
[2017-07-05 05:00:14Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:14Z INFO PromptManager] ReadValue
[2017-07-05 05:00:14Z INFO Terminal] WRITE: Enter authentication type (press enter for Negotiate) >
[2017-07-05 05:00:14Z INFO Terminal] READ LINE
[2017-07-05 05:00:15Z INFO Terminal] Read value: ''
[2017-07-05 05:00:15Z INFO PromptManager] Falling back to the default: 'Negotiate'
[2017-07-05 05:00:15Z INFO ConfigurationManager] Creating credential for auth: Negotiate
[2017-07-05 05:00:15Z INFO CredentialManager] GetCredentialProvider
[2017-07-05 05:00:15Z INFO CredentialManager] Creating type Negotiate
[2017-07-05 05:00:15Z INFO CredentialManager] Creating credential type: Negotiate
[2017-07-05 05:00:15Z INFO PersonalAccessToken] EnsureCredential
[2017-07-05 05:00:15Z INFO CommandSettings] Arg 'username': ''
[2017-07-05 05:00:15Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:15Z INFO PromptManager] ReadValue
[2017-07-05 05:00:15Z INFO Terminal] WRITE: Enter user name >
[2017-07-05 05:00:15Z INFO Terminal] READ LINE
[2017-07-05 05:00:22Z INFO Terminal] Read value: 'DPI\tfsdevbl'
[2017-07-05 05:00:22Z INFO CommandSettings] Arg 'password': ''
[2017-07-05 05:00:22Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:22Z INFO PromptManager] ReadValue
[2017-07-05 05:00:22Z INFO Terminal] WRITE: Enter password >
[2017-07-05 05:00:22Z INFO Terminal] READ SECRET
[2017-07-05 05:00:24Z INFO Terminal] Read value: '********'
[2017-07-05 05:00:24Z INFO NegotiateCredential] GetVssCredentials
[2017-07-05 05:00:24Z INFO NegotiateCredential] User name retrieved.
[2017-07-05 05:00:24Z INFO NegotiateCredential] Password retrieved.
[2017-07-05 05:00:24Z INFO NegotiateCredential] URL retrieved: https://tfsdev.domain/tfs
[2017-07-05 05:00:24Z INFO ConfigurationManager] cred retrieved
[2017-07-05 05:00:24Z INFO Terminal] WRITE LINE: Connecting to server ...
[2017-07-05 05:00:25Z INFO HttpTrace] Trace System.Net.Http.Request event:
{ Request = Method: GET, RequestUri: 'https://tfsdev.domain/tfs/_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1', Version: 1.1, Content: <null>, Headers:
{
  User-Agent: VSServices/15.255.65000.0
  User-Agent: (NetStandard; Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  User-Agent: VstsAgentCore-rhel.7.2-x64/2.117.2
  User-Agent: (Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  Accept-Language: en-US
  X-TFS-FedAuthRedirect: Suppress
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  Expect: 100-continue
}, LoggingRequestId = a068137c-4331-4a44-b224-ec5dfcfecf7c, Timestamp = 3686196026326 }
[2017-07-05 05:00:26Z INFO HttpTrace] Trace System.Net.Http.Response event:
{ Response = StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  ActivityId: 3a252abc-b083-436f-965a-532e2eee0213
  Date: Wed, 05 Jul 2017 05:00:26 GMT
  Lfs-Authenticate: NTLM
  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/8.5
  WWW-Authenticate: Bearer
  WWW-Authenticate: Basic realm="tfsdev.domain"
  WWW-Authenticate: Negotiate
  WWW-Authenticate: NTLM
  X-Content-Type-Options: nosniff
  X-FRAME-OPTIONS: SAMEORIGIN
  X-Powered-By: ASP.NET
  X-TFS-ProcessId: 4d362418-fe21-45a6-aa02-9e3a6b6080c0
  X-TFS-ServiceError: TF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-TFS-SoapException: %3c%3fxml+version%3d%221.0%22+encoding%3d%22utf-8%22%3f%3e%3csoap%3aEnvelope+xmlns%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+xml%3alang%3d%22en%22%3eTF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.%3c%2fsoap%3aText%3e%3c%2fsoap%3aReason%3e%3c%2fsoap%3aFault%3e%3c%2fsoap%3aBody%3e%3c%2fsoap%3aEnvelope%3e
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  Connection: keep-alive
  Content-Type: text/html; charset=utf-8
  Content-Length: 20164
}, LoggingRequestId = a068137c-4331-4a44-b224-ec5dfcfecf7c, TimeStamp = 3687419761237 }
[2017-07-05 05:00:26Z INFO HttpTrace] Trace System.Net.Http.Request event:
{ Request = Method: GET, RequestUri: 'https://tfsdev.domain/tfs/_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1', Version: 1.1, Content: <null>, Headers:
{
  User-Agent: VSServices/15.255.65000.0
  User-Agent: (NetStandard; Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  User-Agent: VstsAgentCore-rhel.7.2-x64/2.117.2
  User-Agent: (Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  Accept-Language: en-US
  X-TFS-FedAuthRedirect: Suppress
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  Expect: 100-continue
  X-VSS-UserData:
}, LoggingRequestId = 745c010c-2ea5-408a-8d7f-b500e77132c0, Timestamp = 3687478193651 }
[2017-07-05 05:00:26Z INFO HttpTrace] Trace System.Net.Http.Response event:
{ Response = StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  ActivityId: 3a252ab8-b083-436f-965a-532e2eee0213
  Cache-Control: no-cache
  Date: Wed, 05 Jul 2017 05:00:26 GMT
  Lfs-Authenticate: NTLM
  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"
  Persistent-Auth: true
  Pragma: no-cache
  Server: Microsoft-IIS/8.5
  Vary: Accept-Encoding
  X-AspNet-Version: 4.0.30319
  X-Content-Type-Options: nosniff
  X-FRAME-OPTIONS: SAMEORIGIN
  X-Powered-By: ASP.NET
  X-TFS-ProcessId: 4d362418-fe21-45a6-aa02-9e3a6b6080c0
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-UserData: d028b97f-2b6d-4057-8082-04621883d5af:tfsdevbl
  Connection: keep-alive
  Content-Type: application/json; charset=utf-8; api-version=3.2-preview.1
  Expires: -1
}, LoggingRequestId = 745c010c-2ea5-408a-8d7f-b500e77132c0, TimeStamp = 3687635505558 }
[2017-07-05 05:00:26Z INFO ConfigurationManager] Test Connection complete.
[2017-07-05 05:00:26Z INFO RSAFileKeyManager] Creating new RSA key using 2048-bit key length
[2017-07-05 05:00:27Z INFO RSAFileKeyManager] Successfully saved RSA key parameters to file /home/ec2-user/myagent/.credentials_rsaparams
[2017-07-05 05:00:27Z INFO WhichUtil] Which: 'chmod'
[2017-07-05 05:00:27Z INFO WhichUtil] Location: '/usr/bin/chmod'
[2017-07-05 05:00:27Z INFO ProcessInvoker] Starting process:
[2017-07-05 05:00:27Z INFO ProcessInvoker]   File name: '/usr/bin/chmod'
[2017-07-05 05:00:27Z INFO ProcessInvoker]   Arguments: '600 /home/ec2-user/myagent/.credentials_rsaparams'
[2017-07-05 05:00:27Z INFO ProcessInvoker]   Working directory: '/home/ec2-user/myagent'
[2017-07-05 05:00:27Z INFO ProcessInvoker]   Require exit code zero: 'False'
[2017-07-05 05:00:27Z INFO ProcessInvoker]   Encoding web name:  ; code page: ''
[2017-07-05 05:00:27Z INFO ProcessInvoker]   Force kill process on cancellation: 'False'
[2017-07-05 05:00:27Z INFO ProcessInvoker] Process started with process id 2377, waiting for process exit.
[2017-07-05 05:00:27Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:00.0308864.
[2017-07-05 05:00:27Z INFO RSAFileKeyManager] Successfully set permissions for RSA key parameters file /home/ec2-user/myagent/.credentials_rsaparams
[2017-07-05 05:00:27Z INFO Terminal] WRITE LINE:
[2017-07-05 05:00:27Z INFO Terminal] WRITE LINE: >> Register Agent:
[2017-07-05 05:00:27Z INFO Terminal] WRITE LINE:
[2017-07-05 05:00:27Z INFO CommandSettings] Arg 'pool': ''
[2017-07-05 05:00:27Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:27Z INFO PromptManager] ReadValue
[2017-07-05 05:00:27Z INFO Terminal] WRITE: Enter agent pool (press enter for default) >
[2017-07-05 05:00:27Z INFO Terminal] READ LINE
[2017-07-05 05:00:30Z INFO Terminal] Read value: ''
[2017-07-05 05:00:30Z INFO PromptManager] Falling back to the default: 'default'
[2017-07-05 05:00:30Z INFO HttpTrace] Trace System.Net.Http.Request event:
{ Request = Method: GET, RequestUri: 'https://tfsdev.domain/tfs/_apis/distributedtask/pools?poolName=default', Version: 1.1, Content: <null>, Headers:
{
  Accept: application/json; api-version=3.2-preview.1
  User-Agent: VSServices/15.255.65000.0
  User-Agent: (NetStandard; Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  User-Agent: VstsAgentCore-rhel.7.2-x64/2.117.2
  User-Agent: (Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  Accept-Language: en-US
  X-TFS-FedAuthRedirect: Suppress
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
}, LoggingRequestId = c4f93d02-a13d-42d8-b7b3-9e409769bd5e, Timestamp = 3691445538188 }
[2017-07-05 05:00:30Z INFO HttpTrace] Trace System.Net.Http.Response event:
{ Response = StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  ActivityId: 3a252aa4-b083-436f-965a-532e2eee0213
  Date: Wed, 05 Jul 2017 05:00:30 GMT
  Lfs-Authenticate: NTLM
  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/8.5
  WWW-Authenticate: Bearer
  WWW-Authenticate: Basic realm="tfsdev.domain"
  WWW-Authenticate: Negotiate
  WWW-Authenticate: NTLM
  X-Content-Type-Options: nosniff
  X-FRAME-OPTIONS: SAMEORIGIN
  X-Powered-By: ASP.NET
  X-TFS-ProcessId: 4d362418-fe21-45a6-aa02-9e3a6b6080c0
  X-TFS-ServiceError: TF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-TFS-SoapException: %3c%3fxml+version%3d%221.0%22+encoding%3d%22utf-8%22%3f%3e%3csoap%3aEnvelope+xmlns%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+xml%3alang%3d%22en%22%3eTF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.%3c%2fsoap%3aText%3e%3c%2fsoap%3aReason%3e%3c%2fsoap%3aFault%3e%3c%2fsoap%3aBody%3e%3c%2fsoap%3aEnvelope%3e
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  Connection: keep-alive
  Content-Type: text/plain; charset=utf-8
  Content-Length: 86
}, LoggingRequestId = c4f93d02-a13d-42d8-b7b3-9e409769bd5e, TimeStamp = 3691459483668 }
[2017-07-05 05:00:30Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:30Z ERR  Terminal] WRITE ERROR (exception):
[2017-07-05 05:00:30Z ERR  Terminal] Microsoft.VisualStudio.Services.Common.VssUnauthorizedException: TF400813: Resource not available for anonymous access. Client authentication required.
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__27`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__26`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider.<GetPoolIdAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider.<GetPoolId>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<ConfigureAsync>d__7.MoveNext()
[2017-07-05 05:00:30Z ERR  Terminal] WRITE ERROR: Failed to find pool name. Try again or ctrl-c to quit
[2017-07-05 05:00:30Z INFO CommandSettings] Arg 'pool': ''
[2017-07-05 05:00:30Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:00:30Z INFO PromptManager] ReadValue
[2017-07-05 05:00:30Z INFO Terminal] WRITE: Enter agent pool (press enter for default) >
[2017-07-05 05:00:30Z INFO Terminal] READ LINE
[2017-07-05 05:03:27Z INFO Terminal] Read value: ''
[2017-07-05 05:03:27Z INFO PromptManager] Falling back to the default: 'default'
[2017-07-05 05:03:27Z INFO HttpTrace] Trace System.Net.Http.Request event:
{ Request = Method: GET, RequestUri: 'https://tfsdev.domain/tfs/_apis/distributedtask/pools?poolName=default', Version: 1.1, Content: <null>, Headers:
{
  Accept: application/json; api-version=3.2-preview.1
  User-Agent: VSServices/15.255.65000.0
  User-Agent: (NetStandard; Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  User-Agent: VstsAgentCore-rhel.7.2-x64/2.117.2
  User-Agent: (Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  Accept-Language: en-US
  X-TFS-FedAuthRedirect: Suppress
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
}, LoggingRequestId = b0b9b37c-541c-461c-aae2-ccbbd2ccbc9e, Timestamp = 3868116486526 }
[2017-07-05 05:03:27Z INFO HttpTrace] Trace System.Net.Http.Response event:
{ Response = StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  ActivityId: 3a2528a0-b083-436f-965a-532e2eee0213
  Cache-Control: no-cache
  Date: Wed, 05 Jul 2017 05:03:27 GMT
  Lfs-Authenticate: NTLM
  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"
  Persistent-Auth: true
  Pragma: no-cache
  Server: Microsoft-IIS/8.5
  Vary: Accept-Encoding
  X-AspNet-Version: 4.0.30319
  X-Content-Type-Options: nosniff
  X-FRAME-OPTIONS: SAMEORIGIN
  X-Powered-By: ASP.NET
  X-TFS-ProcessId: 4d362418-fe21-45a6-aa02-9e3a6b6080c0
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-UserData: d028b97f-2b6d-4057-8082-04621883d5af:tfsdevbl
  Connection: keep-alive
  Content-Type: application/json; charset=utf-8; api-version=3.2-preview.1
  Expires: -1
}, LoggingRequestId = b0b9b37c-541c-461c-aae2-ccbbd2ccbc9e, TimeStamp = 3868204618544 }
[2017-07-05 05:03:27Z INFO BuildReleasesAgentConfigProvider] Found pool default with id 1
[2017-07-05 05:03:27Z INFO BuildReleasesAgentConfigProvider] PoolId for agent pool 'default' is '1'.
[2017-07-05 05:03:27Z INFO CommandSettings] Arg 'agent': ''
[2017-07-05 05:03:27Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-07-05 05:03:27Z INFO PromptManager] ReadValue
[2017-07-05 05:03:27Z INFO Terminal] WRITE: Enter agent name (press enter for ip-10-245-113-108) >
[2017-07-05 05:03:27Z INFO Terminal] READ LINE
[2017-07-05 05:03:31Z INFO Terminal] Read value: ''
[2017-07-05 05:03:31Z INFO PromptManager] Falling back to the default: 'ip-10-245-113-108'
[2017-07-05 05:03:31Z INFO Terminal] WRITE LINE: Scanning for tool capabilities.
[2017-07-05 05:03:31Z INFO ExtensionManager] Getting extensions for interface: 'Microsoft.VisualStudio.Services.Agent.Listener.Capabilities.ICapabilitiesProvider'
[2017-07-05 05:03:31Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Capabilities.AgentCapabilitiesProvider, Agent.Listener
[2017-07-05 05:03:31Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Capabilities.EnvironmentCapabilitiesProvider, Agent.Listener
[2017-07-05 05:03:31Z INFO ExtensionManager] Creating instance: Microsoft.VisualStudio.Services.Agent.Listener.Capabilities.NixCapabilitiesProvider, Agent.Listener
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding '_': './bin/Agent.Listener'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'HISTCONTROL': 'ignoredups'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'HISTSIZE': '1000'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'HOME': '/home/ec2-user'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'HOSTNAME': 'ip-10-245-113-108.domain'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'LANG': 'en_US.UTF-8'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'LESSOPEN': '||/usr/bin/lesspipe.sh %s'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'LOGNAME': 'ec2-user'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Skipping: 'LS_COLORS'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'MAIL': '/var/spool/mail/ec2-user'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'PATH': '/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'PWD': '/home/ec2-user/myagent'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'SELINUX_LEVEL_REQUESTED': ''
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'SELINUX_ROLE_REQUESTED': ''
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'SELINUX_USE_CURRENT_RANGE': ''
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'SHELL': '/bin/bash'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Skipping: 'SHLVL'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'SSH_CLIENT': '148.145.212.98 62180 22'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'SSH_CONNECTION': '148.145.212.98 62180 10.245.113.108 22'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'SSH_TTY': '/dev/pts/0'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Skipping: 'TERM'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'USER': 'ec2-user'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'VSTS_AGENT_HTTPTRACE': 'true'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'XDG_RUNTIME_DIR': '/run/user/1000'
[2017-07-05 05:03:31Z INFO EnvironmentCapabilitiesProvider] Adding 'XDG_SESSION_ID': '1'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'android'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Checking file: 'tools/android'
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Checking file: '/home/ec2-user/Library/Developer/Xamarin/android-sdk-macosx/tools/android'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'ant'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'waagent'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'bundle'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'clang'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'cmake'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'curl'
[2017-07-05 05:03:31Z INFO WhichUtil] Location: '/usr/bin/curl'
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Adding 'curl': '/usr/bin/curl'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'git'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'gulp'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'java'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'javac'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'make'
[2017-07-05 05:03:31Z INFO WhichUtil] Location: '/usr/bin/make'
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Adding 'make': '/usr/bin/make'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'mvn'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'xbuild'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'node'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'nodejs'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'npm'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'python'
[2017-07-05 05:03:31Z INFO WhichUtil] Location: '/usr/bin/python'
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Adding 'python': '/usr/bin/python'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'python3'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'sh'
[2017-07-05 05:03:31Z INFO WhichUtil] Location: '/usr/bin/sh'
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Adding 'sh': '/usr/bin/sh'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'svn'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'ruby'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'rake'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'svn'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'mdtool'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Checking file: '/Applications/Xamarin Studio.app/Contents/MacOS/mdtool'
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Checking file: '/Applications/Visual Studio.app/Contents/MacOS/vstool'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'generator'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO CapabilitiesBuilder] Checking file: '/Library/Frameworks/Xamarin.Android.framework/Commands/generator'
[2017-07-05 05:03:31Z INFO WhichUtil] Which: 'xcode-select'
[2017-07-05 05:03:31Z INFO WhichUtil] Not found.
[2017-07-05 05:03:31Z INFO AgentCapabilitiesProvider] Adding 'Agent.Name': 'ip-10-245-113-108'
[2017-07-05 05:03:31Z INFO AgentCapabilitiesProvider] Adding 'Agent.OS': 'linux'
[2017-07-05 05:03:31Z INFO AgentCapabilitiesProvider] Adding 'Agent.Version': '2.117.2'
[2017-07-05 05:03:31Z INFO AgentCapabilitiesProvider] Adding 'Agent.ComputerName': 'ip-10-245-113-108'
[2017-07-05 05:03:31Z INFO Terminal] WRITE LINE: Connecting to the server.
[2017-07-05 05:03:31Z INFO HttpTrace] Trace System.Net.Http.Request event:
{ Request = Method: GET, RequestUri: 'https://tfsdev.domain/tfs/_apis/distributedtask/pools/1/agents?agentName=ip-10-245-113-108&includeCapabilities=False', Version: 1.1, Content: <null>, Headers:
{
  Accept: application/json; api-version=3.2-preview.1
  User-Agent: VSServices/15.255.65000.0
  User-Agent: (NetStandard; Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  User-Agent: VstsAgentCore-rhel.7.2-x64/2.117.2
  User-Agent: (Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Fri Jun 30 05:26:04 UTC 2017)
  Accept-Language: en-US
  X-TFS-FedAuthRedirect: Suppress
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
}, LoggingRequestId = 2b699d8a-1f8e-4f76-ba63-7652947ddaca, Timestamp = 3872689213496 }
[2017-07-05 05:03:31Z INFO HttpTrace] Trace System.Net.Http.Response event:
{ Response = StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  ActivityId: 3a25284e-b083-436f-965a-532e2eee0213
  Date: Wed, 05 Jul 2017 05:03:31 GMT
  Lfs-Authenticate: NTLM
  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/8.5
  WWW-Authenticate: Bearer
  WWW-Authenticate: Basic realm="tfsdev.domain"
  WWW-Authenticate: Negotiate
  WWW-Authenticate: NTLM
  X-Content-Type-Options: nosniff
  X-FRAME-OPTIONS: SAMEORIGIN
  X-Powered-By: ASP.NET
  X-TFS-ProcessId: 4d362418-fe21-45a6-aa02-9e3a6b6080c0
  X-TFS-ServiceError: TF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.
  X-TFS-Session: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  X-TFS-SoapException: %3c%3fxml+version%3d%221.0%22+encoding%3d%22utf-8%22%3f%3e%3csoap%3aEnvelope+xmlns%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+xml%3alang%3d%22en%22%3eTF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.%3c%2fsoap%3aText%3e%3c%2fsoap%3aReason%3e%3c%2fsoap%3aFault%3e%3c%2fsoap%3aBody%3e%3c%2fsoap%3aEnvelope%3e
  X-VSS-E2EID: a9848309-ccbf-4e6a-99a5-b2be97c12a16
  Connection: keep-alive
  Content-Type: text/plain; charset=utf-8
  Content-Length: 86
}, LoggingRequestId = 2b699d8a-1f8e-4f76-ba63-7652947ddaca, TimeStamp = 3872703442324 }
[2017-07-05 05:03:31Z ERR  Agent] Microsoft.VisualStudio.Services.Common.VssUnauthorizedException: TF400813: Resource not available for anonymous access. Client authentication required.
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__27`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__26`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.BuildReleasesAgentConfigProvider.<GetAgentAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<ConfigureAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Agent.<ExecuteCommand>d__9.MoveNext()
[2017-07-05 05:03:31Z ERR  Terminal] WRITE ERROR: TF400813: Resource not available for anonymous access. Client authentication required.
[2017-07-05 05:03:31Z INFO HttpTrace] DiagListeners finished transmitting data.

@samindustry
Copy link
Author

@TingluoHuang thanks for your help, Alternate auth worked:

[ec2-user@ip-10-245-113-108 myagent]$ ./config.sh --unattended --url https://tfsdev.domain/tfs --auth Alternate --windowslogonaccount domain\\user --windowslogonpassword PASSWORD --username domain\\user --password PASSWORD --pool default

>> End User License Agreements:

Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

A copy of the Team Explorer Everywhere license agreement can be found at:
  /home/ec2-user/myagent/externals/tee/license.html


>> Connect:

Connecting to server ...

>> Register Agent:

Scanning for tool capabilities.
Connecting to the server.
Successfully added the agent
Testing agent connection.
2017-07-05 05:24:15Z: Settings Saved.

@samindustry
Copy link
Author

image
👍

@TingluoHuang
Copy link
Contributor

@samindustry glad you unblock, but i am still interested to know why Negotiate not work.
Few thing i want to confirm:

  1. You said you do have proxy between the agent and TFS AT, but the agent diag logs shows that the agent didn't pick up the proxy config you have. [2017-07-05 05:00:05Z INFO VstsAgentWebProxy] No proxy setting found. how did you set up proxy for agent?
  2. When you use Negotiate (NTLM in your case), i would expect to see NTLM handshake in http requests, ex. first request get 401 from server, second request will send auth header with NTLM token and pass the front door. However in your trace, i didn't see any auth header been sent out with NTLM token in there.

@samindustry
Copy link
Author

@TingluoHuang

  1. Yes sorry, I had the .proxy file in the old agent, so when I downloaded updated agent it didn't have this .proxy file. But I do also have the following set: VSTS_HTTP_PROXY=proxy:8080
  2. Yes I would expect to see that also, as is shown in the CURL.

@TingluoHuang
Copy link
Contributor

i am going to close this issue, since the original problem has been solved.
we are in the process of moving the build agent to use dotnet core 2.1 which has the big benefits of getting rid of libcurl dependency on Linux/OSX.

prebansa pushed a commit to prebansa/azure-pipelines-agent that referenced this issue Aug 6, 2019
…DevOpsCliInstall

fix extension install directory to a directory which is in homedrive …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants