TeamCity v7 hangs on agent side checkout using Git
Hello,
This morning I upgraded our TC instance from v6.5 to v7. Since then all builds have hung during the checkout process. The build cannot be stopped from the UI. It is necessary to stop the TeamCity Web Server and Build Agent services, which both end with an error. Afterwards it is necessary kill both the ssh and git processes and manually delete the build agent's work directory before the build will complete successfully. The build will complete successfully once after this is done, but will then hang the next time and these steps will need to be repeated.
Here is some information about my configurations:
- All code is stored in GitHub
- Each build configuration contains two VCS roots, which each checkout into their own subdirectory using a checkout rule
- Checkout mode is "automatically on agent"
- Checkout directory is "auto"
- I am NOT "cleaning all files before build"
- I'm authenticating with github using "default private key"
- my clean policy is "always" and my clean files policy is "all untracked files"
I recently updated another TeamCity instance from v6.5 to v7 and have experienced no problems. Although this instance works with the same repos on GitHub, it does have the following differences:
- It does NOT use multiple VCS roots per configuration.
- It uses server side checkout instead of agent side.
We actually use this instance of TeamCity to deploy our products to our production environments so we're pretty hampered by this. Any help any one could provide would be greatly appreciated.
Thanks in advance,
Jeremy
Please sign in to leave a comment.
For anyone else who runs into this, you can set "Clean all files before build" to true on the Version Control Settings page to work around the problem. Not ideal since it significantly increases the build time, but it works.
I've encountered the same issue in a very similar situation (github, default key, agent checkout). our server side checkout jobs work just fine.
I've dug into logs and it appears to block at `git ls-remote --tags`
Defininately seems to be a bug with v7, we upgraded from 6.5.5
EDIT:
This is the timeout in the logs. I've upgraded git from 1.7.6 to 1.7.9 without any luck
Tod,
it seems like you pinpointed a real cause of the error: we did 'git ls-remote' without authorization. Could you please install an attached build of plugin and check if it helps?
Attachment(s):
jetbrains.git.zip
Hi Dmitry,
Thanks for the quick response. I replaced the old file here: C:\TeamCity\webapps\ROOT\WEB-INF\plugins, once the agent upgraded, the build ran successfully. Thanks!
Thanks, Dimitry and Todd!
I've also installed the plugin and it seems to have corrected our issues as well! We're now able to checkout without forcing a Clean All Files before each checkout.
Thanks!
Jeremy
this is the related YouTrack issue: http://youtrack.jetbrains.com/issue/TW-20520
This fixed the hang for me as well. Thanks.