Cannot restart build agent after an failed upgrade

Hello,

From 29/07/2009, our build server has no connected build agent anymore, and then builds are queuing hopelessly without being executed.

I uninstalled the build agent and reinstalled another using the windows installer, but it stays disconnected anyway.
All the log entries are coming from this brand-new installed build agent.

From what I can read in the launcher log, there is a problem during the starting of the agent (real example pasted below):
[2009-07-30 09:51:01,318]  DEBUG - buildServer.agent.LauncherUtil - Deleting C:\BuildAgent\update
[2009-07-30 09:51:01,318]  DEBUG - buildServer.agent.LauncherUtil - Deleting C:\BuildAgent\backup
[2009-07-30 09:51:01,334]   INFO - ldServer.agent.run.AgentRunner - Thu Jul 30 09:51:01 CEST 2009 ==> Start launch
[2009-07-30 09:51:01,334]   INFO - ldServer.agent.run.AgentRunner - C:\BuildAgent\jre\bin\java -ea -Xmx384m -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml -Dteamcity_logs=../logs/ -classpath  jetbrains.buildServer.agent.AgentMain -file ..\conf\buildAgent.properties -launcher.version 8975
[2009-07-30 09:51:01,365]   INFO - ldServer.agent.run.AgentRunner - Agent process finished
[2009-07-30 09:51:01,365]   INFO - ldServer.agent.run.AgentRunner - Agent has exited with code: 1
[2009-07-30 09:51:01,365]   INFO - ldServer.agent.run.AgentRunner - Too short run time, most likely there is some installation problem: 0.031 sec.
[2009-07-30 09:51:01,365]   INFO - ldServer.agent.run.AgentRunner - Launcher is exiting

I checked the upgrade log, and there seems to have some problem with an upgrade on the agent, and even on the rollback on it:
Log of the error during upgrade:
[2009-07-30 08:44:27,813]  ERROR - ver.agent.upgrade.AgentUpgrade - Upgrade failed :Failed to copy 'C:\BuildAgent\update\lib\agent-api.jar' to 'C:\BuildAgent\lib\agent-api.jar'. Failed to copy C:\BuildAgent\update\lib\agent-api.jar to C:\BuildAgent\lib\agent-api.jar. Access is denied
Failed to copy 'C:\BuildAgent\update\lib\agent-launcher.jar' to 'C:\BuildAgent\lib\agent-launcher.jar'. Failed to copy C:\BuildAgent\update\lib\agent-launcher.jar to C:\BuildAgent\lib\agent-launcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\update\lib\agent.jar' to 'C:\BuildAgent\lib\agent.jar'. Failed to copy C:\BuildAgent\update\lib\agent.jar to C:\BuildAgent\lib\agent.jar. Access is denied
Failed to copy 'C:\BuildAgent\update\lib\agentInstaller-UI.jar' to 'C:\BuildAgent\lib\agentInstaller-UI.jar'. Failed to copy C:\BuildAgent\update\lib\agentInstaller-UI.jar to C:\BuildAgent\lib\agentInstaller-UI.jar. Access is denied

