500 error when performing a Git operation against a Bitbucket Server repository
プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。
問題
Performing any Git operation against a Bitbucket Server repository fails, and a 500 error message is returned.
atlassian-bitbucket.log:
に次のメッセージが出力される。
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
<BITBUCKET_URL>/projects/<project_key>/repos/<repository_slug>/settings
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.