jetbrains.buildServer.vcs.VcsException: 'git fetch' command failed
This build and git repository was working for a long time and then started to take forever to pull changes and then gets this error. It will occasionally work for a bit then revert back to this problem.
Error:
Caused by: jetbrains.buildServer.vcs.VcsException: 'git fetch' command failed (repository dir: <TeamCity data dir>/system/caches/git/git-<redacted>.git). stderr: Short read of block.
Please sign in to leave a comment.
"Short read of block" could mean a corrupted repository. Please check that the remote is working properly everywhere else or not; it could be a remote issue. If it works everywhere else, I suggest you try to reset the TeamCity caches: https://www.jetbrains.com/help/teamcity/2024.07/teamcity-monitoring-and-diagnostics.html#Caches.
If that doesn't help, please do the following:
1. Reproduce the issue and share the teamcity-vcs.log.
2. Enable the debug-vcs logging profile (https://www.jetbrains.com/help/teamcity/2024.07/teamcity-server-logs.html#Changing+Logging+Configuration).
3. Reproduce the issue and share the teamcity-vcs.log.
The idea is to have a non-debug as well as a debug log for the same issue. It should give us more information on other possible causes.
You can upload the log files with https://uploads.jetbrains.com/ and share the upload ID.
Best regards,
Anton
The repo doesn't seem to be corrupted because it is working with a whole team of developers just fine. My support person renamed the cache folder and the builds seem to be working well now.
Is it understood as to why this happens?
Since it helped, the cause seems to be in corrupted vcsContentCache cache. TeamCity should reset this cache automatically during the cleanup. Do you have an automatic cleanup enabled?
And also, you mentioned that it'll occasionally work for a bit and then rever back, could you provide more details on this? When did you see the error? For how long it'll work and then stop working again?
Sorry, I don't have a lot of information as I'm just a user of the DevSecOps pipeline. It was pretty random. Not sure if it was tied to a particular agent, but didn't seem to be.
Anyway, the cache reset helped, so it looks like it was a corrupted vcsContentCache cache. This cache should be reset during the cleanup, so I suggest checking the cleanup settings and its schedule: https://www.jetbrains.com/help/teamcity/2024.07/teamcity-data-clean-up.html.
Since there are no further details you could provide about this issue, I suggest contacting the support team if it happens again, we'll look into it.
Best regards,
Anton