java.io.IOException: Failed to copy 'C:\BuildAgent\update\lib\agent-api.jar' to 'C:\BuildAgent\lib\agent-api.jar'. Failed to copy C:\BuildAgent\update\lib\agent-api.jar to C:\BuildAgent\lib\agent-api.jar. Access is denied
Failed to copy 'C:\BuildAgent\update\lib\agent-launcher.jar' to 'C:\BuildAgent\lib\agent-launcher.jar'. Failed to copy C:\BuildAgent\update\lib\agent-launcher.jar to C:\BuildAgent\lib\agent-launcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\update\lib\agent.jar' to 'C:\BuildAgent\lib\agent.jar'. Failed to copy C:\BuildAgent\update\lib\agent.jar to C:\BuildAgent\lib\agent.jar. Access is denied
Failed to copy 'C:\BuildAgent\update\lib\agentInstaller-UI.jar' to 'C:\BuildAgent\lib\agentInstaller-UI.jar'. Failed to copy C:\BuildAgent\update\lib\agentInstaller-UI.jar to C:\BuildAgent\lib\agentInstaller-UI.jar. Access is denied
at jetbrains.buildServer.agent.LauncherUtil.copy(LauncherUtil.java:148)
at jetbrains.buildServer.agent.upgrade.UpgradeFolder.doUpgrade(UpgradeFolder.java:53)
at jetbrains.buildServer.agent.upgrade.UpgradeFolder.upgrade(UpgradeFolder.java:36)
at jetbrains.buildServer.agent.upgrade.AgentUpgrade.doUpgrade(AgentUpgrade.java:74)
at jetbrains.buildServer.agent.upgrade.AgentUpgrade.applyUpdates(AgentUpgrade.java:46)
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.run(UpgradeRunBase.java:32)
at jetbrains.buildServer.agent.upgrade.UpgradeMode$2.run(UpgradeMode.java:26)
at jetbrains.buildServer.agent.upgrade.Upgrade2.main2(Upgrade2.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at jetbrains.buildServer.agent.ClazzLoader.call(ClazzLoader.java:59)
at jetbrains.buildServer.agent.ClazzLoader.callMain2(ClazzLoader.java:19)
at jetbrains.buildServer.agent.upgrade.Upgrade.main(Upgrade.java:16)
[2009-07-30 08:44:27,813]   INFO - ver.agent.upgrade.AgentUpgrade - AGENT UPDATE FAILED, exiting ...
[2009-07-30 08:44:27,813]  ERROR - ver.agent.upgrade.AgentUpgrade - TRYING ROLLBACK

Log of the error during rollback:
[2009-07-30 08:44:28,078]  ERROR - ver.agent.upgrade.AgentUpgrade - Rollback failed :Failed to copy 'C:\BuildAgent\backup\lib\agent-api.jar' to 'C:\BuildAgent\lib\agent-api.jar'. Failed to copy C:\BuildAgent\backup\lib\agent-api.jar to C:\BuildAgent\lib\agent-api.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agent-launcher.jar' to 'C:\BuildAgent\lib\agent-launcher.jar'. Failed to copy C:\BuildAgent\backup\lib\agent-launcher.jar to C:\BuildAgent\lib\agent-launcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agent.jar' to 'C:\BuildAgent\lib\agent.jar'. Failed to copy C:\BuildAgent\backup\lib\agent.jar to C:\BuildAgent\lib\agent.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agentInstaller-UI.jar' to 'C:\BuildAgent\lib\agentInstaller-UI.jar'. Failed to copy C:\BuildAgent\backup\lib\agentInstaller-UI.jar to C:\BuildAgent\lib\agentInstaller-UI.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agentInstaller.jar' to 'C:\BuildAgent\lib\agentInstaller.jar'. Failed to copy C:\BuildAgent\backup\lib\agentInstaller.jar to C:\BuildAgent\lib\agentInstaller.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\annotations.jar' to 'C:\BuildAgent\lib\annotations.jar'. Failed to copy C:\BuildAgent\backup\lib\annotations.jar to C:\BuildAgent\lib\annotations.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\common-api.jar' to 'C:\BuildAgent\lib\common-api.jar'. Failed to copy C:\BuildAgent\backup\lib\common-api.jar to C:\BuildAgent\lib\common-api.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\common-impl.jar' to 'C:\BuildAgent\lib\common-impl.jar'. Failed to copy C:\BuildAgent\backup\lib\common-impl.jar to C:\BuildAgent\lib\common-impl.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-beanutils-core.jar' to 'C:\BuildAgent\lib\commons-beanutils-core.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-beanutils-core.jar to C:\BuildAgent\lib\commons-beanutils-core.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-codec-1.3.jar' to 'C:\BuildAgent\lib\commons-codec-1.3.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-codec-1.3.jar to C:\BuildAgent\lib\commons-codec-1.3.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-collections-3.2.jar' to 'C:\BuildAgent\lib\commons-collections-3.2.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-collections-3.2.jar to C:\BuildAgent\lib\commons-collections-3.2.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-httpclient-3.1.jar' to 'C:\BuildAgent\lib\commons-httpclient-3.1.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-httpclient-3.1.jar to C:\BuildAgent\lib\commons-httpclient-3.1.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-io-1.3.2.jar' to 'C:\BuildAgent\lib\commons-io-1.3.2.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-io-1.3.2.jar to C:\BuildAgent\lib\commons-io-1.3.2.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-logging.jar' to 'C:\BuildAgent\lib\commons-logging.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-logging.jar to C:\BuildAgent\lib\commons-logging.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\duplicates-util.jar' to 'C:\BuildAgent\lib\duplicates-util.jar'. Failed to copy C:\BuildAgent\backup\lib\duplicates-util.jar to C:\BuildAgent\lib\duplicates-util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\extensions.jar' to 'C:\BuildAgent\lib\extensions.jar'. Failed to copy C:\BuildAgent\backup\lib\extensions.jar to C:\BuildAgent\lib\extensions.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\idea-settings.jar' to 'C:\BuildAgent\lib\idea-settings.jar'. Failed to copy C:\BuildAgent\backup\lib\idea-settings.jar to C:\BuildAgent\lib\idea-settings.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\inspections-util.jar' to 'C:\BuildAgent\lib\inspections-util.jar'. Failed to copy C:\BuildAgent\backup\lib\inspections-util.jar to C:\BuildAgent\lib\inspections-util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\ivy-2.0.jar' to 'C:\BuildAgent\lib\ivy-2.0.jar'. Failed to copy C:\BuildAgent\backup\lib\ivy-2.0.jar to C:\BuildAgent\lib\ivy-2.0.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jakarta-oro-2.0.8.jar' to 'C:\BuildAgent\lib\jakarta-oro-2.0.8.jar'. Failed to copy C:\BuildAgent\backup\lib\jakarta-oro-2.0.8.jar to C:\BuildAgent\lib\jakarta-oro-2.0.8.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jdk-searcher.jar' to 'C:\BuildAgent\lib\jdk-searcher.jar'. Failed to copy C:\BuildAgent\backup\lib\jdk-searcher.jar to C:\BuildAgent\lib\jdk-searcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jdom.jar' to 'C:\BuildAgent\lib\jdom.jar'. Failed to copy C:\BuildAgent\backup\lib\jdom.jar to C:\BuildAgent\lib\jdom.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jniwrap-3.6.1.jar' to 'C:\BuildAgent\lib\jniwrap-3.6.1.jar'. Failed to copy C:\BuildAgent\backup\lib\jniwrap-3.6.1.jar to C:\BuildAgent\lib\jniwrap-3.6.1.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\joda-time-1.5.2.jar' to 'C:\BuildAgent\lib\joda-time-1.5.2.jar'. Failed to copy C:\BuildAgent\backup\lib\joda-time-1.5.2.jar to C:\BuildAgent\lib\joda-time-1.5.2.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\junit-4.5.jar' to 'C:\BuildAgent\lib\junit-4.5.jar'. Failed to copy C:\BuildAgent\backup\lib\junit-4.5.jar to C:\BuildAgent\lib\junit-4.5.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\launcher.jar' to 'C:\BuildAgent\lib\launcher.jar'. Failed to copy C:\BuildAgent\backup\lib\launcher.jar to C:\BuildAgent\lib\launcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\log4j-1.2.12.jar' to 'C:\BuildAgent\lib\log4j-1.2.12.jar'. Failed to copy C:\BuildAgent\backup\lib\log4j-1.2.12.jar to C:\BuildAgent\lib\log4j-1.2.12.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\openapi.jar' to 'C:\BuildAgent\lib\openapi.jar'. Failed to copy C:\BuildAgent\backup\lib\openapi.jar to C:\BuildAgent\lib\openapi.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\patches-impl.jar' to 'C:\BuildAgent\lib\patches-impl.jar'. Failed to copy C:\BuildAgent\backup\lib\patches-impl.jar to C:\BuildAgent\lib\patches-impl.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\processesTerminator.jar' to 'C:\BuildAgent\lib\processesTerminator.jar'. Failed to copy C:\BuildAgent\backup\lib\processesTerminator.jar to C:\BuildAgent\lib\processesTerminator.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\resources_en.jar' to 'C:\BuildAgent\lib\resources_en.jar'. Failed to copy C:\BuildAgent\backup\lib\resources_en.jar to C:\BuildAgent\lib\resources_en.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\runtime-util.jar' to 'C:\BuildAgent\lib\runtime-util.jar'. Failed to copy C:\BuildAgent\backup\lib\runtime-util.jar to C:\BuildAgent\lib\runtime-util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\server-logging.jar' to 'C:\BuildAgent\lib\server-logging.jar'. Failed to copy C:\BuildAgent\backup\lib\server-logging.jar to C:\BuildAgent\lib\server-logging.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\spring.jar' to 'C:\BuildAgent\lib\spring.jar'. Failed to copy C:\BuildAgent\backup\lib\spring.jar to C:\BuildAgent\lib\spring.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\trove4j.jar' to 'C:\BuildAgent\lib\trove4j.jar'. Failed to copy C:\BuildAgent\backup\lib\trove4j.jar to C:\BuildAgent\lib\trove4j.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\util.jar' to 'C:\BuildAgent\lib\util.jar'. Failed to copy C:\BuildAgent\backup\lib\util.jar to C:\BuildAgent\lib\util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\winpack.jar' to 'C:\BuildAgent\lib\winpack.jar'. Failed to copy C:\BuildAgent\backup\lib\winpack.jar to C:\BuildAgent\lib\winpack.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xercesImpl.jar' to 'C:\BuildAgent\lib\xercesImpl.jar'. Failed to copy C:\BuildAgent\backup\lib\xercesImpl.jar to C:\BuildAgent\lib\xercesImpl.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xmlrpc-2.0.1.jar' to 'C:\BuildAgent\lib\xmlrpc-2.0.1.jar'. Failed to copy C:\BuildAgent\backup\lib\xmlrpc-2.0.1.jar to C:\BuildAgent\lib\xmlrpc-2.0.1.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xpp3_min-1.1.3.4.M.jar' to 'C:\BuildAgent\lib\xpp3_min-1.1.3.4.M.jar'. Failed to copy C:\BuildAgent\backup\lib\xpp3_min-1.1.3.4.M.jar to C:\BuildAgent\lib\xpp3_min-1.1.3.4.M.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xstream-1.2.1.jar' to 'C:\BuildAgent\lib\xstream-1.2.1.jar'. Failed to copy C:\BuildAgent\backup\lib\xstream-1.2.1.jar to C:\BuildAgent\lib\xstream-1.2.1.jar. Access is denied

java.io.IOException: Failed to copy 'C:\BuildAgent\backup\lib\agent-api.jar' to 'C:\BuildAgent\lib\agent-api.jar'. Failed to copy C:\BuildAgent\backup\lib\agent-api.jar to C:\BuildAgent\lib\agent-api.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agent-launcher.jar' to 'C:\BuildAgent\lib\agent-launcher.jar'. Failed to copy C:\BuildAgent\backup\lib\agent-launcher.jar to C:\BuildAgent\lib\agent-launcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agent.jar' to 'C:\BuildAgent\lib\agent.jar'. Failed to copy C:\BuildAgent\backup\lib\agent.jar to C:\BuildAgent\lib\agent.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agentInstaller-UI.jar' to 'C:\BuildAgent\lib\agentInstaller-UI.jar'. Failed to copy C:\BuildAgent\backup\lib\agentInstaller-UI.jar to C:\BuildAgent\lib\agentInstaller-UI.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\agentInstaller.jar' to 'C:\BuildAgent\lib\agentInstaller.jar'. Failed to copy C:\BuildAgent\backup\lib\agentInstaller.jar to C:\BuildAgent\lib\agentInstaller.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\annotations.jar' to 'C:\BuildAgent\lib\annotations.jar'. Failed to copy C:\BuildAgent\backup\lib\annotations.jar to C:\BuildAgent\lib\annotations.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\common-api.jar' to 'C:\BuildAgent\lib\common-api.jar'. Failed to copy C:\BuildAgent\backup\lib\common-api.jar to C:\BuildAgent\lib\common-api.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\common-impl.jar' to 'C:\BuildAgent\lib\common-impl.jar'. Failed to copy C:\BuildAgent\backup\lib\common-impl.jar to C:\BuildAgent\lib\common-impl.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-beanutils-core.jar' to 'C:\BuildAgent\lib\commons-beanutils-core.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-beanutils-core.jar to C:\BuildAgent\lib\commons-beanutils-core.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-codec-1.3.jar' to 'C:\BuildAgent\lib\commons-codec-1.3.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-codec-1.3.jar to C:\BuildAgent\lib\commons-codec-1.3.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-collections-3.2.jar' to 'C:\BuildAgent\lib\commons-collections-3.2.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-collections-3.2.jar to C:\BuildAgent\lib\commons-collections-3.2.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-httpclient-3.1.jar' to 'C:\BuildAgent\lib\commons-httpclient-3.1.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-httpclient-3.1.jar to C:\BuildAgent\lib\commons-httpclient-3.1.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-io-1.3.2.jar' to 'C:\BuildAgent\lib\commons-io-1.3.2.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-io-1.3.2.jar to C:\BuildAgent\lib\commons-io-1.3.2.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\commons-logging.jar' to 'C:\BuildAgent\lib\commons-logging.jar'. Failed to copy C:\BuildAgent\backup\lib\commons-logging.jar to C:\BuildAgent\lib\commons-logging.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\duplicates-util.jar' to 'C:\BuildAgent\lib\duplicates-util.jar'. Failed to copy C:\BuildAgent\backup\lib\duplicates-util.jar to C:\BuildAgent\lib\duplicates-util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\extensions.jar' to 'C:\BuildAgent\lib\extensions.jar'. Failed to copy C:\BuildAgent\backup\lib\extensions.jar to C:\BuildAgent\lib\extensions.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\idea-settings.jar' to 'C:\BuildAgent\lib\idea-settings.jar'. Failed to copy C:\BuildAgent\backup\lib\idea-settings.jar to C:\BuildAgent\lib\idea-settings.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\inspections-util.jar' to 'C:\BuildAgent\lib\inspections-util.jar'. Failed to copy C:\BuildAgent\backup\lib\inspections-util.jar to C:\BuildAgent\lib\inspections-util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\ivy-2.0.jar' to 'C:\BuildAgent\lib\ivy-2.0.jar'. Failed to copy C:\BuildAgent\backup\lib\ivy-2.0.jar to C:\BuildAgent\lib\ivy-2.0.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jakarta-oro-2.0.8.jar' to 'C:\BuildAgent\lib\jakarta-oro-2.0.8.jar'. Failed to copy C:\BuildAgent\backup\lib\jakarta-oro-2.0.8.jar to C:\BuildAgent\lib\jakarta-oro-2.0.8.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jdk-searcher.jar' to 'C:\BuildAgent\lib\jdk-searcher.jar'. Failed to copy C:\BuildAgent\backup\lib\jdk-searcher.jar to C:\BuildAgent\lib\jdk-searcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jdom.jar' to 'C:\BuildAgent\lib\jdom.jar'. Failed to copy C:\BuildAgent\backup\lib\jdom.jar to C:\BuildAgent\lib\jdom.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\jniwrap-3.6.1.jar' to 'C:\BuildAgent\lib\jniwrap-3.6.1.jar'. Failed to copy C:\BuildAgent\backup\lib\jniwrap-3.6.1.jar to C:\BuildAgent\lib\jniwrap-3.6.1.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\joda-time-1.5.2.jar' to 'C:\BuildAgent\lib\joda-time-1.5.2.jar'. Failed to copy C:\BuildAgent\backup\lib\joda-time-1.5.2.jar to C:\BuildAgent\lib\joda-time-1.5.2.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\junit-4.5.jar' to 'C:\BuildAgent\lib\junit-4.5.jar'. Failed to copy C:\BuildAgent\backup\lib\junit-4.5.jar to C:\BuildAgent\lib\junit-4.5.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\launcher.jar' to 'C:\BuildAgent\lib\launcher.jar'. Failed to copy C:\BuildAgent\backup\lib\launcher.jar to C:\BuildAgent\lib\launcher.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\log4j-1.2.12.jar' to 'C:\BuildAgent\lib\log4j-1.2.12.jar'. Failed to copy C:\BuildAgent\backup\lib\log4j-1.2.12.jar to C:\BuildAgent\lib\log4j-1.2.12.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\openapi.jar' to 'C:\BuildAgent\lib\openapi.jar'. Failed to copy C:\BuildAgent\backup\lib\openapi.jar to C:\BuildAgent\lib\openapi.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\patches-impl.jar' to 'C:\BuildAgent\lib\patches-impl.jar'. Failed to copy C:\BuildAgent\backup\lib\patches-impl.jar to C:\BuildAgent\lib\patches-impl.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\processesTerminator.jar' to 'C:\BuildAgent\lib\processesTerminator.jar'. Failed to copy C:\BuildAgent\backup\lib\processesTerminator.jar to C:\BuildAgent\lib\processesTerminator.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\resources_en.jar' to 'C:\BuildAgent\lib\resources_en.jar'. Failed to copy C:\BuildAgent\backup\lib\resources_en.jar to C:\BuildAgent\lib\resources_en.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\runtime-util.jar' to 'C:\BuildAgent\lib\runtime-util.jar'. Failed to copy C:\BuildAgent\backup\lib\runtime-util.jar to C:\BuildAgent\lib\runtime-util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\server-logging.jar' to 'C:\BuildAgent\lib\server-logging.jar'. Failed to copy C:\BuildAgent\backup\lib\server-logging.jar to C:\BuildAgent\lib\server-logging.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\spring.jar' to 'C:\BuildAgent\lib\spring.jar'. Failed to copy C:\BuildAgent\backup\lib\spring.jar to C:\BuildAgent\lib\spring.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\trove4j.jar' to 'C:\BuildAgent\lib\trove4j.jar'. Failed to copy C:\BuildAgent\backup\lib\trove4j.jar to C:\BuildAgent\lib\trove4j.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\util.jar' to 'C:\BuildAgent\lib\util.jar'. Failed to copy C:\BuildAgent\backup\lib\util.jar to C:\BuildAgent\lib\util.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\winpack.jar' to 'C:\BuildAgent\lib\winpack.jar'. Failed to copy C:\BuildAgent\backup\lib\winpack.jar to C:\BuildAgent\lib\winpack.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xercesImpl.jar' to 'C:\BuildAgent\lib\xercesImpl.jar'. Failed to copy C:\BuildAgent\backup\lib\xercesImpl.jar to C:\BuildAgent\lib\xercesImpl.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xmlrpc-2.0.1.jar' to 'C:\BuildAgent\lib\xmlrpc-2.0.1.jar'. Failed to copy C:\BuildAgent\backup\lib\xmlrpc-2.0.1.jar to C:\BuildAgent\lib\xmlrpc-2.0.1.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xpp3_min-1.1.3.4.M.jar' to 'C:\BuildAgent\lib\xpp3_min-1.1.3.4.M.jar'. Failed to copy C:\BuildAgent\backup\lib\xpp3_min-1.1.3.4.M.jar to C:\BuildAgent\lib\xpp3_min-1.1.3.4.M.jar. Access is denied
Failed to copy 'C:\BuildAgent\backup\lib\xstream-1.2.1.jar' to 'C:\BuildAgent\lib\xstream-1.2.1.jar'. Failed to copy C:\BuildAgent\backup\lib\xstream-1.2.1.jar to C:\BuildAgent\lib\xstream-1.2.1.jar. Access is denied
at jetbrains.buildServer.agent.LauncherUtil.copy(LauncherUtil.java:148)
at jetbrains.buildServer.agent.upgrade.UpgradeFolder.doRollback(UpgradeFolder.java:58)
at jetbrains.buildServer.agent.upgrade.UpgradeFolder.rollback(UpgradeFolder.java:41)
at jetbrains.buildServer.agent.upgrade.AgentUpgrade.rollback(AgentUpgrade.java:63)
at jetbrains.buildServer.agent.upgrade.AgentUpgrade.applyUpdates(AgentUpgrade.java:47)
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.run(UpgradeRunBase.java:32)
at jetbrains.buildServer.agent.upgrade.UpgradeMode$2.run(UpgradeMode.java:26)
at jetbrains.buildServer.agent.upgrade.Upgrade2.main2(Upgrade2.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at jetbrains.buildServer.agent.ClazzLoader.call(ClazzLoader.java:59)
at jetbrains.buildServer.agent.ClazzLoader.callMain2(ClazzLoader.java:19)
at jetbrains.buildServer.agent.upgrade.Upgrade.main(Upgrade.java:16)

Despite the rollback problem, I see in that same log file that the upgrade process deletes all the backup files after the rollback failure.

I attached the log files that seemed relevant to me.
Can someone look at this issue, our team has no build server anymore.

Thank you



Attachment(s):
teamcity-agent.log
upgrade.log
launcher.log
4 comments
Comment actions Permalink

Small correction: the builds are not queuing as I said, because they have anyway no available agent, I guess the queued build I have seen was already queued before the failed agent upgrade

0
Comment actions Permalink

Have you started suddenly disabled build agent service?

Build agent upgrade stops agent service for 5-10 minutes. Starting build agent again at that moment will lead upgrade to fail in copying files.

Please check there is no java processes running on the machine.
reinstall build agent
start service

wait while build agent service restart itself.

Thanks!

0
Comment actions Permalink

Many thanks, Eugene !
Problem solved.

To solve this, I:

  • emptied the build queue
  • checked that no other Java process ran
  • reinstalled the build agent
  • let it do its upgrade


I then had to authorize the agent, wait a little that it is recognized as enabled and compatible for my build configurations, and the build ran correctly.

Maybe the fact that there a build in the queue made somehow the upgrade fail ?

0
Comment actions Permalink

Emptying of the queue was not necessary, because TeamCity never starts new builds on agents requiring upgrade.

0

Please sign in to leave a comment.