Azure DevOps自托管代理任务下载过慢导致初始化失败
Azure DevOps自托管代理任务下载卡顿/失败问题排查求助
环境
- 操作系统:Ubuntu Server 24.04 LTS
- 代理版本:4.264.2
- 虚拟化方式:VirtualBox虚拟机
- 所在地:巴西
- 公网IP:
177.55.197.91(IPv4)和2804:56c:b971:2a00:2ca1:4459:faf9:47ad(IPv6)
代理已成功连接并显示在线,但所有任务下载(如NodeTool、UsePythonVersion)均失败。
症状
- 下载速度稳定在约10 KB/s
- 初始化最终因“Connection reset by peer”失败
- 管道从未启动实际步骤,仅循环显示“正在下载任务…”
错误截图:
已尝试的操作
我在VirtualBox中测试了多种网络/虚拟机配置:
- 桥接适配器
- NAT
- 仅主机模式+NAT
- 更换DNS解析器(谷歌、Cloudflare、本地)
- 禁用防火墙
- 启用防火墙并添加明确允许规则
- 使用Squid配置HTTPS缓存代理
所有场景下问题均存在。
日志详情(完整异常)
[debug]System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException (104): Connection reset by peer at System.Net.Sockets.NetworkStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken) at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.Sockets.SocketAsyncEventArgs.TransferCompletionCallbackCore(Int32 bytesTransferred, Memory`1 socketAddress, SocketFlags receivedFlags, SocketError socketError) at System.Net.Sockets.SocketAsyncEngine.System.Threading.IThreadPoolWorkItem.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() --- End of stack trace from previous location --- --- End of inner exception stack trace --- at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory`1 buffer, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at System.Net.Http.HttpConnection.FillAsync(Boolean async) at System.Net.Http.HttpConnection.CopyToContentLengthAsync(Stream destination, Boolean async, UInt64 length, Int32 bufferSize, CancellationToken cancellationToken) at System.Net.Http.HttpConnection.ContentLengthReadStream.CompleteCopyToAsync(Task copyTask, CancellationToken cancellationToken) at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.DownloadAsync(IExecutionContext executionContext, TaskStepDefinitionReference task) at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.DownloadAsync(IExecutionContext executionContext, IEnumerable`1 steps) at Microsoft.VisualStudio.Services.Agent.Worker.JobExtension.InitializeJob(IExecutionContext jobContext, AgentJobRequestMessage message)
技术问询
是否有人遇到过类似情况:Azure DevOps自托管代理仅在下载Azure任务时速度极慢?这是否与VirtualBox网络、巴西CDN节点问题、Azure限流或其他因素有关?恳请提供可行的配置方案、网络调整建议或问题排查思路。
内容的提问来源于stack exchange,提问作者Lucas Venezian Povoa
相关产品推荐
相关产品推荐

