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 のみ。この記事は、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 は除く

問題

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)

Diagnostic Steps

原因

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.