Agent: vsts-agent-win7-x64-2.105.7.zip
On-Prem TFS 2017 version: 15.105.25910.0
OS: Windows 8.1
Hello, guys.
I'm playing around with making a build through TFS 2017 and have some problems with adding the agent to the pool.
Here what I've done:
And I'm stuck at this point. None of the authentication (Integrated, Negotiate, PAT) ways works for me: the response returns this exception:
TF400813: Resource not available for anonymous access. Client authentication required.
Anonymous Authentication and Windows Authentication are enabled in IIS both for "Team Foundation Server" and "tfs" applications.
Am I doing something wrong?
Here are the details for Integrated authentication try:
GET /tfs/_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1 HTTP/1.1
Accept-Encoding: gzip
Accept-Language: ru-RU
Expect: 100-continue
User-Agent: VSServices/15.255.65000.0 (NetStandard) VstsAgentCore-win7-x64/2.105.7 (Microsoft Windows 6.3.9600)
X-TFS-FedAuthRedirect: Suppress
X-TFS-Session: 668b1307-f30d-4643-a0f3-ab925cb882c7
Connection: Keep-Alive
Host: pc-19:8080
HTTP/1.1 401 Unauthorized
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-TFS-ProcessId: 830c1390-d274-4fcf-af3b-3b10c6f09c45
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 3600
Access-Control-Allow-Methods: OPTIONS,GET,POST,PATCH,PUT,DELETE
Access-Control-Expose-Headers: ActivityId,X-TFS-Session,X-MS-ContinuationToken
Access-Control-Allow-Headers: authorization
X-FRAME-OPTIONS: SAMEORIGIN
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-TFS-ServiceError: TF400813%3a+Resource+not+available+for+anonymous+access.+Client+authentication+required.
WWW-Authenticate: Bearer
WWW-Authenticate: Basic realm="pc-19"
X-Powered-By: ASP.NET
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"
Lfs-Authenticate: NTLM
X-Content-Type-Options: nosniff
Date: Fri, 03 Feb 2017 09:27:30 GMT
Content-Length: 21184
[2017-02-03 09:46:22Z INFO AgentProcess] Agent is built for Windows - win7-x64.
[2017-02-03 09:46:22Z INFO AgentProcess] RuntimeInformation: Microsoft Windows 6.3.9600 .
[2017-02-03 09:46:22Z INFO AgentProcess] Version: 2.105.7
[2017-02-03 09:46:22Z INFO AgentProcess] Commit: 5f286b1f01c51b7cace8c1649edd6b00893a3649
[2017-02-03 09:46:22Z INFO AgentProcess] Culture: ru-RU
[2017-02-03 09:46:22Z INFO AgentProcess] UI Culture: ru-RU
[2017-02-03 09:46:22Z INFO HostContext] Well known directory 'Bin': 'C:agentbin'
[2017-02-03 09:46:22Z INFO HostContext] Well known directory 'Root': 'C:agent'
[2017-02-03 09:46:22Z INFO AgentProcess] Validating directory permissions for: 'C:agent'
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Generation: '1'
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1', value name 'Install': '1'
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1PowerShellEngine', value name 'PowerShellVersion': '2.0'
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Unsupported version. Skipping.
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Generation: '3'
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell3', value name 'Install': '1'
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell3PowerShellEngine', value name 'PowerShellVersion': '4.0'
[2017-02-03 09:46:22Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell3PowerShellEngine', value name 'ApplicationBase': 'C:WindowsSystem32WindowsPowerShellv1.0'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoft.NETFramework', value name 'InstallRoot': 'C:WindowsMicrosoft.NETFramework64'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'SOFTWAREMicrosoftNET Framework SetupNDP' contains sub keys:
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'CDF'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'v2.0.50727'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'v3.0'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'v3.5'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'v4'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'v4.0'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv2.0.50727', value name 'Version': '2.0.50727.4927'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv2.0.50727', value name 'Install': '1'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Testing directory: 'C:WindowsMicrosoft.NETFramework64v2.0.50727'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Found version: 2.0.50727
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv3.0', value name 'Version': '3.0.30729.4926'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv3.0', value name 'Install': '1'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Testing directory: 'C:WindowsMicrosoft.NETFramework64v3.0'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Found version: 3.0
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv3.5', value name 'Version': '3.5.30729.4926'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv3.5', value name 'Install': '1'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Testing directory: 'C:WindowsMicrosoft.NETFramework64v3.5'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Found version: 3.5
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4', value name 'Version' is null.
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4', value name '' is null.
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'SOFTWAREMicrosoftNET Framework SetupNDPv4' contains sub keys:
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'Client'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 'Full'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Client', value name 'Version': '4.6.01590'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Client', value name 'Install': '1'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Client', value name 'InstallPath': 'C:WindowsMicrosoft.NETFramework64v4.0.30319'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Client', value name 'Release': '394806'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Type is System.Int32
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full', value name 'Version': '4.6.01590'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full', value name 'Install': '1'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full', value name 'InstallPath': 'C:WindowsMicrosoft.NETFramework64v4.0.30319'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full', value name 'Release': '394806'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Type is System.Int32
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4.0', value name 'Version' is null.
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4.0', value name '': 'deprecated'
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Found 5 versions:
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 2.0.50727
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 3.0
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 3.5
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 4.6.2
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] 4.6.2
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.5'
[2017-02-03 09:46:22Z INFO CommandLineParser] Parse
[2017-02-03 09:46:22Z INFO CommandLineParser] Parsing 1 args
[2017-02-03 09:46:22Z INFO CommandLineParser] parsing argument
[2017-02-03 09:46:22Z INFO CommandLineParser] HasArgs: False
[2017-02-03 09:46:22Z INFO CommandLineParser] Adding Command: configure
[2017-02-03 09:46:22Z INFO AgentProcess] Arguments parsed
[2017-02-03 09:46:22Z INFO ProxyConfiguration] No proxy setting found.
[2017-02-03 09:46:22Z INFO Agent] ExecuteCommand
[2017-02-03 09:46:22Z INFO ConfigurationStore] currentAssemblyLocation: C:agentbinAgent.Listener.dll
[2017-02-03 09:46:22Z INFO ConfigurationStore] binPath: C:agentbin
[2017-02-03 09:46:22Z INFO ConfigurationStore] RootFolder: C:agent
[2017-02-03 09:46:22Z INFO ConfigurationStore] ConfigFilePath: C:agent.agent
[2017-02-03 09:46:22Z INFO ConfigurationStore] CredFilePath: C:agent.credentials
[2017-02-03 09:46:22Z INFO ConfigurationStore] ServiceConfigFilePath: C:agent.service
[2017-02-03 09:46:22Z INFO CommandSettings] Flag 'help': 'False'
[2017-02-03 09:46:22Z INFO CommandSettings] Flag 'version': 'False'
[2017-02-03 09:46:22Z INFO CommandSettings] Flag 'commit': 'False'
[2017-02-03 09:46:22Z INFO CommandSettings] Command 'configure': 'True'
[2017-02-03 09:46:22Z INFO ConfigurationManager] ConfigureAsync
[2017-02-03 09:46:22Z INFO ConfigurationStore] IsConfigured()
[2017-02-03 09:46:22Z INFO ConfigurationStore] IsConfigured: False
[2017-02-03 09:46:22Z INFO ConfigurationManager] Is configured: False
[2017-02-03 09:46:22Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.6'
[2017-02-03 09:46:23Z INFO Terminal] WRITE LINE:
[2017-02-03 09:46:23Z INFO Terminal] WRITE LINE: >> Подключение:
[2017-02-03 09:46:23Z INFO Terminal] WRITE LINE:
[2017-02-03 09:46:23Z INFO CommandSettings] Arg 'url': ''
[2017-02-03 09:46:23Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-03 09:46:23Z INFO PromptManager] ReadValue
[2017-02-03 09:46:23Z INFO Terminal] WRITE: Введите "URL-адрес сервера" >
[2017-02-03 09:46:23Z INFO Terminal] READ LINE
[2017-02-03 09:46:44Z INFO Terminal] Read value: 'http://pc-19:8080/tfs'
[2017-02-03 09:46:44Z INFO ConfigurationManager] GetCredentialProvider
[2017-02-03 09:46:44Z INFO CommandSettings] Arg 'auth': ''
[2017-02-03 09:46:44Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-03 09:46:44Z INFO PromptManager] ReadValue
[2017-02-03 09:46:44Z INFO Terminal] WRITE: Введите "тип аутентификации" (нажмите клавишу ВВОД для "Integrated") >
[2017-02-03 09:46:44Z INFO Terminal] READ LINE
[2017-02-03 09:46:45Z INFO Terminal] Read value: ''
[2017-02-03 09:46:45Z INFO PromptManager] Falling back to the default: 'Integrated'
[2017-02-03 09:46:45Z INFO ConfigurationManager] Creating credential for auth: Integrated
[2017-02-03 09:46:45Z INFO CredentialManager] GetCredentialProvider
[2017-02-03 09:46:45Z INFO CredentialManager] Creating type Integrated
[2017-02-03 09:46:45Z INFO CredentialManager] Creating credential type: Integrated
[2017-02-03 09:46:45Z INFO IntegratedCredential] GetVssCredentials
[2017-02-03 09:46:45Z INFO ConfigurationManager] cred retrieved
[2017-02-03 09:46:45Z INFO Terminal] WRITE LINE: Подключение к серверу...
[2017-02-03 09:46:45Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-03 09:46:45Z ERR Terminal] WRITE ERROR (exception):
[2017-02-03 09:46:45Z ERR Terminal] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: Параметр задан неверно
at System.Net.Http.WinHttpAuthHelper.SetWinHttpCredential(SafeWinHttpHandle requestHandle, ICredentials credentials, Uri uri, UInt32 authScheme, UInt32 authTarget)
at System.Net.Http.WinHttpAuthHelper.CheckResponseForAuthentication(WinHttpRequestState state, UInt32& proxyAuthScheme, UInt32& serverAuthScheme)
at System.Net.Http.WinHttpHandler.
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.
--- 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.
--- 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.ConfiguredTaskAwaitable1.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.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.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.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.
--- 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.
--- 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.
--- 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.
--- 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.
[2017-02-03 09:46:45Z ERR Terminal] WRITE ERROR: Не удалось подключиться. Повторите попытку или нажмите клавиши CTRL+C для выхода.
[2017-02-03 09:46:45Z INFO CommandSettings] Arg 'url': ''
[2017-02-03 09:46:45Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-03 09:46:45Z INFO PromptManager] ReadValue
[2017-02-03 09:46:45Z INFO Terminal] WRITE: Введите "URL-адрес сервера" >
[2017-02-03 09:46:45Z INFO Terminal] READ LINE
@zaero33 Integrate Auth will use NTLM or Kerberos, do you have those configured? in the Fiddler trace, i didn't see either of them returned as part of
WWW-Authenticate: Bearer
WWW-Authenticate: Basic realm="pc-19"
Thanks for the reply.
I think I don't have NTLM or Kerberos configured. Can you please send me any details regarding the required configuration?
BTW, maybe I should better go for some other authentication type, for example, PAT?
I was trying hard, but the PAT authentification neither works for me - it returns me the "An error occurred while sending a request" message.
The token is created with "All scopes" authorization, but still no success. The Fiddler trace shows the "401 Unauthorized" response.
Do you have any tips for this situation?
Here are the details for PAT authentication:
GET /tfs/_apis/connectionData?connectOptions=1&lastChangeId=-1&lastChangeId64=-1 HTTP/1.1
Connection: Keep-Alive
Accept-Encoding: gzip
Accept-Language: ru-RU
Authorization: Basic VnN0c0FnZW50OnZoNHhmdjVjMjdpYzRmeHlwbHBwc2FoazcyeHk1Nm5weXBjaG9paWl2d2lsaWFkZ29sN2E=
Expect: 100-continue
User-Agent: VSServices/15.255.65000.0 (NetStandard) VstsAgentCore-win7-x64/2.105.7 (Microsoft Windows 6.3.9600)
X-TFS-FedAuthRedirect: Suppress
X-TFS-Session: 95456e0c-18d1-4da8-8ee2-80c344ea7651
Host: pc-19
HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-TFS-ProcessId: e7b211cf-bb66-4160-94b2-0662af8c5fb2
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 3600
Access-Control-Allow-Methods: OPTIONS,GET,POST,PATCH,PUT,DELETE
Access-Control-Expose-Headers: ActivityId,X-TFS-Session,X-MS-ContinuationToken
Access-Control-Allow-Headers: authorization
X-FRAME-OPTIONS: SAMEORIGIN
WWW-Authenticate: Bearer
WWW-Authenticate: Basic realm="pc-19"
X-Powered-By: ASP.NET
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"
Lfs-Authenticate: NTLM
X-Content-Type-Options: nosniff
Date: Mon, 06 Feb 2017 10:28:27 GMT
Content-Length: 8865
[2017-02-06 10:28:00Z INFO AgentProcess] Agent is built for Windows - win7-x64.
[2017-02-06 10:28:00Z INFO AgentProcess] RuntimeInformation: Microsoft Windows 6.3.9600 .
[2017-02-06 10:28:00Z INFO AgentProcess] Version: 2.105.7
[2017-02-06 10:28:00Z INFO AgentProcess] Commit: 5f286b1f01c51b7cace8c1649edd6b00893a3649
[2017-02-06 10:28:00Z INFO AgentProcess] Culture: ru-RU
[2017-02-06 10:28:00Z INFO AgentProcess] UI Culture: ru-RU
[2017-02-06 10:28:00Z INFO HostContext] Well known directory 'Bin': 'C:\agent\bin'
[2017-02-06 10:28:00Z INFO HostContext] Well known directory 'Root': 'C:\agent'
[2017-02-06 10:28:00Z INFO AgentProcess] Validating directory permissions for: 'C:\agent'
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Generation: '1'
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1', value name 'Install': '1'
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine', value name 'PowerShellVersion': '2.0'
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Unsupported version. Skipping.
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Generation: '3'
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3', value name 'Install': '1'
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'PowerShellVersion': '4.0'
[2017-02-06 10:28:00Z INFO PowerShellExeUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine', value name 'ApplicationBase': 'C:\Windows\System32\WindowsPowerShell\v1.0'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework', value name 'InstallRoot': 'C:\Windows\Microsoft.NET\Framework64\'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP' contains sub keys:
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'CDF'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'v2.0.50727'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'v3.0'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'v3.5'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'v4'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'v4.0'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Version': '2.0.50727.4927'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727', value name 'Install': '1'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Found version: 2.0.50727
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Version': '3.0.30729.4926'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0', value name 'Install': '1'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.0'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Found version: 3.0
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Version': '3.5.30729.4926'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5', value name 'Install': '1'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Testing directory: 'C:\Windows\Microsoft.NET\Framework64\v3.5'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Found version: 3.5
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name 'Version' is null.
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4', value name '' is null.
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4' contains sub keys:
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'Client'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 'Full'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Version': '4.6.01590'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Install': '1'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client', value name 'Release': '394806'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Type is System.Int32
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Version': '4.6.01590'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Install': '1'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'InstallPath': 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', value name 'Release': '394806'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Type is System.Int32
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Interpreted version: 4.6.2
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name 'Version' is null.
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Key name 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4.0', value name '': 'deprecated'
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Found 5 versions:
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 2.0.50727
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 3.0
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 3.5
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 4.6.2
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] 4.6.2
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.5'
[2017-02-06 10:28:00Z INFO CommandLineParser] Parse
[2017-02-06 10:28:00Z INFO CommandLineParser] Parsing 1 args
[2017-02-06 10:28:00Z INFO CommandLineParser] parsing argument
[2017-02-06 10:28:00Z INFO CommandLineParser] HasArgs: False
[2017-02-06 10:28:00Z INFO CommandLineParser] Adding Command: configure
[2017-02-06 10:28:00Z INFO AgentProcess] Arguments parsed
[2017-02-06 10:28:00Z INFO ProxyConfiguration] Config proxy at: https://127.0.0.1:8888.
[2017-02-06 10:28:00Z INFO ProxyConfiguration] Config proxy use DefaultNetworkCredentials.
[2017-02-06 10:28:00Z INFO Agent] ExecuteCommand
[2017-02-06 10:28:00Z INFO ConfigurationStore] currentAssemblyLocation: C:\agent\bin\Agent.Listener.dll
[2017-02-06 10:28:00Z INFO ConfigurationStore] binPath: C:\agent\bin
[2017-02-06 10:28:00Z INFO ConfigurationStore] RootFolder: C:\agent
[2017-02-06 10:28:00Z INFO ConfigurationStore] ConfigFilePath: C:\agent\.agent
[2017-02-06 10:28:00Z INFO ConfigurationStore] CredFilePath: C:\agent\.credentials
[2017-02-06 10:28:00Z INFO ConfigurationStore] ServiceConfigFilePath: C:\agent\.service
[2017-02-06 10:28:00Z INFO CommandSettings] Flag 'help': 'False'
[2017-02-06 10:28:00Z INFO CommandSettings] Flag 'version': 'False'
[2017-02-06 10:28:00Z INFO CommandSettings] Flag 'commit': 'False'
[2017-02-06 10:28:00Z INFO CommandSettings] Command 'configure': 'True'
[2017-02-06 10:28:00Z INFO ConfigurationManager] ConfigureAsync
[2017-02-06 10:28:00Z INFO ConfigurationStore] IsConfigured()
[2017-02-06 10:28:00Z INFO ConfigurationStore] IsConfigured: False
[2017-02-06 10:28:00Z INFO ConfigurationManager] Is configured: False
[2017-02-06 10:28:00Z INFO NetFrameworkUtil] Testing for min NET Framework version: '4.6'
[2017-02-06 10:28:00Z INFO Terminal] WRITE LINE:
[2017-02-06 10:28:00Z INFO Terminal] WRITE LINE: >> Подключение:
[2017-02-06 10:28:00Z INFO Terminal] WRITE LINE:
[2017-02-06 10:28:00Z INFO CommandSettings] Arg 'url': ''
[2017-02-06 10:28:00Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-06 10:28:00Z INFO PromptManager] ReadValue
[2017-02-06 10:28:00Z INFO Terminal] WRITE: Введите "URL-адрес сервера" >
[2017-02-06 10:28:00Z INFO Terminal] READ LINE
[2017-02-06 10:28:15Z INFO Terminal] Read value: 'https://pc-19/tfs'
[2017-02-06 10:28:15Z INFO ConfigurationManager] GetCredentialProvider
[2017-02-06 10:28:15Z INFO CommandSettings] Arg 'auth': ''
[2017-02-06 10:28:15Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-06 10:28:15Z INFO PromptManager] ReadValue
[2017-02-06 10:28:15Z INFO Terminal] WRITE: Введите "тип аутентификации" (нажмите клавишу ВВОД для "Integrated") >
[2017-02-06 10:28:15Z INFO Terminal] READ LINE
[2017-02-06 10:28:20Z INFO Terminal] Read value: 'PAT'
[2017-02-06 10:28:20Z INFO ConfigurationManager] Creating credential for auth: PAT
[2017-02-06 10:28:20Z INFO CredentialManager] GetCredentialProvider
[2017-02-06 10:28:20Z INFO CredentialManager] Creating type PAT
[2017-02-06 10:28:20Z INFO CredentialManager] Creating credential type: PAT
[2017-02-06 10:28:20Z INFO PersonalAccessToken] EnsureCredential
[2017-02-06 10:28:20Z INFO CommandSettings] Arg 'token': ''
[2017-02-06 10:28:20Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-06 10:28:20Z INFO PromptManager] ReadValue
[2017-02-06 10:28:20Z INFO Terminal] WRITE: Введите "личный маркер доступа" >
[2017-02-06 10:28:20Z INFO Terminal] READ SECRET
[2017-02-06 10:28:27Z INFO Terminal] Read value: '********'
[2017-02-06 10:28:27Z INFO PersonalAccessToken] GetVssCredentials
[2017-02-06 10:28:27Z INFO PersonalAccessToken] token retrieved: 52 chars
[2017-02-06 10:28:27Z INFO ConfigurationManager] cred retrieved
[2017-02-06 10:28:27Z INFO Terminal] WRITE LINE: Подключение к серверу...
[2017-02-06 10:28:27Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-06 10:28:27Z ERR Terminal] WRITE ERROR (exception):
[2017-02-06 10:28:27Z ERR Terminal] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: Параметр задан неверно
at System.Net.Http.WinHttpAuthHelper.SetWinHttpCredential(SafeWinHttpHandle requestHandle, ICredentials credentials, Uri uri, UInt32 authScheme, UInt32 authTarget)
at System.Net.Http.WinHttpAuthHelper.CheckResponseForAuthentication(WinHttpRequestState state, UInt32& proxyAuthScheme, UInt32& serverAuthScheme)
at System.Net.Http.WinHttpHandler.<StartRequest>d__101.MoveNext()
--- 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.ConfigurationManager.<TestConnectAsync>d__10.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-02-06 10:28:27Z ERR Terminal] WRITE ERROR: Не удалось подключиться. Повторите попытку или нажмите клавиши CTRL+C для выхода.
[2017-02-06 10:28:27Z INFO CommandSettings] Arg 'url': ''
[2017-02-06 10:28:27Z INFO CommandSettings] Flag 'unattended': 'False'
[2017-02-06 10:28:27Z INFO PromptManager] ReadValue
[2017-02-06 10:28:27Z INFO Terminal] WRITE: Введите "URL-адрес сервера" >
[2017-02-06 10:28:27Z INFO Terminal] READ LINE
@zaero33 you can add NTLM to the auth provider.

