TeamCity checkout is empty, if work directory is not changed
We use TeamCity Professional Version 4.0.2 (build 8222) and "ant" to build our software.
TeamCity is installed on Suse-Linuxv11.0 , there are setup 2 BuildAgents and we use "CVS" and the TeamCity provided "ant" tool.
We setup different VCS roots for every build project.
The VCS checkout mode is configured for "Automatically on agent (if supported by VCS roots)". Every time I start a new build it finished after a few seconds with e.g.
[01:00:08]:Cannot find build file by path specified in build configuration settings: '/opt/TeamCity-4.0.2/buildAgent2/work/2_2_6_0_/build/Scripts/build.xml' (absolute path on agent). Please check that specified path is correct.
[01:00:08]:jetbrains.buildServer.RunBuildException: Cannot find build file by path specified in build configuration settings: '/opt/TeamCity-4.0.2/buildAgent2/work/2_2_6_0/build/Scripts/build.xml' (absolute path on agent). Please check that specified path is correct.
jetbrains.buildServer.RunBuildException: Cannot find build file by path specified in build configuration settings: '/opt/TeamCity-4.0.2/buildAgent2/work/2_2_6_0/build/Scripts/build.xml' (absolute path on agent). Please check that specified path is correct.
at jetbrains.buildServer.runner.BuildFileRunnerUtil.getBuildFile(BuildFileRunnerUtil.java:61)
at jetbrains.buildServer.agent.ant.AntBuildRunner.getBuildFile(AntBuildRunner.java:150)
at jetbrains.buildServer.agent.ant.AntBuildRunner.getProgramParameters(AntBuildRunner.java:88)
at jetbrains.buildServer.agent.runner.JavaProgramRunner.buildCommandLine(JavaProgramRunner.java:81)
at jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:103)
at jetbrains.buildServer.agent.impl.runner.adapt.BuildProcessImpl$2.run(BuildProcessImpl.java:55)
at java.lang.Thread.run(Thread.java:619)
Looking on the build agent I find the build/Scripts folder empty and so the build.xml file cannot be accessed. When I change the build configuration to use another work folder, e.g. "2_2_6_0_test", the checkout and build works. This behaviour is independent if I set "clean checkout folder" or not or set checkout mode "Automatically on server.".
Please tell me how to fix this problem.
Thank you
Annett
Please sign in to leave a comment.
Hello Anett,
Please provide the following additional information:
- build log of the failed build
- screenshot of your CVS settings
- used checkout rules, if any
- logs from TeamCity/log/teamcity-vcs.log and from buildAgent/logs/teamcity-agent.log
Thanks,
KIR
Hi Kirill,
thanks for the quick reply.
Attached you will find the logfiles and the screenshots of our VCS settings.
We have no special checkout rules, but we use a module file to reference a list of packages.
Thank you in advance.
Annett
Attachment(s):
VCSSettings.tgz
TeamCityLogs.tgz
There is something I do not understand. In the attached archive I see that checkout directory is: 2_2_2_0_maintenance so on agent it will be:
/path/to/agent/work/2_2_2_0_maintenance
But in the exception from the first message I see other path:
/opt/TeamCity-4.0.2/buildAgent2/work/2_2_6_0_/build/Scripts/build.xml'
I.e. checkout directory name is 2_2_6_0_
Probably settings you provided belong to another build configuration?
Dear Pavel,
yes, the screenshot points to another checkout directory.
This is because I change every time (before I start the build) the checkout directory, then the checkout and the build is successful.
If I do not change the checkout folder, the build failed (as in logfile) because the checkout only gets empty folders.
So the screenshot does not fit to the logfile. Sorry, only the setting for the checkout directory is different.
Otherwise I change nothing of the setup.
In the attached BuildAgent log the checkout folder is named HEAD_G.
After starting the build a second time, it fails after a second, because checked out build-script folder is empty.
We have no special checkout rule and we use a module file for the checkout to reference all projects we need for the build.
Should we configure a special checkout rule?
Best Regards
Annett
Attachment(s):
buildAgent.log
You mentioned that in CVS you are using modules file. Can you provide this file? You can submit a bug report in our tracker: http://jetbrains.net/tracker/workspace/TW and attach this file to the bug.
We are experiencing what appears to be the same the same issue on some of our CVS based projects since upgrading to 4.0.2.
I tried to turn on VCS debugging on the agent as described here:
http://www.jetbrains.net/confluence/display/TCD4/Reporting+Issues#ReportingIssues-VersionControlDebugLogging
Unfortunately I'm having trouble getting any more information, these settings do not seem to affect the log output. I set TEAMCITY_AGENT_OPTS to "-Dcvs.log.commands=true" and configured the log4j xml for debug output. I see no entries in teamcity-vcs.log on the agent, and no addition VCS information in teamcity-agent.log
It certainly seems like the checkout is failing, but I cannot confirm this because I can get no detailed information on the agent's interaction with CVS.
Any help would be appreciated. Thanks.
--
Matthew Jaskula
How do you start TeamCity server? If you are using teamcity-server.sh under Unix please try to start this script using the following command:
sh -x ./teamcity-server.sh
You will see what parameters are passed to TeamCity server.
Please describe your configuration, VCS root settings, checkout mode. Also please describe issue in more details.
Our issue is as described by the original poster. We are running TeamCity 4.0.2 (build 8222) on Linux. The problem builds check out on the agent from CVS and we are enforcing a clean checkout. The TC server is correctly identifying changes in CVS. The agent does not appear able to check out the project even though no errors are logged. The build fails when it cannot find the build script as described by the OP.
Here are the options that are printed when starting TC server with '-x':
+ TEAMCITY_SERVER_MEM_OPTS='-Xmx512m -XX:MaxPermSize=92m'
+ CATALINA_OPTS=' -Dcvs.log.commands=true -server -Xmx512m -XX:MaxPermSize=92m -Dlog4j.configuration=file:/home/tc.ethan/TeamCity/bin/../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/ -Djava.awt.headless=true'
And the agent:
+ TEAMCITY_AGENT_MEM_OPTS=-Xmx384m
+ TEAMCITY_LAUNCHER_OPTS=-ea
+ TEAMCITY_AGENT_OPTS=-Dcvs.log.commands=true -ea -Xmx384m -Dteamcity_logs=../logs/
+ nohup /usr/java/jdk1.5.0_13/bin/java -ea -cp ../launcher/lib/launcher.jar jetbrains.buildServer.agent.Launcher -Dcvs.log.commands=true -ea -Xmx384m -Dteamcity_logs=../logs/ -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml jetbrains.buildServer.agent.AgentMain -file ../conf/buildAgent.properties
Config:
The build checks out on the agent and 'enforce clean checkout' is checked.
VCS:
CVS, using a local cvs root, checking out from a branch, history command supported.
Build log:
[22:28:00]: Clean build enabled: removing old files from /mnt/storage/teamcity/work/31a67824170b831d
[22:28:00]: Clearing temporary directory: /mnt/storage/teamcity/temp/buildTmp
[22:28:00]: Checkout directory: /mnt/storage/teamcity/work/31a67824170b831d
[22:28:00]: Updating project sources
[22:28:00]: Updating /mnt/storage/teamcity/work/31a67824170b831d from cvs
[22:28:00]: Updating from cvs
[22:28:00]: Specified Ant home directory does not exist or is not a directory: /mnt/storage/teamcity/work/31a67824170b831d/apps/apache-ant
[22:28:00]: Cannot find build file by path specified in build configuration settings: '/mnt/storage/teamcity/work/31a67824170b831d/opentools/etc/tcm/build/build.xml' (absolute path on agent). Please check that specified path is correct.
[22:28:00]: jetbrains.buildServer.RunBuildException: Cannot find build file by path specified in build configuration settings: '/mnt/storage/teamcity/work/31a67824170b831d/opentools/etc/tcm/build/build.xml' (absolute path on agent). Please check that specified path is correct. jetbrains.buildServer.RunBuildException: Cannot find build file by path specified in build configuration settings: '/mnt/storage/teamcity/work/31a67824170b831d/opentools/etc/tcm/build/build.xml' (absolute path on agent). Please check that specified path is correct. at jetbrains.buildServer.runner.BuildFileRunnerUtil.getBuildFile(BuildFileRunnerUtil.java:61) at jetbrains.buildServer.agent.ant.AntBuildRunner.getBuildFile(AntBuildRunner.java:150) at jetbrains.buildServer.agent.ant.AntBuildRunner.getProgramParameters(AntBuildRunner.java:88) at jetbrains.buildServer.agent.runner.JavaProgramRunner.buildCommandLine(JavaProgramRunner.java:81) at jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:103) at jetbrains.buildServer.agent.impl.runner.adapt.BuildProcessImpl$2.run(BuildProcessImpl.java:55) at java.lang.Thread.run(Thread.java:595)
[22:28:15]: Publishing artifacts (13s)
[22:28:15]: [Publishing artifacts] Paths to publish: [opentools/src/test/unit/reports/**/* => reports, teamcity-info.xml]
[22:28:29]: [Publishing artifacts] Publishing artifacts 'opentools/src/test/unit/reports/**/*' to reports
[22:28:29]: [Publishing artifacts] Artifacts path opentools/src/test/unit/reports/**/* not found
[22:28:11]: Build finished
agent log:
Attached. I am particularly concerned about these lines, this is where i expected to see a vcs error:
[2009-04-02 22:28:00,023] INFO - jetbrains.buildServer.AGENT - Sources loaded for 0 seconds
Thanks for your help.
Attachment(s):
teamcity-agent.log.save
Please describe your VCS root settings and checkout rules. If you have some modules specified in CVS modules file please attach them too. Or you can send this information to teamcity-feedback [at] jetbrains.com if it contains some sensitive data.
Email sent.
Thanks.
--
Matthew Jaskula