Details
-
Bug
-
Resolution: Fixed
-
High
-
5.8.2, 5.9.1
-
2
-
Severity 3 - Minor
-
1
-
Description
Summary
When installing Bitbucket from the ZIP archive in Windows, the services won't be automatically created as expected. To create the services, one must go over the instructions of the article below, however it's not possible to create the Elasticsearch service in windows, since the batch file responsible for creating the service is checking the wrong location.
How to Replicate
- Download the ZIP archive for Bibtucket 5.9.1
- Install it;
- Go over the Running Bitbucket Server as a Windows service to create the services;
- At step 9 change directory as instructed;
- At step 10 run the command below to create the Elasticsearch service
service.bat install MyName
- This will result in the following message:
Expected Results
Elasticsearch service must be created
Actual Results
After running the
service.bat install MyName
the following message will be shown and the service won't be created
FINDSTR: Cannot open <BBitbucket Server installation directory>\elasticsearch\config\jvm.options
Notes
What is causing the issue is that the <Bitbucket Server installation directory>\elasticsearch\bin\service.bat is pointing to the wrong location while trying to find the jvm-options file.
In the batch file we can see the following
:foundJVM if "%ES_JVM_OPTIONS%" == "" ( set ES_JVM_OPTIONS=%ES_HOME%\config\jvm.options )
In the code above we can see that it is trying to check for the file in %ES_HOME%\config however, there's no config folder but config-template.
Workaround
- Edit the <Bitbucket Server installation directory>\elasticsearch\bin\service.bat
- replace
:foundJVM if "%ES_JVM_OPTIONS%" == "" ( set ES_JVM_OPTIONS=%ES_HOME%\config\jvm.options )
- For
:foundJVM if "%ES_JVM_OPTIONS%" == "" ( set ES_JVM_OPTIONS=%ES_HOME%\config-template\jvm.options )
- run the command in the step 10 of the article again;
Attachments
Issue Links
- mentioned in
-
Page Loading...