Agent: Unable to start upgrade: Connection reset - remains disconnected
On a clean install on a Windows 7 machine with all the default settings the agent starts ok but will not connect.
Looking at teamcity-agent.log there are endless entries as follows
[2009-10-28 21:43:04,129] WARN - jetbrains.buildServer.AGENT - Unable to start upgrade: Connection reset
[2009-10-28 21:43:04,130] INFO - jetbrains.buildServer.AGENT - Upgrade failed, restart build agent
[2009-10-28 21:43:04,816] INFO - jetbrains.buildServer.AGENT - Starting TeamCity agent
[2009-10-28 21:43:06,526] INFO - jetbrains.buildServer.AGENT - Calculating plugins signature for possible upgrade
[2009-10-28 21:43:06,548] INFO - jetbrains.buildServer.AGENT - Build Agent version: 9103, plugins signature: 0
[2009-10-28 21:43:06,619] WARN - jetbrains.buildServer.AGENT - Calculating CPU benchmark index...
[2009-10-28 21:43:25,850] WARN - jetbrains.buildServer.AGENT - CPU benchmark index is set to 161
[2009-10-28 21:43:25,892] WARN - ent.impl.AgentToolsManagerImpl - Tool ant was not found at C:\TeamCityServer\buildAgent\plugins\ant
[2009-10-28 21:43:25,892] WARN - ent.impl.AgentToolsManagerImpl - Tool idea was not found at C:\TeamCityServer\buildAgent\plugins\idea
[2009-10-28 21:43:25,892] WARN - ent.impl.AgentToolsManagerImpl - Tool maven was not found at C:\TeamCityServer\buildAgent\plugins\maven
[2009-10-28 21:43:26,714] INFO - jetbrains.buildServer.AGENT - Calculating plugins signature for possible upgrade
[2009-10-28 21:43:26,714] INFO - jetbrains.buildServer.AGENT - Build Agent version: 9103, plugins signature: 0
[2009-10-28 21:43:26,733] WARN - ent.impl.AgentToolsManagerImpl - Tool ant was not found at C:\TeamCityServer\buildAgent\plugins\ant
[2009-10-28 21:43:26,734] WARN - ent.impl.AgentToolsManagerImpl - Tool idea was not found at C:\TeamCityServer\buildAgent\plugins\idea
[2009-10-28 21:43:26,734] WARN - ent.impl.AgentToolsManagerImpl - Tool maven was not found at C:\TeamCityServer\buildAgent\plugins\maven
[2009-10-28 21:43:26,737] INFO - rver.plugins.PluginManagerImpl - ===========================================================
[2009-10-28 21:43:26,739] INFO - rver.plugins.PluginManagerImpl - Scanning plugin folder: C:\TeamCityServer\buildAgent\plugins
[2009-10-28 21:43:26,740] INFO - rver.plugins.PluginManagerImpl - Found 0 plugins: []
[2009-10-28 21:43:26,740] INFO - rver.plugins.PluginManagerImpl - Start intializing plugins...
[2009-10-28 21:43:26,741] INFO - rver.plugins.PluginsCollection - No plugins were loaded with standalone classloaders
[2009-10-28 21:43:26,741] INFO - rver.plugins.PluginsCollection - Load shared classloader for 0 plugins []
[2009-10-28 21:43:26,744] INFO - rver.plugins.PluginManagerImpl - Loaded 0 plugins: []
[2009-10-28 21:43:26,744] INFO - rver.plugins.PluginManagerImpl - ===========================================================
[2009-10-28 21:43:26,804] INFO - rectories.DirectoryCleanerImpl - Cannot locate .old for path 'C:\TeamCityServer\buildAgent\temp\cache'. Deleting files in place.
[2009-10-28 21:43:26,820] INFO - jetbrains.buildServer.AGENT - Start build agent
[2009-10-28 21:43:27,059] WARN - jetbrains.buildServer.AGENT - Starting agent Web server on port 9090
[2009-10-28 21:43:27,067] INFO - jetbrains.buildServer.AGENT - Agent Web server started
[2009-10-28 21:43:27,075] INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to C:\TeamCityServer\buildAgent\logs\buildAgent.port
[2009-10-28 21:43:27,076] INFO - agent.impl.AgentPortFileWriter - Launcher version is 9103
[2009-10-28 21:43:27,078] INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to C:\TeamCityServer\buildAgent\logs\buildAgent.port :DONE!
[2009-10-28 21:43:27,078] INFO - jetbrains.buildServer.AGENT - Build agent started
[2009-10-28 21:43:27,205] INFO - buildServer.AGENT.registration - Registering on server: [name: Ian-PC, ownAddress: 192.168.0.115, ownPort: 9090, buildId: <not running build>, availableRunners: [simpleRunner], availableVcs: []]
[2009-10-28 21:43:29,943] INFO - jetbrains.buildServer.AGENT - Upgrade call received from the build server
[2009-10-28 21:43:30,122] INFO - jetbrains.buildServer.AGENT - Will upgrade when become idle
[2009-10-28 21:43:30,125] INFO - jetbrains.buildServer.AGENT - Shutdown agent start
[2009-10-28 21:43:30,127] INFO - agent.impl.AgentPortFileWriter - Delete agent runtime file from C:\TeamCityServer\buildAgent\logs\buildAgent.port
[2009-10-28 21:43:30,128] INFO - jetbrains.buildServer.AGENT - Shutdown agent WebServer start
[2009-10-28 21:43:30,148] INFO - jetbrains.buildServer.AGENT - Shutdown agent WebServer finish
[2009-10-28 21:43:30,148] INFO - jetbrains.buildServer.AGENT - Shutdown agent finish
[2009-10-28 21:43:30,249] INFO - jetbrains.buildServer.AGENT - Host configuration for downloading updates: HostConfiguration[host=http://localhost:8002]
[2009-10-28 21:43:30,250] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/buildAgent.zip ==> C:\TeamCityServer\buildAgent\update
[2009-10-28 21:43:30,905] INFO - buildServer.AGENT.registration - Registered: id:1, authorizationToken:5d0662c4dc85f7c396cdcaf356681076
[2009-10-28 21:43:30,905] INFO - buildServer.AGENT.registration - If this is the first time this agent registered on the server make sure it is authorized by administrator in the server web UI.
[2009-10-28 21:43:30,906] WARN - jetbrains.buildServer.AGENT - Attempt to ping agent after shutdown
[2009-10-28 21:42:08,163] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/ant.jar ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:11,780] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/antPlugin.zip ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:12,328] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/coveragePlugin.zip ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:13,579] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/crashDetector.zip ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:13,604] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/cvsAgent.zip ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:14,793] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/dotnetPlugin.zip ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:21,157] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/duplicatePlugin.zip ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:21,755] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/fxcop-agent.zip ==> C:\TeamCityServer\buildAgent\update\plugins
[2009-10-28 21:42:21,789] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8002/update/plugins/idea_dist.jar ==> C:\TeamCityServer\buildAgent\update\plugins
Anyone have any ideas what is going wrong? I have restarted the agent to no effect.
Please sign in to leave a comment.
Could you please send agent and server logs to teamcity-feedback[at]jetbrains.com?
Could you please try downloading http://localhost:8002/update/plugins/idea_dist.jar from the browser. Does that workds?
Please anable debug logging for build agent as described at http://www.jetbrains.net/confluence/display/TCD5/Reporting+Issues
and attach debug logs again.
Do you have any antivirus software installed? Please try running agent and server with firewall disabled.
Thanks!
Attached.
The download worked fine, and I have also tried turning off the firewall - but this didn't help
Cheers
Ian
Attachment(s):
BuildAgentlogs.zip
TeamCity.zip
Please check you have enabled debug logging on the build agent too.
Hi, I have a similar problem.
Fresh TeamCity installation, Windows 7, both server and agent are on the same host.
Agent starts up, tries to upgrade itself but fails with "Unable to start upgrade: Connection reset" message.
I suspect this is due to connection timeout during the download of buildAgent.zip, as I couldn't download the whole file even via browser:
C:\Users\Roman\Downloads>ls -l buildAgent*
-rw-rw-rw- 1 user group 17415626 Sep 22 09:45 buildAgent (1).zip
-rw-rw-rw- 1 user group 17420838 Sep 22 22:14 buildAgent (2).zip
-rw-rw-rw- 1 user group 17420838 Sep 23 08:39 buildAgent (3).zip
-rw-rw-rw- 1 user group 17091134 Sep 23 08:40 buildAgent (4).zip
-rw-rw-rw- 1 user group 17421918 Sep 22 09:08 buildAgent.zip
This is what the file size should be:
C:\dev\tools\teamcity\webapps\ROOT\update>ls -l buildAgent*
-rw-rw-rw- 1 user group 17422266 Aug 31 08:31 buildAgent.zip
I can see that the buildAgent.zip in the agent's upgrade folder is also incomplete.
Please find logs attached.
Attachment(s):
agent-logs.zip
server-logs.zip
Do you have antivirus software running ?
You're right, that was the culprit, thanks. Didn't realise it can de that slow on a laptop.