Build agent missing after 2018.2.2 upgrade

We recently did the auto-update from 2018.2.1 to 2018.2.2. Unfortunately, after that we've had trouble getting the build agent to work. I'm unsure what information to include, but some general details:

 

We are running on Ubuntu. We have not done any manual setup of the build agent.

We used to start the build agent (when necessary) by doing:

TeamCity/buildAgent/bin/agent.sh start

The directory TeamCity/buildAgent/bin is now entirely empty.

The directory TeamCity/buildAgent/bin has a file "build_updateFailed" with the contents "upgrade failed" which is dated to probably coincide with our upgrade.

 

As we haven't really done any manual setup of the build agent we are unsure of what content should be present and how to recover from what appears to be a failed upgrade. Any tips on how to proceed?

We've reviewed the upgrade.log file and it does appear to spew out an error at the start, while the rest just seems to be loads and loads of mostly delete, and some copy before seemingly ending well. The error at the start:

[2019-01-24 09:46:56,348]  ERROR - r.agent.upgrade.UpgradeRunBase - Upgrade failed: Failed to start process. Return code was 143 not equal to zero. 
java.io.IOException: Failed to start process. Return code was 143 not equal to zero.
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.runCmdLine(UpgradeRunBase.java:102)
at jetbrains.buildServer.agent.upgrade.RunShUpgrade.beforeUpgrade(RunShUpgrade.java:24)
at jetbrains.buildServer.agent.upgrade.UpgradeRunBase.run(UpgradeRunBase.java:35)
at jetbrains.buildServer.agent.upgrade.UpgradeMode$5.run(UpgradeMode.java:133)
at jetbrains.buildServer.agent.upgrade.Upgrade2$1.lockHeld(Upgrade2.java:57)
at jetbrains.buildServer.agent.upgrade.Upgrade2$1.lockHeld(Upgrade2.java:55)
at jetbrains.buildServer.agent.lock.impl.misc.MockLock.assumeLocked(MockLock.java:22)
at jetbrains.buildServer.agent.lock.impl.misc.MockLock.tryLock(MockLock.java:14)
at jetbrains.buildServer.agent.upgrade.Upgrade2.main3(Upgrade2.java:54)
at jetbrains.buildServer.agent.upgrade.Upgrade2.main2(Upgrade2.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
0
1 comment

Being unable to recover the existing build agent we solved this by simply installing a new one from ZIP using this guide:

https://confluence.jetbrains.com/display/TCD18/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-installingBuildAgentsZip

 

We will assume that something went wrong during upgrade or the agent was halted during upgrade, which caused it to not be able to recover.

0

Please sign in to leave a comment.