TC3.0 - Windows build agent won't start

Hi,
I'm new to Team City and I was trying to install a windows build agent on my computer just while I learn my way around but when I go to run the agent, it gives me a NoClassDefFoundError (details below). I installed it using the WebStart option and did not install it as a webservice, as I just want to run it manually for now. Has anyone got any ideas as to what the issue could be?
Thanks,
K.
-


Config file:

#Generated properties (see buildAgent.dist.properties for description)
#Tue Jan 15 12:02:48 GMT 2008
system.teamcity.idea.home=%system.agent.work.dir%/plugins/idea
serverUrl= <!-- removed for this post -->
name=pc00001
workDir=../code/BuildTest
env.JAVA_HOME=C\:
Program Files
Java
jre1.6.0_03
tempDir=../temp
ownPort=9090


Error:

C:\>c:\BuildAgent\bin\agent.bat start

C:\>SET CONFIG_FILE=..\conf\buildAgent.properties

C:\>SET LAUNCHER_OPTS=-ea -Xmx384m -Dlog4j.configuration=file:../conf/teamcity-a
gent-log4j.xml -Dteamcity_logs=../logs/

C:\>SET JAVA_EXE=\bin\java.exe

C:\>IF EXIST "\bin\java.exe" goto run

C:\>SET JAVA_EXE=C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.exe

C:\>IF EXIST "C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.exe" goto run

C:\>"C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.exe" -cp ..\lib\launcher.jar
jetbrains.buildServer.agent.Launcher -ea -Xmx384m -Dlog4j.configuration=file:..
/conf/teamcity-agent-log4j.xml -Dteamcity_logs=../logs/ jetbrains.buildServer.ag
ent.AgentMain -file ..\conf\buildAgent.properties
Exception in thread "main" java.lang.NoClassDefFoundError: jetbrains/buildServer
/agent/Launcher

C:\>

11 comments

Hello,

Could you please check if 'Update', 'Backup', 'Launcher', 'Lib' folders
exists.
What files are in 'lib'?

Could you please try to reistall build agent. Please download buildagent.zip
from TeamCity server
and copy conf/buildAgent.properties file from the old one.

please call 'agent.bat start' and wait until build agent console appear
second time.

Thanks!
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi,

I'm new to Team City and I was trying to install a windows build agent
on my computer just while I learn my way around but when I go to run
the agent, it gives me a NoClassDefFoundError (details below). I
installed it using the WebStart option and did not install it as a
webservice, as I just want to run it manually for now. Has anyone got
any ideas as to what the issue could be?

Thanks,

K.

----------------------------------------------------------------------
----------------------------------------

Config file:

#Generated properties (see buildAgent.dist.properties for description)
#Tue Jan 15 12:02:48 GMT 2008
system.teamcity.idea.home=%system.agent.work.dir%/plugins/idea
serverUrl= <!-- removed for this post -->
name=pc00001
workDir=../code/BuildTest
env.JAVA_HOME=C\:
Program Files
Java
jre1.6.0_03
tempDir=../temp
ownPort=9090
Error:

C:\>c:\BuildAgent\bin\agent.bat start

C:\>SET CONFIG_FILE=..\conf\buildAgent.properties

C:\>SET LAUNCHER_OPTS=-ea -Xmx384m
-Dlog4j.configuration=file:../conf/teamcity-a gent-log4j.xml
-Dteamcity_logs=../logs/

C:\>SET JAVA_EXE=\bin\java.exe

C:\>IF EXIST "\bin\java.exe" goto run

C:\>SET JAVA_EXE=C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.exe

C:\>IF EXIST "C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.exe" goto
run

C:\>"C:\Program Files\Java\jdk1.6.0_03\jre\bin\java.exe" -cp
..\lib\launcher.jar
jetbrains.buildServer.agent.Launcher -ea -Xmx384m
-Dlog4j.configuration=file:..
/conf/teamcity-agent-log4j.xml -Dteamcity_logs=../logs/
jetbrains.buildServer.ag
ent.AgentMain -file ..\conf\buildAgent.properties
Exception in thread "main" java.lang.NoClassDefFoundError:
jetbrains/buildServer
/agent/Launcher
C:\>



0

Under C:/BuildAgent, I have bin, conf, lib, launcher and uninstall directories.

