Repocheck error after upgrade

Hi All, I just upgraded Gitlab to 15.0.5 and aiming to complete the upgrade to the fullest. Currently on 15.0.5, I came across this error " Last repository check (4 days ago) failed. See the ‘repocheck.log’ file for error messages". Upon checking the repocheck zipped log file, here are the errors in detail below. Any assistance would be appreciate.

Logfile created on 2024-05-15 14:20:36 +1200 by logger.rb/v1.4.2

E, [2024-05-15T14:20:36.919406 #2110] ERROR – : xxxx-xxxxxx/xxxxxx: Could not fsck repository: error: Could not read 13a18b8e31f538adce6bc87fe0b9c5ca909ea2a4
failed to parse commit 13a18b8e31f538adce6bc87fe0b9c5ca909ea2a4 from object database for commit-graph
error: Could not read 176b730264a9660ead8c9e61d9020aa0f9edfd64
failed to parse commit 176b730264a9660ead8c9e61d9020aa0f9edfd64 from object database for commit-graph
error: Could not read 3b356338f8641b7df6b3cbf7bc3b9509919a83cc
failed to parse commit 3b356338f8641b7df6b3cbf7bc3b9509919a83cc from object database for commit-graph

This post should help out:

work your way through each of the commands in that post. I had similar once, and that worked for me.

Thank you @iwalker, appreciate it. Sorry, I am quite new to this. From the Gitlab Web Ui (Admin → Projects), error shows :
“Last repository check (5 days ago) failed. See the ‘repocheck.log’ file for error messages”
and the Gitaly relative path: @hashed/2c/62/2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3.git

And when I checked the logs in the server (path - /var/log/gitlab/gitlab-rails), the error from file name repocheck.log.1.gz shows :

Logfile created on 2024-05-15 14:20:36 +1200 by logger.rb/v1.4.2

E, [2024-05-15T14:20:36.919406 #2110] ERROR – : projectName/xxxxx: Could not fsck repository: error: Could not read 13a18b8e31f538adce6bc87fe0b9c5ca909ea2a4
failed to parse commit 13a18b8e31f538adce6bc87fe0b9c5ca909ea2a4 from object database for commit-graph
error: Could not read 176b730264a9660ead8c9e61d9020aa0f9edfd64
failed to parse commit 176b730264a9660ead8c9e61d9020aa0f9edfd64 from object database for commit-graph
error: Could not read 3b356338f8641b7df6b3cbf7bc3b9509919a83cc
failed to parse commit 3b356338f8641b7df6b3cbf7bc3b9509919a83cc from object database for commit-graph
error: Could not read 429a6ad724533e82aab39af96114ab05d7fce57e
failed to parse commit 429a6ad724533e82aab39af96114ab05d7fce57e from object database for commit-graph
error: Could not read 4b2b89c89f8abdecfc0af1a4d8d9e0bd9ab7fc5e
failed to parse commit 4b2b89c89f8abdecfc0af1a4d8d9e0bd9ab7fc5e from object database for commit-graph
error: Could not read 713fad643f857bfc0ea0be82d093af7a4cd99545
failed to parse commit 713fad643f857bfc0ea0be82d093af7a4cd99545 from object database for commit-graph
error: Could not read d08e1704dfc8c207b346360f3ed898e7b29aa0b4
failed to parse commit d08e1704dfc8c207b346360f3ed898e7b29aa0b4 from object database for commit-graph
error: Could not read fed4a49ade03f9ac5c2924369f146a272b903c27
failed to parse commit fed4a49ade03f9ac5c2924369f146a272b903c27 from object database for commit-graph

Not sure which repository I should run “sudo -u git /opt/gitlab/embedded/bin/git -C /var/opt/gitlab/git-data/repositories/@hashed/xx/xx/xxxxxxx.git fsck” | “sudo -u git /opt/gitlab/embedded/bin/git -C /var/opt/gitlab/git-data/repositories/@hashed/xx/xx/xxxxxxx.git gc” commands, the Gitaly relative path shown in the Gitlab Web Ui or the repository error shown in the filename repocheck.log.1.gz from the server?

Each of those ID’s abouve next to “Could not read”, are the repositories. You will need to find them under your git-data/repositories directory. I’ll give you an example below.

I go to my admin panel, and then projects. Selecting a project here, you can see a relative path of @hashed/xx/xx/ and then the long ID. So mine in this instance looks like this 6b51d431df5d7f141cbececcf79edf3dd861c3b4069f0b11661a3eefacbba918.git. I’m just writing this so you can see how I obtained this ID before I then search for it on the Linux console. All those ID’s you have above are the repo ID without the .git on the end. So now, let’s take my ID and search for it:

root@repo:~# find /var/opt/gitlab/git-data/repositories/ -iname 6b51d431df5d7f141cbececcf79edf3dd861c3b4069f0b11661a3eefacbba918.git

/var/opt/gitlab/git-data/repositories/@snippets/6b/51/6b51d431df5d7f141cbececcf79edf3dd861c3b4069f0b11661a3eefacbba918.git
/var/opt/gitlab/git-data/repositories/@hashed/6b/51/6b51d431df5d7f141cbececcf79edf3dd861c3b4069f0b11661a3eefacbba918.git

The snippets one you can ignore, we need the other @hashed one. So you can use that command above, substituting the ID of my project with the ones from your errors above. Then when you have the path, that is the path you use for the git fsck commands that I linked from the other thread on this forum.

Thank you very much @iwalker. I have followed the procedure and triggered the repocheck manually, seems the to be successful. Appreciate your help on this

1 Like