500 error when performing a Git operation against a Bitbucket Server repository

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

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]

診断

Diagnostic Steps

  • 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.

最終更新日 2018 年 11 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.