The lib directory contains these files:

agentInstaller-UI.jar
agentInstaller.jar
annotations.jar
buildServerAgent.jar
buildServerCommon.jar
buildServerCommonRuntime.jar
buildServerMessages.jar
buildServerRemoteServerProxy.jar
buildServerRuntimeUtil.jar
buildServerServerLogging.jar
buildServerServerModel.jar
buildServerXmlRpcWrapper.jar
commons-beanutils-core.jar
commons-codec-1.3.jar
commons-httpclient-3.0.1.jar
commons-logging.jar
extensions.jar
idea-settings.jar
ivy-1.4.1.jar
jakarta-oro-2.0.8.jar
jdk-searcher.jar
jdom.jar
jniwrap-3.6.1.jar
junit-4.1.jar
launcher.jar
log4j-1.2.12.jar
nanocontainer-1.0-RC-1.jar
openapi.jar
patches-impl.jar
patches.jar
picocontainer-1.2.jar
trove4j.jar
utils.jar
winpack.jar
xmlrpc-2.0.1.jar
xpp3_min-1.1.3.4.M.jar
xstream-1.2.1.jar

I will attempt to reinstall build agent as per your instructions now :)
Thanks for your help, Eugene!
- K.

Hello,

Could you please check if 'Update', 'Backup',
'Launcher', 'Lib' folders
xists.
What files are in 'lib'?
Could you please try to reistall build agent. Please
download buildagent.zip
rom TeamCity server
and copy conf/buildAgent.properties file from the
old one.
please call 'agent.bat start' and wait until build
agent console appear
econd time.

Thanks!

ugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Reinstalling with the zip worked like a charm :)
Thanks, Eugene!
The Build Agent Console ended up appearing 3 times as it decided to run an update but all seems to be working now. I can see my Build Agent on the server :)

0

I'm afraid I'm back again... I've now got a dedicated build machine that I'm trying to set up. I've managed to install everything without a problem and I can manually start the build agent but for some reason, I'm unable to run it as a windows service. I've installed the windows service and tried to start it throught Control Panel > Administrative Tools > Services but it keeps throwing an error saying that startup failed. wrapper.log mentions something about not being able to locate a class and something about an unsupported major.minor version??
This is what's in wrapper.log:

STATUS | wrapper | 2008/01/18 14:20:47 | --> Wrapper Started as Service
STATUS | wrapper | 2008/01/18 14:20:47 | Launching a JVM...
INFO | jvm 1 | 2008/01/18 14:20:48 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2008/01/18 14:20:48 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2008/01/18 14:20:48 |
INFO | jvm 1 | 2008/01/18 14:20:48 | WrapperSimpleApp: Unable to locate the class jetbrains.buildServer.agent.StandAloneLauncher: java.lang.UnsupportedClassVersionError: jetbrains/buildServer/agent/StandAloneLauncher (Unsupported major.minor version 49.0)
INFO | jvm 1 | 2008/01/18 14:20:48 |
INFO | jvm 1 | 2008/01/18 14:20:48 | WrapperSimpleApp Usage:
INFO | jvm 1 | 2008/01/18 14:20:48 | java org.tanukisoftware.wrapper.WrapperSimpleApp
INFO | jvm 1 | 2008/01/18 14:20:48 |
INFO | jvm 1 | 2008/01/18 14:20:48 | Where:
INFO | jvm 1 | 2008/01/18 14:20:48 | app_class: The fully qualified class name of the application to run.
INFO | jvm 1 | 2008/01/18 14:20:48 | app_arguments: The arguments that would normally be passed to the
INFO | jvm 1 | 2008/01/18 14:20:48 | application.
STATUS | wrapper | 2008/01/18 14:20:50 | <-- Wrapper Stopped

0

New related question posted in thread.

0

Hello,

Could you please check if there are folders on the agent folder:
'upgrade', 'lib', 'backup', 'launcher'. Could you please send me contents of
'lib' and 'launcher' foloders. Do you have 'upgrade.log' in logs folder?

Please attach all files from 'logs' folder.

Build agent service may stop itself for upgrade. It is done without any messages,
but in a short time it start itself's service again. It is not recommended
to try
to start agent service again, while it is on upgrade.

It seems your agent distribution has become corrupted, to workaround it,
please, try reinstall build agent, start it and wait several minutes.

