When using the root user, Search server cannot be started due to "don't run <search server> as root"
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
Search server 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:# cd /opt/atlassian/bitbucket/bin/ root@myserver:/opt/atlassian/bitbucket/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/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
Search server cannot be run as root.
- Login as the
- Run the start script