Bitbucket Server Backup Client fails with "File $BITBUCKET_HOME\bitbucket_search\nodes\0\indices\bitbucket-search-v1\0\index\write.lock cannot be read"

お困りですか?

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

コミュニティに質問

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

問題

Taking a backup of Bitbucket Server using the Bitbucket Server Backup Client fails.

One of the following appears in the backup client log (atlassian-sbc-YYYY-MM-DD-HHMM.log):

ERROR  (87%) Error writing tar file entry: The process cannot access the file because another process has locked a portion of the file java.io.IOException: The process cannot access the file because another process has locked a portion of the file
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at sun.nio.ch.FileDispatcherImpl.read(Unknown Source)
        ... 25 more frames available in the log file
ERROR  (87%) File $BITBUCKET_HOME\bitbucket_search\nodes\0\indices\bitbucket-search-v1\0\index\write.lock cannot be read
ERROR  (50%) Error writing tar file entry: The process cannot access the file because another process has locked a portion of the file
java.io.IOException: The process cannot access the file because another process has locked a portion of the file
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at sun.nio.ch.FileDispatcherImpl.read(Unknown Source)
        ... 25 more frames available in the log file
ERROR  (50%) File $BITBUCKET_HOME\index\stash-codesearch\nodes\0\node.lock cannot be read

診断

環境

  • Windows Operating System (while this could happen on Linux based Operating Systems as well, we have only seen this error on Windows so far)

診断ステップ

原因

The lock files are temporary files and, while they are available when the listing of the files is performed, they have already been removed when the backup tries to collect them.

ソリューション

Add one of the following exclusion options to the backup-config.properties file.


Recommended This configuration will only exclude the lock files in the index/stash-codesearch folder, which is the one where the data of the "Smarter Search" app saves its data:

bitbucket.home.excludes=index/stash-codesearch/**/*.lock

This second option would exclude every file (not just the lock ones). We can use this once it is confirmed that the index will be regenerated in case of a restore:

bitbucket.home.excludes=index/stash-codesearch/**

This option will exclude every lock file in every subfolder of the $BITBUCKET_HOME directory. While this will allow the creation of the backup, it may exclude other files outside of the app directory without any error:

bitbucket.home.excludes=**/*.lock


In case, after a restore, any issues are observed in the data indexed by the app, a "Save and Reindex" option is available on the app Global Settings page.

The page can be accessed at this URL:

<Bitbucket URL>/plugins/servlet/codesearch/globalsettings


最終更新日 2018 年 11 月 2 日

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

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