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

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

问题描述

我们最近从本地 TFS2013 升级到 2015 Update1,并设置了 VSO 构建代理.

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天全站免登陆