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

お困りですか?

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

コミュニティに質問

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

問題

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";

(warning) 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.

説明Access Denied error for Bitbucket's Elasticsearch on Windows
製品Bitbucket

最終更新日: 2019 年 12 月 24 日

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

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