在 TFS 2015 上构建的 vNext 在 MSBuild 步骤上挂起并且不产生任何日志文件 [英] vNext build on TFS 2015 hangs on MSBuild step and produces no log files

查看:13
本文介绍了在 TFS 2015 上构建的 vNext 在 MSBuild 步骤上挂起并且不产生任何日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近从本地 TFS2013 升级到 2015 Update1,并且我们已经设置了 VSO Build Agent.

We have recently upgraded from on-premises TFS2013 to 2015 Update1, and we have set up a VSO Build Agent.

我现在正在尝试为我们的 Git 存储库中的解决方案设置测试(持续集成)vNext 构建,但构建未运行并且不生成任何日志.

I am now trying to set up a test (continuous integration) vNext build for a solution in our Git repository, but the builds are not running and not producing any logs.

已设置构建属性以指示正确的 Git 存储库,并将以下三个添加到变量中:VSO_GIT_USERNAME、VSO_GIT_PASSWORD、DNXPath.MSBuild 是目前添加到构建中的唯一步骤.

The build properties have been set up to indicate the correct Git repo, and the following three have been added to Variables: VSO_GIT_USERNAME, VSO_GIT_PASSWORD, DNXPath. MSBuild is the only step added to the build at the present.

推送提交导致构建按预期触发,但是当构建被触发时,它只是挂起等待代理的控制台输出":

Pushed commits result in builds being triggered as expected, but when a build is triggered, it just hangs "Waiting for console output from an agent":

代理似乎没有任何问题:

There doesn't seem to be anything wrong with the agent:

  • 它显示为正在运行(在 services.msc 中检查)
  • 它没有 SSL 依赖
  • 端口 9191 已添加到 TFS 服务器防火墙的入站规则中
  • 代理正在使用项目集合构建服务"权限运行
  • 代理在 Web 访问中显示为​​绿色:

当我取消构建并下载日志文件时,zip 文件为空.

When I cancel the build and download log files, the zip file is empty.

当我手动对构建进行排队(针对特定的提交 #)时,也会发生同样的情况:没有构建运行,也没有日志文件.

The same happens when I queue a build manually (against a specific commit #): no build runs and no log files.

我应该做什么/检查才能使我的构建进度或使其生成日志文件?

有人可以建议前进的方向吗?

Can anybody suggest a way forward?

推荐答案

好的,找到解决方案了!在我的特殊情况下,我使用防火墙接口 (Windows Server 2012 R2) 设置了端口 9191,它的入站规则看起来不错且活跃.但它撒谎了.

Ok, solution found! In my particular case I set up port 9191 using Firewall interface (Windows Server 2012 R2), and the inbound rule for it looked nice and active. But it lied.

当我请我的好同事 Marc 检查端口是否真的正常时,他在 TFS 机器上的 PowerShell 中运行了 Get-NetFirewallPortFilter,但我的端口从列表中丢失了!

When I asked a good colleague of mine, Marc, to check if the port was really ok, he ran Get-NetFirewallPortFilter in PowerShell on the TFS machine and my port was missing from the list!

他建议的解决方案是运行以​​下 PowerShell 脚本(因为防火墙正在运行):

The solution he suggested was to run the following PowerShell script (since Firewall was playing up):

   $port = New-Object -ComObject HNetCfg.FWOpenPort
   $port.Port = 9191
   $port.Name = 'TFS CI Port:9191'
   $port.Enabled = $true

   $fwMgr = New-Object -ComObject HNetCfg.FwMgr
   $profile = $fwMgr.LocalPolicy.CurrentProfile
   $profile.GloballyOpenPorts.Add($port)

运行后,端口 9191 的入站规则出现在防火墙入站规则中.

Once this was run, an inbound rule for port 9191 appeared in Firewall inbound rules.

然后我手动将构建排入队列,第一次看到它失败(不是挂起!),还有日志文件!:)

I then manually queued the build, and for the first time saw it fail (not hang!), and with log files at that! :)

这篇关于在 TFS 2015 上构建的 vNext 在 MSBuild 步骤上挂起并且不产生任何日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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