构建失败 - TF400813:资源不可用于匿名访问。需要客户端验证。 - On-Prem TFS 2017 [英] Builds Failing - TF400813: Resource not available for anonymous access. Client authentication required. - On-Prem TFS 2017

查看:603
本文介绍了构建失败 - TF400813:资源不可用于匿名访问。需要客户端验证。 - On-Prem TFS 2017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前在本地使用Team Foundation Server 2017 Update 2(RC2)。我有几个TFS 2017 Windows构建代理,现在不会构建。在提交构建时,服务器连接到代理,并停止显示文本'等待来自
代理的控制台输出...'。  查看代理日志文件时,这是每个构建代理上发生的错误:

Currently using Team Foundation Server 2017 Update 2 (RC2) on-prem. I have several TFS 2017 Windows build agents that now will not build. when submitting a build, the server connects to the agent and it stops with the text 'Waiting for console output from an agent...'.   When looking at the agent log file, this is the error that is occurring on each build agent:

[2017-07-18 16:55:05Z INFO JobRunner]使用URL创建作业服务器:
http://tfs.myserver.com:8080/tfs/TEST1/


[2017-07-18 16:55:05Z INFO工作人员]收听来自频道的取消留言。

[2017-07-18 16:55:05Z INFO Worker]等待作业完成或来自频道的取消消息。

[2017-07-18 16:55:08Z INFO JobServer]在连接期间捕捉异常。剩下4次尝试。

[2017-07-18 16:55:08Z ERR  JobServer] Microsoft.VisualStudio.Services.Common.VssUnauthorizedException:TF400813:资源不可用于匿名访问。需要客户身份验证。

  在Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler。< SendAsync> d__17.MoveNext()

---从抛出异常的上一个位置开始的堆栈跟踪结束---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

  在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()

  在Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler。< SendAsync> d__4.MoveNext()

---从抛出异常的上一个位置开始的堆栈跟踪结束---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

  在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)

  在Microsoft.VisualStudio.Services.Agent.ThrottlingReportHandler。< SendAsync> d__2.MoveNext()

[2017-07-18 16:55:05Z INFO JobRunner] Creating job server with URL: http://tfs.myserver.com:8080/tfs/TEST1/
[2017-07-18 16:55:05Z INFO Worker] Listening for cancel message from the channel.
[2017-07-18 16:55:05Z INFO Worker] Waiting for the job to complete or for a cancel message from the channel.
[2017-07-18 16:55:08Z INFO JobServer] Catch exception during connect. 4 attemp left.
[2017-07-18 16:55:08Z ERR  JobServer] 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 Microsoft.VisualStudio.Services.Agent.ThrottlingReportHandler.<SendAsync>d__2.MoveNext()

IIS设置已被确认正确。  ;使用构建服务帐户,我可以通过Web从构建计算机进行连接。 我已经尝试清理服务器和构建计算机客户端上的本地缓存而不做任何更改。 这个
在应用TFS服务器更新2(RC2)之前完美运行。 

IIS settings have been confirmed correct.  Using the build service account, I am able to connect via the web from the build machines.  I have tried clean the local cache on both the server and the build machine clients with no change.  This worked perfectly prior to applying TFS Server Update 2 (RC2). 

关于如何修复此问题的任何想法?

Any ideas on how to repair this?

推荐答案

您好scooter83,

Hi scooter83,

您的TFS 2017.2 RC2是否已从早期版本升级?

Was your TFS 2017.2 RC2 upgraded from a earlier version?

那里是针对此错误的解决方案:

There is a solution for this error:

在我们的升级期间,TFS似乎没有为服务器注册OAuth令牌。

SQL推荐给执行是:

使用FQDN(即tfs-server.doman.com)

EXEC prc_SetRegistryValue 1,'#\Configuration\OAuth\TrustedIssuers\tfs-sever.domain.com\','Microsoft.TeamFoundation.Framework.Server.OAuth.ClientAuthTokenValidator'

这阻止了所有用户在TFS服务器重启后登录。

然后我们尝试使用服务器名称(即tfs-server)

EXEC prc_SetRegistryValue 1,'#\Configuration\OAuth\TrustedIssuers\tfs-server\','Microsoft.TeamFoundation.Framework.Server.OAuth.ClientAuthTokenValidator'

这个n允许正常用户登录,并且在服务器重新启动并重新注册所有构建代理之后,构建最终工作。

最好的问候


这篇关于构建失败 - TF400813:资源不可用于匿名访问。需要客户端验证。 - On-Prem TFS 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