500 error when performing a Git operation against a Bitbucket Server repository
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
Performing any Git operation against a Bitbucket Server repository fails, and a 500 error message is returned.
The following appears in the
ERROR [http-nio-7990-exec-4] @BZM30Fx890x69x0 127.0.0.0 "GET /mvc/error500 HTTP/1.1" c.a.s.i.web.ErrorPageController There was an unhandled exception loading [/scm/<project_key>/<repository_slug>.git/info/refs] java.lang.IllegalArgumentException: [/var/atlassian/application-data/bitbucket/shared/data/repositories/<repositoryId>] does not exist at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-18.0.jar:na]
- Browse to the location specified in the log files (
/var/atlassian/application-data/bitbucket/shared/data/repositories/<repositoryId>) and check if the folder exist and is not empty
Alternatively, browse to the
page and click on "Approximate size". The "Location on disk" on the user interface shows the same path reported in the log files.
The folder is expected to be empty or missing, and the "Approximate size" check returns 0KB.
The repository folder has been removed or emptied.
Restore a previous backup of Bitbucket Server by using the Bitbucket Server Backup Client.
A complete restore is the optimal solution. In case you don't have a backup available, you could restore the single repository folder from an existing partial backup.