Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
134 views
in Technique[技术] by (71.8m points)

TeamCity build agent disconnected

I installed a build agent on Windows 7 and always have the agent show up as "disconnected". The log teamcity-agent.txt shows below information

 If this is the first time this agent registered on the server make sure it is     authorized by administrator in the server web UI. 
[2012-09-05 02:56:14,416]   INFO -    jetbrains.buildServer.AGENT - Agent registration finished. 
[2012-09-05 02:56:14,418]   INFO -    jetbrains.buildServer.AGENT - Stop command was not performed. No build to stop with reason: BuildInterruptReason.AGENT_SHUTDOWN 
[2012-09-05 02:56:14,418]   INFO -    jetbrains.buildServer.AGENT - Starting agent shutdown sequence, reason: Restart agent, failed to download upgrade from server 
[2012-09-05 02:56:14,424]   INFO -    jetbrains.buildServer.AGENT - Host configuration for downloading updates: HostConfiguration[host=http://myteamcity:8080] 
[2012-09-05 02:56:14,424]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/teamcity-agent.xml ==> C:BuildAgentempiQ0fjie6zR125neulJeqiYauT8zQ5zOI 
[2012-09-05 02:56:15,070]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/agentSystemInfo.zip ==> C:BuildAgentupdatepluginsagentSystemInfo.zip 
[2012-09-05 02:56:15,747]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/amazonEC2.zip ==> C:BuildAgentupdatepluginsamazonEC2.zip 
[2012-09-05 02:56:16,617]   INFO - agent.impl.AgentPortFileWriter - Delete agent runtime file from C:BuildAgentlogsuildAgent.port 
[2012-09-05 02:56:16,619]   INFO -    jetbrains.buildServer.AGENT - Unregistering from build server: 18 
[2012-09-05 02:56:16,800]   INFO -    jetbrains.buildServer.AGENT - Shutdown agent WebServer start 
[2012-09-05 02:56:16,801]   INFO -    jetbrains.buildServer.AGENT - Shutdown agent WebServer finish 
[2012-09-05 02:56:16,801]   INFO -    jetbrains.buildServer.AGENT - Shutdown agent finish 
[2012-09-05 02:56:16,968]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/ant.zip ==> C:BuildAgentupdatepluginsant.zip 
[2012-09-05 02:56:50,086]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/antPlugin.zip ==> C:BuildAgentupdatepluginsantPlugin.zip 
[2012-09-05 02:56:52,070]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/assembly-info-patcher.zip ==> C:BuildAgentupdatepluginsassembly-info-patcher.zip 
[2012-09-05 02:56:53,464]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/clearcase-agent.zip ==> C:BuildAgentupdatepluginsclearcase-agent.zip 
[2012-09-05 02:56:55,375]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/cmake-runner.zip ==> C:BuildAgentupdatepluginscmake-runner.zip 
[2012-09-05 02:56:57,190]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/commandLineRunner.jar ==> C:BuildAgentupdatepluginscommandLineRunner.jar 
[2012-09-05 02:56:58,218]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/coveragePlugin.zip ==> C:BuildAgentupdatepluginscoveragePlugin.zip 
[2012-09-05 02:57:11,629]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/crashDetector.zip ==> C:BuildAgentupdatepluginscrashDetector.zip 
[2012-09-05 02:57:12,436]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/cvsAgent.zip ==> C:BuildAgentupdatepluginscvsAgent.zip 
[2012-09-05 02:57:20,720]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/dotCover.zip ==> C:BuildAgentupdatepluginsdotCover.zip 
[2012-09-05 02:58:00,011]   INFO -    jetbrains.buildServer.AGENT - Downloading http://myteamcity:8080/update/plugins/dotNetPlugin.zip ==> C:BuildAgentupdatepluginsdotNetPlugin.zip 

How can I get the agent connected?

question from:https://stackoverflow.com/questions/12279081/teamcity-build-agent-disconnected

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Here is a very comprehensive blog on re-connecting disconnected agents

http://michaelbarnesjr.wordpress.com/2012/10/18/teamcity-build-agent-disconnected/

Here are the steps (copied from the above link)

If an agent becomes disconnected for whatever reason, you can follow these steps to re-connect it:

  • ssh to the server that the disconnected agent is on.
  • go to the build agent’s bin directory (i.e. /opt/teamcity/buildagent/buildagent01/bin/)
  • su to the user that the agent runs as (i.e. appBuilder)
  • run agent.sh start

That will start the agent, and after a few seconds or so, the next time you go to TeamCity, it will be connected.

If Team City is running on a windows server, you can connect to that server, go to Services and restart the build agent that has become disconnected. Team City


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...