A directory exists at the same location when creating repository

プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

症状

Creating a repository fails with an error that a directory exists at the same location and the following appears in the atlassian-bitbucket-YYYY-MM-DD.log:

2014-09-18 23:16:27,865 DEBUG [http-bio-7990-exec-169] user @1WE6GQ3x1396x14813x0 76eaji 10.10.255.179,127.0.0.1 "POST /projects/PROJ/repos HTTP/1.1" c.a.s.i.w.a.RepositoryAdminController Exception occurred com.atlassian.bitbucket.repository.IllegalRepositoryStateException: Cannot create repository platform-core at /var/atlassian/application-data/bitbucket/shared/data/repositories/15; a directory exists at the same location

原因

The sequence number used for the next repository ID has become out of sync between the database and file system.

ソリューション

  • Shutdown Bitbucket Server

  • Execute the following SQL against your Bitbucket Server database

    UPDATE id_sequence SET next_val = (select max(id) from repository) + 20 WHERE sequence_name = 'repository';
  • Bitbucket Server を開始します。

更新日時: September 25, 2025

さらにヘルプが必要ですか?

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