TFS 构建代理 (vNext),获取 TF246017(无法连接到数据库)

TFS Build Agent (vNext), Get TF246017 (could not connect to database)

我尝试设置一个新的 TFS Build 代理(TFS 2015,Build "vNext")。触发构建时出现奇怪的错误。

以下设置:

代理出现在 TFS-Webaccess 中并且标记为在线(绿色),所以我猜连接设置正确。 Agent green

现在,当构建被触发时,代理似乎开始工作,但一段时间后,一个条目被写入日志:

Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: TF246017: Team Foundation Server could not connect to the database. Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server.

使用 Webaccess 没问题,工作完美。 对此有什么想法吗?

更新 我试图从另一个 Internet 服务器连接构建代理。当代理尝试 运行 构建时,我遇到另一个错误:

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8080

我的 TFS 服务器是通过 https://tfs.xxx.yy/tfs 访问的。

为了缩小问题范围,您能否核实以下信息:

  • 数据库是 运行 并且正在接收 IP 连接
  • 您的账户有权访问数据库实例
  • A​​T 和 DT 服务器之间没有防火墙规则 会阻塞 SQL 个端口
  • 您的帐户有权连接到 Team Foundation 管理控制台(如果没有,请让管理员将您添加到 管理控制台用户列表)

大部分可能性与帐户权限有关。否则,您需要通过系统和SQL 日志来查找连接尝试和拒绝原因。

我想我终于找到了解决办法。它与 DNS 和 TFS-Online-Server 的配置有关。我现在可以构建一个小测试项目了。

@Patrick-MSFT:非常感谢您的支持!