Agent Stuck on upgrade loop
after updating to build 2024.12.2 (build 174504)
the agents went into upgrade mode. but wont update.
semms like it failed to download the plugins.
both server and agents are on the samce machine.
I tried:
1. Reinstall Agents. (soft & clean install).
2. Reinstall TeamCity (soft & Clean install)
[2025-02-18 18:10:58,698] INFO - jetbrains.buildServer.AGENT - Upgrade mode: jetbrains.buildServer.agent.impl.upgrade.modes.FullUpgradeMode
[2025-02-18 18:10:58,698] INFO - jetbrains.buildServer.AGENT - The file C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\agentSystemInfo.zip is already downloaded and has valid hash 'SHA-1pLpn7mPyfvL3bKEkhsfgqu/eYUw=', will not download this file again
[2025-02-18 18:10:58,699] INFO - jetbrains.buildServer.AGENT - The file C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\amazonEC2.zip is already downloaded and has valid hash 'SHA-1UkwtBmlWQySuK22FugqStdJHHXg=', will not download this file again
[2025-02-18 18:10:58,699] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8080/update/plugins/ant-net-tasks.zip ==> C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip
[2025-02-18 18:12:18,260] WARN - jetbrains.buildServer.AGENT - Error downloading file "C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip". Will try to re-download the file. Error: Failed to download file http://localhost:8080/update/plugins/ant-net-tasks.zip to C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip. Connection reset
[2025-02-18 18:12:18,765] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8080/update/plugins/ant-net-tasks.zip ==> C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip
[2025-02-18 18:13:37,887] WARN - jetbrains.buildServer.AGENT - Error downloading file "C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip". Will try to re-download the file. Error: Failed to download file http://localhost:8080/update/plugins/ant-net-tasks.zip to C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip. Connection reset
[2025-02-18 18:13:38,394] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8080/update/plugins/ant-net-tasks.zip ==> C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip
[2025-02-18 18:14:57,955] WARN - jetbrains.buildServer.AGENT - Error downloading file "C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip". Will try to re-download the file. Error: Failed to download file http://localhost:8080/update/plugins/ant-net-tasks.zip to C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip. Connection reset
[2025-02-18 18:14:58,467] WARN - jetbrains.buildServer.AGENT - Unable to download updates in 6 attempts, will try again...: jetbrains.buildServer.agent.impl.upgrade.UpgradeFailedException: Failed to download file http://localhost:8080/update/plugins/ant-net-tasks.zip to C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip. Connection reset (enable debug to see stacktrace)
[2025-02-18 18:14:58,469] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8080/update/teamcity-agent.xml ==> C:\Program Files (x86)\TeamCity\buildAgent\temp\77WJCCmACuGISKnVhYtYTZOAAQb5Ic8x
[2025-02-18 18:14:58,491] INFO - jetbrains.buildServer.AGENT - An agent restart is necessary for this upgrade; will restart once all preparations are complete
[2025-02-18 18:14:58,491] INFO - jetbrains.buildServer.AGENT - Upgrade mode: jetbrains.buildServer.agent.impl.upgrade.modes.FullUpgradeMode
[2025-02-18 18:14:58,492] INFO - jetbrains.buildServer.AGENT - The file C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\agentSystemInfo.zip is already downloaded and has valid hash 'SHA-1pLpn7mPyfvL3bKEkhsfgqu/eYUw=', will not download this file again
[2025-02-18 18:14:58,492] INFO - jetbrains.buildServer.AGENT - The file C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\amazonEC2.zip is already downloaded and has valid hash 'SHA-1UkwtBmlWQySuK22FugqStdJHHXg=', will not download this file again
[2025-02-18 18:14:58,492] INFO - jetbrains.buildServer.AGENT - Downloading http://localhost:8080/update/plugins/ant-net-tasks.zip ==> C:\Program Files (x86)\TeamCity\buildAgent\update\plugins\ant-net-tasks.zip
Please sign in to leave a comment.
Hi Daniel,
It seems that the agent from the log above is running on the same machine as the TeamCity server? Is this the case for all your other affected build agents? This is not recommended for production purposes:
https://www.jetbrains.com/help/teamcity/install-and-start-teamcity-agents.html
We have seen similar cases caused by anti-virus software: if you are using one, please check if it is blocking the download of these files.
You can also check if you can download the problematic file from the log above using the same account used to run the affected build agent(s): http://localhost:8080/update/plugins/ant-net-tasks.zip
Finally, you can also check if it is a permissions problem? Do you run agent as local admin? Can you try to explicitly grant ownership/full permissions to your account?