When using the root user, Elasticsearch cannot be started due to "don't run elasticsearch as root"

お困りですか?

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

コミュニティに質問

この記事はアトラシアンのサーバー製品にのみ適用されます。クラウドとサーバー製品の違いについてはこちらをご確認ください。

問題

Elasticsearch cannot be started, therefore Bitbucket Server cannot connect to it.

The following appears in the console output when running the start-search.sh or the start-bitbucket.sh script or the :

root@myserver:/home/stash/shared/search# cd /opt/atlassian/bitbucket/4.9.1/bin/
root@myserver:/opt/atlassian/bitbucket/4.9.1/bin# sh start-search.sh 
Starting Elasticsearch bundled with Atlassian Bitbucket
BITBUCKET_HOME set to /var/atlassian/application-data/bitbucket
-e Starting Elasticsearch bundled with Atlassian Bitbucket as current user
-e 
Elasticsearch bundled with Atlassian Bitbucket started successfully
root@myserver:/opt/atlassian/bitbucket/4.9.1/bin# Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:93)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.

診断

環境

  • Operating system: Unix based 

原因

Elasticsearch cannot be run as root.

ソリューション

  • Login as the atlbitbucket user
  • Run the start script


説明 Elasticsearch cannot be started, therefore Bitbucket Server cannot connect to it.
最終更新日 2019 年 1 月 2 日

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

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