Bundled ElasticSearch Windows service fails on switching to use Java 11
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Problem
When the bundled Elasticsearch instance is switched to use Java 11 through editing the service's configuration, the service fails to start and the following error is thrown in the System section of the Windows Event Viewer:
1
2
The Atlassian Bitbucket Elasticsearch <VERSION> (AtlassianBitbucketElasticsearch) service terminated with the following service-specific error:
The system cannot open the file.
Cause
The Windows Service is configured to use Java Options that are specific to Java 8. See BSERV-11986 for additional details.
Workaround
Remove the following entries from the Java Options
section of the Java
tab in the Elasticsearch Windows Service configuration window:
1
2
3
4
5
6
7
8
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintTenuringDistribution
-XX:+PrintGCApplicationStoppedTime
-Xloggc:<PATH_TO_GC_LOGS>
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=32
-XX:GCLogFileSize=64m
ℹ️ Adding back the following Java options will retain the ability to log GC activity:
1
-Xlog:safepoint,gc*,gc+age*=trace:file=<PATH_TO_GC_LOGS>:time:filecount=32,filesize=64m
Was this helpful?