-
Bug
-
Resolution: Won't Fix
-
High
-
None
-
6.0.0, 6.6.2
-
4
-
Severity 3 - Minor
-
34
-
Summary
When the Windows Service for the bundled Elasticsearch instance is created by the Bitbucket Windows installer, the default Java options prevent the Elasticsearch service from starting.
Steps to Reproduce
- Install AdoptOpenJDK11 or an equivalent distribution of Java 11, and set the JAVA_HOME and JRE_HOME environment variables to this installed JDK
- Run the Bitbucket installer, select Install Bitbucket Server, and opt to create the Windows Services.
- The Elasticsearch instance then needs to be manually pointed to use the JDK11 instance - see
BSERV-11985
- The Elasticsearch instance then needs to be manually pointed to use the JDK11 instance - see
- After install completes, open the settings of the Elasticsearch Windows service
- On the Java tab, change the JVM to the Java 11 instance that was installed in step 1
Expected Results
Either the Elasticsearch service works when manually switched to JDK11, or the installer recognizes that JDK11 is installed and then configures the Windows Services appropriately on creation
- The installer may not recognize installed Java 11 instances and automatically configure the Windows Services to use those instead - see
BSERV-11985
Actual Results
The service fails to start, and the following exception is thrown in the AtlassianBitbucketElasticsearch.<DATE>.log file:
[2019-09-26 20:48:46] [info] [ 916] Commons Daemon procrun (1.0.15.0 64-bit) started [2019-09-26 20:48:46] [info] [ 916] Running 'AtlassianBitbucketElasticsearch' Service... [2019-09-26 20:48:46] [info] [ 1460] Starting service... [2019-09-26 20:48:46] [error] [ 2568] CreateJavaVM Failed [2019-09-26 20:48:46] [error] [ 2568] The system cannot find the file specified. [2019-09-26 20:48:46] [error] [ 1460] Failed to start Java [2019-09-26 20:48:46] [error] [ 1460] ServiceStart returned 4 [2019-09-26 20:48:46] [info] [ 916] Run service finished. [2019-09-26 20:48:46] [info] [ 916] Commons Daemon procrun finished
- This exception is also thrown in the System section of the Windows Event Viewer
Workaround
Remove the following entries from the Java Options section of the Java tab in the Elasticsearch Windows Service configuration window:
-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 options will retain the ability to log GC activity:
- -Xlog:safepoint,gc*,gc+age*=trace:file=<PATH_TO_GC_LOGS>:time:filecount=32,filesize=64m
- is superseded by
-
BSERV-8453 Installer should always use the bundled JRE
- Closed
- is caused by
-
BBSDEV-22298 Loading...