TFS: 解决The build agent error - the session for this agent already exists
来源:http://ericphan.net/blog/2016/6/10/solving-the-tfs-build-agent-error-the-session-for-this-agent-already-exists
Recently we've been getting the following error for our TFS build agents which caused all our builds to fail
Figure: TFS Builds are failing
The error reported is "The job has been abandoned because agent <agent name> did not renew the lock. Ensure agent is running, not sleeping, and has not lost communication with the service."
Investigating the _diag folder of the build agent itself reveals the actual error.
---------------------------------------------------------------------------
The session for this agent already exists. Sleeping for 30 seconds before next retry. Attempts=1/10.
---------------------------------------------------------------------------
Microsoft.TeamFoundation.DistributedTask.WebApi.TaskAgentSessionConflictException: The task agent Agent-SYDTFSBLDP01-1 already has an active session for owner SYDTFSBLDP01.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__79.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__76`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__65`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__64`1.MoveNext()
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__79.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__76`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__65`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__64`1.MoveNext()
To fix this issue, you need to re-run the ConfigureAgent.cmd and on the first option "Do you want to also replace the server registration (default is N)" Choose "Y"
(这里我遇到的情况略有不同,我用到的ConfigureAgent文件的后缀是ps1,即是powershell文件,故需要以管理员权限打开powershell,然后运行ConfigureAgent)
PS C:\Agents\2> .\ConfigureAgent.cmd
An existing configuration file was detected. This will update the local agent settings. Do you want to also replace th
e server registration (default is N)? Y
This will remove the existing agent registration and clean up the locked "session".
TFS: 解决The build agent error - the session for this agent already exists的更多相关文章
- vue项目报错,解决Module build failed: Error: Cannot find module 'node-sass' 问题
1.报错问题 1 E:\WebStormFile\treehole-manage>npm run dev > xc-ui-pc-sysmanage@1.0.0 dev E:\WebStor ...
- 解决:install service error: InstallAsEventCreate() failed: xxx registry key already exists
目录 一.事故现场 二.分析 三.解决方案 一.事故现场 在windows系统下安装服务,cmd窗口执行如下命令: "E:\work\_base\PsUm\PsUser\LdapWebSer ...
- vue-cli 报Module build failed: Error: No parser and no file path given, couldn't infer a parser.错的解决方法
出错提示如下: ERROR Failed to compile with errors :: error in ./src/App.vue Module build failed: Error: No ...
- 解决 Your project contains error(s),please fix them before running your application问题
原文地址: Android笔记:解决 Your project contains error(s),please fix them before running your application问题 ...
- Xcode export/upload error: Your session has expired. Please log in-b
1.Xcode export/upload error: Your session has expired. Please log in 我在stack over flow上找到的答案: 一看pre ...
- vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.
ERROR Failed to compile with 2 errors 12:00:33 error in ./src/App.vue Module build failed: Error: No ...
- 配置web pack loader 报错:Module build failed: Error: The node API for `babel` has been moved to `babel-core`.
报错如下 Module build failed: Error: The node API for `babel` has been moved to `babel-core`. 在我配置loader ...
- Module build failed: Error: Cannot find module 'url-loader' 的坑
本文地址:http://www.cnblogs.com/jying/p/8280956.html 开发环境:react.webpack.es5 引用图片报错:Module build failed: ...
- Android笔记:解决 Your project contains error(s),please fix them before running your application问题
解决 Your project contains error(s),please fix them before running your application问题 貌似好多人都有遇到这问题,而且网 ...
随机推荐
- css模拟时钟
css模拟时钟 思路: 画时钟数字(x,y)坐标 x = x0 + r*cos(deg) y = y0 + r*sin(deg) 知识点: 创建元素: createElement 添加元素: appe ...
- Shell-自动建立全国城市
Code: #!/bin/bash function mkdirFun() { if [ ! -d $1 ];then mkdir -p $1 fi } filename=city1.txt date ...
- Go语言中的struct tag
有时在Go的结构体定义时会看到这样的形式: type User struct { UserId int `json:"user_id" bson:"b_user_id&q ...
- for..of和for..in和map、filter等循环区别
1.for in遍历的是数组的索引(即键名),而for of遍历的是数组元素值. for in遍历比较适合遍历对象,不太适合数组,有可能遍历出来的不按照顺序 遍历数组 ,,,,,] for (var ...
- 【转】C++ 11 并发指南一(C++ 11 多线程初探)
引言 C++ 11自2011年发布以来已经快两年了,之前一直没怎么关注,直到最近几个月才看了一些C++ 11的新特性,算是记录一下自己学到的东西吧,和大家共勉. 相信Linux程序员都用过Pthrea ...
- Minidump文件分析
原文地址:blog.csdn.net/pkrobbie/article/details/6636310 简介 在过去几年里,崩溃转储(crash dump)成为了调试工作的一个重要部分.如果软件在客户 ...
- 【笔记】[WIN7x64] ThinkPad E420开机不能按设置关闭触控板的问题
将win7x32重装为Win7x64后,TouchPad(以下简称TP)就不能在开机时按照在控制面板-鼠标中的设置关闭TP, 从而每次开机都必须去点开控制面板->鼠标 才能关闭TP.因为通常不用 ...
- EasyUI tree 选中父节点子节点全部选中,选中子节点父节点不选中
需求:EasyUI tree 选中父节点子节点全部选中,选中子节点父节点不选中 效果: /** * 给树增加onCheck事件,首先使用cascadeCheck:false属性禁止全选, ...
- python 安装mysql报错
原 安装Python mysqlclient出现“OSError: mysql_config not found”错误 2016年06月01日 12:15:11 wangtaoking1 阅读数:11 ...
- ORA-00257 archiver error. 错误的处理方法
archive log 日志已满 方法/步骤 1 SecureCRT登录服务器,切换用户oracle,连接oracle [root@userbeta~]# su - oracle [oracle@us ...