Bundled Elasticsearch throws "access denied" errors on Windows installations when symbolic link is used

プラットフォームについて: 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 は除く

問題

When using the bundled Elasticsearch with a Bitbucket Server instance installed on Windows, if a symlink is set up anywhere on the Bitbucket Home the Elasticsearch service will not start, and the following error is thrown in the bitbucket_search.log file:

[2019-10-04T08:22:02,595][ERROR][o.e.b.Bootstreap ] [bitbucket_bundled]Exception java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Path\to\Bitbucket_home\shared\data\nodes\0" "write")

原因

When attempting to manipulate the contents of the shared Bitbucket home directory, the Java process is blocked because it doesn't have the appropriate permissions on the directory. This is due to the files technically belonging to a different directory because of the symbolic link that was placed on the Bitbucket Home.

ソリューション

ソリューション

Add the following line to the %JAVA_HOME%/lib/security/java.policy file for the JDK being used by the Elasticsearch Windows service and then restart the Elasticsearch service:

permission java.io.FilePermission "C:\\Path\\to\\Bitbucket_home\\shared-", "read,write,delete,execute";

⚠️ Be sure to replace the token C:\\Path\\to\\Bitbucket_home\\shared with the actual path to the "shared" directory in your Bitbucket home, while also being sure to not remove the hyphen at the end of this path.

更新日時: September 25, 2025

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

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