gpt4 book ai didi

tfs - 构建代理无法下载可用的工作区

转载 作者:行者123 更新时间:2023-12-04 15:48:04 25 4
gpt4 key购买 nike

我们最近将 TFS 从 TFS 2015 升级到 TFS 2018。我们将基础架构中的构建代理更改为新代理版本 2.122.1

当开发人员提交他们的变更集或执行计划的构建时,有时构建会按预期进行处理,但有时我们会在从 TFS 存储库检索源时收到奇怪的错误。

在构建日志中,它们被记录为:

2018-01-03T15:01:25.6074314Z Querying workspace information.

2018-01-03T15:01:26.5136788Z ##[error]There is an error in XML document (1, 1).

如果我打开代理详细日志,我得到以下信息:

[2018-01-03 15:01:25Z INFO ProcessInvoker] Starting process:

[2018-01-03 15:01:25Z INFO ProcessInvoker] File name: 'tf'

[2018-01-03 15:01:25Z INFO ProcessInvoker] Arguments: 'vc workspaces /format:xml /collection:http://servername:8080/tfs/ProjectCollection/ /loginType:OAuth /login:.,******** /noprompt'

[2018-01-03 15:01:25Z INFO ProcessInvoker] Working directory: 'C:\Agent2017\_work\10\s'

[2018-01-03 15:01:25Z INFO ProcessInvoker] Require exit code zero: 'True'

[2018-01-03 15:01:25Z INFO ProcessInvoker] Encoding web name: windows-1252 ; code page: '1252'

[2018-01-03 15:01:25Z INFO ProcessInvoker] Force kill process on cancellation: 'False'

[2018-01-03 15:01:25Z INFO ProcessInvoker] Process started with process id 3524, waiting for process exit.

[2018-01-03 15:01:25Z INFO JobServerQueue] Try to append 1 batches web console lines, success rate: 1/1.

[2018-01-03 15:01:25Z INFO JobServerQueue] Try to upload 1 log files or attachments, success rate: 1/1.

[2018-01-03 15:01:26Z INFO ProcessInvoker] Finished process with exit code 0, and elapsed time 00:00:00.5240505.

[2018-01-03 15:01:26Z ERR StepsRunner] Caught exception from step: System.InvalidOperationException: There is an error in XML document (1, 1). ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlReader.MoveToContent() at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderTFWorkspaces.Read5_Workspaces() --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, Object events) at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader) at Microsoft.VisualStudio.Services.Agent.Worker.Build.TFCommandManager.d__31.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.Worker.Build.TfsVCSourceProvider.d__3.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.Worker.Build.BuildJobExtension.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 Microsoft.VisualStudio.Services.Agent.Worker.JobExtensionRunner.d__20.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.Worker.StepsRunner.d__1.MoveNext() [2018-01-03 15:01:26Z INFO StepsRunner] Step result: Failed

代理似乎正在尝试获取可用工作空间的列表,但失败了。如果我尝试在运行代理的计算机上以适当的权限执行命令,我将获得正确的工作区列表。

最佳答案

  1. 尝试使用 system.debug = true 对构建进行排队,您将在日志中获得更多信息。检查日志以获取详细的错误消息。
  2. 在 VS/Team Explorer 中删除构建过程创建的所有工作区,如以下名称:ws_1_2,并将 Get Source 任务中的 clean 选项设置为 true,然后尝试运行构建再次。

关于tfs - 构建代理无法下载可用的工作区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48080634/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com