Details
-
Bug
-
Resolution: Fixed
-
High
-
6.0.0, 6.1.0, 6.2.0
-
2
-
Severity 2 - Major
-
7
-
Description
This looks to be a recurrence of BSERV-10746 somehow with the introduction of Elasticsearch 6.5.3 on Bitbucket 6.x
Summary
It's not possible to create the Elasticsearch service in Windows – 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 Bitbucket 6.0/6.1.0
- 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:
C:\Atlassian\Bitbucket\6.1.0\elasticsearch\bin>service.bat install BB6_Search Installing service : "BB6_Search" Using JAVA_HOME (64-bit): "C:\Program Files\Java\jre1.8.0_141" Exception in thread "main" java.nio.file.NoSuchFileException: C:\Atlassian\Bitbucket\6.1.0\elasticsearch\config\jvm.options
Expected Results
Elasticsearch service should be created
Actual Results
After running the
service.bat install MyName
the following message will be shown and the service won't be created
Exception in thread "main" java.nio.file.NoSuchFileException: C:\Atlassian\Bitbucket\6.1.0\elasticsearch\config\jvm.options
Notes
What is causing the issue is that the <Bitbucket Server installation directory>\elasticsearch\bin\elasticsearch-env.bat is pointing to the wrong location while trying to find the jvm-options file.
In the elasticsearch-env.bat file we can see the following
if not defined ES_PATH_CONF (
set ES_PATH_CONF=!ES_HOME!\config
)
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\elasticsearch-env.bat
- replace
if not defined ES_PATH_CONF ( set ES_PATH_CONF=!ES_HOME!\config )
- For
if not defined ES_PATH_CONF ( set ES_PATH_CONF=!ES_HOME!\config-template )
- run the command in the step 10 of the article again;
Attachments
Issue Links
- mentioned in
-
Page Loading...