BTW. What user account is used for service? Was that clear installation of
build agent?
Does that user have enough permissions to agent installation folder?

Thanks!
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I'm afraid I'm back again... I've now got a dedicated build machine
that I'm trying to set up. I've managed to install everything without
a problem and I can manually start the build agent but for some
reason, I'm unable to run it as a windows service. I've installed the
windows service and tried to start it throught Control Panel >
Administrative Tools > Services but it keeps throwing an error saying
that startup failed. wrapper.log mentions something about not being
able to locate a class and something about an unsupported major.minor
version?? This is what's in wrapper.log:

STATUS | wrapper | 2008/01/18 14:20:47 | --> Wrapper Started as
Service
STATUS | wrapper | 2008/01/18 14:20:47 | Launching a JVM...
INFO | jvm 1 | 2008/01/18 14:20:48 | Wrapper (Version 3.2.3)
http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2008/01/18 14:20:48 | Copyright 1999-2006 Tanuki
Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2008/01/18 14:20:48 |
INFO | jvm 1 | 2008/01/18 14:20:48 | WrapperSimpleApp: Unable to
locate the class jetbrains.buildServer.agent.StandAloneLauncher:
java.lang.UnsupportedClassVersionError:
jetbrains/buildServer/agent/StandAloneLauncher (Unsupported
major.minor version 49.0)
INFO | jvm 1 | 2008/01/18 14:20:48 |
INFO | jvm 1 | 2008/01/18 14:20:48 | WrapperSimpleApp Usage:
INFO | jvm 1 | 2008/01/18 14:20:48 | java
org.tanukisoftware.wrapper.WrapperSimpleApp

INFO | jvm 1 | 2008/01/18 14:20:48 |
INFO | jvm 1 | 2008/01/18 14:20:48 | Where:
INFO | jvm 1 | 2008/01/18 14:20:48 | app_class: The fully
qualified class name of the application to run.
INFO | jvm 1 | 2008/01/18 14:20:48 | app_arguments: The
arguments that would normally be passed to the
INFO | jvm 1 | 2008/01/18 14:20:48 |
application.
STATUS | wrapper | 2008/01/18 14:20:50 | <-- Wrapper Stopped



0

Hi Eugene,
There are lib, backup and launcher folders but no upgrade folder. There is not an upgrade.log file in the logs folder.
How do I send/attach the files you want?
I'm able to manually run the build agent without a problem, it just refuses to run as a service.
I'm not sure whether my account is an administrator account or not but I am able to install software onto the machine.
Thanks,
K.

0

Fourth time lucky on the reinstall... the service refused to start when I tried to install it via the zip files and via the webstart but worked first go with the Windows Installer. :/ I still don't have an updates folder nor an updates.log.

0

hello,
please send all files to eugene period petrenko at jetbrains . com

Please zip all files in the agent folder but 'work'.

In case the process is service, it can be started on any user, for example
- SYSTEM account.
It is possible to change user for service in the services applet.

What version of windows do you use? What version of TeamCity?

Thanks.
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Fourth time lucky on the reinstall... the service refused to start
when I tried to install it via the zip files and via the webstart but
worked first go with the Windows Installer. :/ I still don't have an
updates folder nor an updates.log.



0

Hello,

Thank you.
Your build agent was corrupted. Only reinstall is possible.
Why do you use so old build? Could you please try upgrading to 3.0.1.
(Do not forget to backup database and teamcity data folder)
upgrade.log was added after your EAP build was released.

Please, make sure there no build agent services on the system, before installing
new build agent. To remove service, please, try using uninstall or 'bin/service.uninstall.bat',
note, it would used launcher/conf/wrapper.conf file settings to find service
instance to
kill.

--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Fourth time lucky on the reinstall... the service refused to start
when I tried to install it via the zip files and via the webstart but
worked first go with the Windows Installer. :/ I still don't have an
updates folder nor an updates.log.



0

Hello,
Do you have some antivirus software working on the agent's computer? If
so, please try installing/starting build agent with disabled antivirus.
Thanks.
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Fourth time lucky on the reinstall... the service refused to start
when I tried to install it via the zip files and via the webstart but
worked first go with the Windows Installer. :/ I still don't have an
updates folder nor an updates.log.



0

Please sign in to leave a comment.