Jenkins作业排队使用ECONNREFUSED后,MSBuild失败,网址不正确

时间:2017-01-12 16:33:32

标签: jenkins msbuild tfs2017

我一直在寻找这个问题的答案。我们刚在开发实验室中设置了TFS2017,我正在努力将Release Management与Jenkins构建环境集成在一起。我已成功使用MSBUILD构建SQL Server项目,但遇到了MSBUILD队列jenkins作业并等待它完成的问题。

下面是构建的调试日志的摘录。请注意,在createRootJob的行中,正在传递url,但在:8080端口之前有一个正斜杠。

此构建服务器在8080端口上运行Jenkins,并安装了Visual Studio,以及构建代理。 TFS服务器是不同的服务器。

Jenkins构建完成,但MSBUILD作业没有收到任何反馈。

我不确定是什么尝试设置从Jenkins到TFS的回调,但它显然是失败的。我不确定Jenkins或TFS工作中的失败是否是错误配置。

非常感谢任何帮助。感谢。

2017-01-12T05:09:22.3956535Z ##[debug]teamBuildPostData = {"url":"http://10.XX.YY.ZZ:8080/team-build/build/MCC_BuildTest?delay=0sec","form":{"json":"{\"team-build\":{\"System.Debug\":\"true\",\"Agent.BuildDirectory\":\"D:\\\\agent\\\\_work\\\\1\",\"Agent.HomeDirectory\":\"D:\\\\agent\",\"Agent.Id\":\"4\",\"Agent.MachineName\":\"CBA-FS1\",\"Agent.Name\":\"CBA-FS1\",\"Agent.WorkFolder\":\"D:\\\\agent\\\\_work\",\"Build.ArtifactStagingDirectory\":\"D:\\\\agent\\\\_work\\\\1\\\\a\",\"Build.BuildId\":\"6369\",\"Build.BuildNumber\":\"20170112.1\",\"Build.BuildUri\":\"vstfs:///Build/Build/6369\",\"Build.BinariesDirectory\":\"D:\\\\agent\\\\_work\\\\1\\\\b\",\"Build.DefinitionName\":\"Jenkins_BuildTest\",\"Build.DefinitionVersion\":\"5\",\"Build.QueuedBy\":\"Brad\",\"Build.QueuedById\":\"a47e4a97-b165-4a20-961a-1598b4b3c056\",\"Build.Repository.Clean\":\"false\",\"Build.Repository.LocalPath\":\"D:\\\\agent\\\\_work\\\\1\\\\s\",\"Build.Repository.Name\":\"MCC\",\"Build.Repository.Provider\":\"TfsVersionControl\",\"Build.Repository.Tfvc.Workspace\":\"ws_1_4\",\"Build.Repository.Uri\":\"http://ops-tfs:8080/tfs/DefaultCollection/\",\"Build.RequestedFor\":\"Brad\",\"Build.RequestedForId\":\"a47e4a97-b165-4a20-961a-1598b4b3c056\",\"Build.SourceBranch\":\"$/MCC/src-1.28.1\",\"Build.SourceBranchName\":\"src-1.28.1\",\"Build.SourcesDirectory\":\"D:\\\\agent\\\\_work\\\\1\\\\s\",\"Build.SourceVersion\":\"2691\",\"Build.StagingDirectory\":\"D:\\\\agent\\\\_work\\\\1\\\\a\",\"Build.Repository.Git.SubmoduleCheckout\":\"False\",\"Common.TestResultsDirectory\":\"D:\\\\agent\\\\_work\\\\1\\\\TestResults\",\"System.CollectionId\":\"30782aca-7b73-4bc1-974b-eb76fc3f951d\",\"System.DefaultWorkingDirectory\":\"D:\\\\agent\\\\_work\\\\1\\\\s\",\"System.DefinitionId\":\"21\",\"System.TeamFoundationCollectionUri\":\"http://ops-tfs:8080/tfs/DefaultCollection/\",\"System.TeamProject\":\"MCC\",\"System.TeamProjectId\":\"8531d7a1-5c3c-409d-a1e7-f5ce08b36461\",\"TF_BUILD\":\"True\"},\"parameter\":[{\"name\":\"target.config\",\"value\":\"test44\"}]}"},"strictSSL":true,"headers":{"Jenkins-Crumb":"a204374503ffe8fc12e604c393df0912"}}
2017-01-12T05:09:22.5206535Z ##[debug]submitJob().teamBuildRequestCallback(teamBuildPostData)
2017-01-12T05:09:22.5206535Z Jenkins job queued
2017-01-12T05:09:22.5206535Z ##[debug]createRootJob(): http://10.XX.YY.ZZ/:8080/queue/item/4/api/json
2017-01-12T05:09:23.5362554Z ##[debug]createRootJob().requestCallback()
2017-01-12T05:09:23.5362554Z Error: connect ECONNREFUSED 10.XX.YY.ZZ:80
2017-01-12T05:09:23.5362554Z ##[debug]connect ECONNREFUSED 10.XX.YY.ZZ:80
2017-01-12T05:09:23.5518798Z ##[debug]task result: Failed
2017-01-12T05:09:23.5518798Z ##[error]connect ECONNREFUSED 10.XX.YY.ZZ:80
2017-01-12T05:09:23.5518798Z ##[debug]Processed: ##vso[task.issue type=error;]connect ECONNREFUSED 10.XX.YY.ZZ:80
2017-01-12T05:09:23.5675053Z ##[debug]Processed: ##vso[task.complete result=Failed;]connect ECONNREFUSED 10.XX.YY.ZZ:80

1 个答案:

答案 0 :(得分:1)

我遇到了类似的问题,即使Jenkins成功完成,也没有来自MSBuild作业的反馈。在调试模式下运行构建显示同样我有连接错误:

2017-02-23T23:22:15.6421740Z ##[debug]createRootJob(): http://localhost:8080/queue/item/162/api/json
2017-02-23T23:22:19.8729510Z ##[debug]createRootJob().requestCallback()
2017-02-23T23:22:19.8750960Z ##[debug]Error: socket hang up

我最终解决了这个问题,确保我的Jenkins配置网址在Jenkins设置中列出正确: 詹金斯>管理Jenkins>配置系统>詹金斯位置>詹金斯网址