Cannot run BuildAgent service after upgrade to 2022.04.01 build 108575
Hi there after upgrading to 2022.04.01 build 108575 on a Windows 11 PC I am unable to start the TeamCity Build Agent service.
I have added both the launcher.log and wrapper.log as attachments with the upload service.
Any assistance will be greatly appreciated.
I get the following error in the wrapper.log
--> Wrapper Started as Service
STATUS | wrapper | 2022/06/27 12:49:09 | Launching a JVM...
INFO | jvm 1 | 2022/06/27 12:49:09 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2022/06/27 12:49:09 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2022/06/27 12:49:09 |
INFO | jvm 1 | 2022/06/27 12:49:10 | Starting TeamCity Build Agent Launcher...
INFO | jvm 1 | 2022/06/27 12:49:10 | Agent home directory is C:\TeamCity\buildAgent
INFO | jvm 1 | 2022/06/27 12:49:15 | Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/support/ClassPathXmlApplicationContext
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getMethodsRecursive(Class.java:3307)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getMethod0(Class.java:3293)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getMethod(Class.java:2106)
INFO | jvm 1 | 2022/06/27 12:49:15 | at jetbrains.buildServer.agent.AgentMain.main(AgentMain.java:42)
INFO | jvm 1 | 2022/06/27 12:49:15 | Caused by: java.lang.ClassNotFoundException: org.springframework.context.support.ClassPathXmlApplicationContext
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
INFO | jvm 1 | 2022/06/27 12:49:15 | ... 6 more
INFO | jvm 1 | 2022/06/27 12:49:15 | Too long run time, unexpected exit. Restarting. Run time was : 1.176 sec.
INFO | jvm 1 | 2022/06/27 12:49:15 | Too long run time, unexpected exit. Restarting. Run time was : 1.176 sec.
INFO | jvm 1 | 2022/06/27 12:49:15 | Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/context/support/ClassPathXmlApplicationContext
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getMethodsRecursive(Class.java:3307)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getMethod0(Class.java:3293)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.Class.getMethod(Class.java:2106)
INFO | jvm 1 | 2022/06/27 12:49:15 | at jetbrains.buildServer.agent.AgentMain.main(AgentMain.java:42)
INFO | jvm 1 | 2022/06/27 12:49:15 | Caused by: java.lang.ClassNotFoundException: org.springframework.context.support.ClassPathXmlApplicationContext
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
INFO | jvm 1 | 2022/06/27 12:49:15 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
INFO | jvm 1 | 2022/06/27 12:49:15 | ... 6 more
INFO | jvm 1 | 2022/06/27 12:49:15 | Too short run time, most likely there is some installation problem: 0.22 sec.
INFO | jvm 1 | 2022/06/27 12:49:15 | Too short run time, most likely there is some installation problem: 0.22 sec.
STATUS | wrapper | 2022/06/27 12:49:17 | <-- Wrapper Stopped
Please sign in to leave a comment.
Do you have the upload ID from when you used the upload service? What version of Java are you using to run the agent?
Based on the fragment of the log file you shared here, it looks like there could be some missing or corrupt packages or libraries that your agent cannot find. Are you able to start the agent from a console using the command <agent home directory>/bin/agent.bat start?
Hi Eric
Thanks for the reply
Firstly I have no idea what the Upload ID was, I wasn't even aware I needed to record it, I do however have the log files still available but I cannot seem to add attachments to this reply.
Secondly how do I determine what the specific version of Java is that is being used by the Build Agent?
I did try to start the agent from agent.bat start but no joy.
I have now rolled back my VM so that it is using the previous version TeamCity Professional 2022.04 (build 108502) which I have had no issues with either before the attempted upgrade to Build 108575 nor since.
Thanks again
Geoff
Hi Geoff,
You can upload your logs here: https://uploads.jetbrains.com.
The information about what version of Java the build agent is running on can be found in the logs you were trying to share, but it might also be helpful if you could include the teamcity-agent.log.
Thanks,
Eric
Thanks for the reply Eric but I have had to rollback my host VM in order to get JetBrains TeamCity working again, I am able to work with TeamCity Professional 2022.04 (build 108502) without issue.
Thanks
Geoff