ElasticSearch fails to start (java.lang.RuntimeException: starting java failed) in Bitbucket Server

お困りですか?

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

コミュニティに質問


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

要約

Elasticsearch service fails to start with the 'Error opening log file 'logs/gc.log': Permission denied' error.

環境

Bitbucket Server 7.6.0 with Bundled ES. It can happen in any version of Bitbucket.

診断

Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Nov 13 17:19:25 sso-services-ppr start-bitbucket.sh[16873]: output:
Nov 13 17:19:25 sso-services-ppr start-bitbucket.sh[16873]: [0.002s][error][logging] Error opening log file 'logs/gc.log': Permission denied
Nov 13 17:19:25 sso-services-ppr start-bitbucket.sh[16873]: [0.002s][error][logging] Initialization of output 'file=logs/gc.log' using options 'filecount=5,filesize=20M' failed.

原因

The Bitbucket installation folder - /$BITBUCKET_INSTALL/elasticsearch/logs - doesn't have the write permissions for the Bitbucket user.

ソリューション

  • Confirm Bitbucket user owns the directory by running chown -R atlbitbucket:atlbitbucket *
  • Change the permission of the folder above to have write permissions for the Bitbucket user by running chmod 755 
最終更新日: 2023 年 10 月 17 日

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

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