When you got 401 for PAT, is there any error shows in the event log of your TFS AT?
Also, did your PAT expired?
Hello,
Thanks for the answer.
For the NTLM:
Oh, that seems to be the problem reason. I confused the "Basic authentication" with "Windows authentication".
I don't have the Windows Authentication in an authentication types list, only the Basic one. And cannot install it from Windows Features, because of Windows 8 restriction (it's available only in Ultimate, Professional and Enterprise editions).
For the PAT:
The token is valid. It was just created and will expire in 1 year.
Do you mean the windows event log for TFS (Windows Event Viewer -> Applications and Services Logs) -> Microsoft-Team Foundation Server -> Debug)? There are no errors on Authentication try. Only the Info Messages that appear periodically.
BTW, I am using a self-signed SHA-1 certificate, created in IIS for the TFS application. The Google Chrome shows the unsafe connection warning because considers SHA-1 as unsafe.
Can it be the reason of incorrect Token-based authentication?
@zaero33
NTLM or kerberos is required for Windows Auth, if you want to use Basic Auth, during configure type: ALT for Auth type instead of Integrated.
In order for figure out why PAT not working, we need these following information:
I don't know whether SHA-1 cert is supported or not.
Did you solve this? I have the same problem
Sorry, I gave up.
I've switched to Windows Server machine. The agents were registered correctly there.
close as customer unblocked.
Most helpful comment
Did you solve this? I have the same problem