When manually installing Elasticsearch bundled with Bitbucket Server as a Windows service, the service is not installed

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 4.6.3
    • Affects Version/s: 4.6.2
    • Component/s: None
    • None

      Summary

      When manually installing Elasticsearch bundled with Bitbucket Server as a Windows service, the service is not installed.

      Environment

      • Windows as operating system

      Steps to Reproduce

      1. Browse to the <Bitbucket installation directory>\elasticsearch\bin folder
      2. Run the service.bat install command

      Expected Results

      The Elasticsearch service is successfully installed.

      Actual Results

      The Elasticsearch service is not installed, the following message is presented:

      The system cannot find the file specified.
      The service 'atlbitbucket-elasticsearch-x64' has been installed.
      

      Note: even if the message says that the service has been installed, it has not been installed.

      Notes

      For the issue related to the incorrect user when the Windows Service is installed using the installer, please refer to: https://jira.atlassian.com/browse/BSERV-8804

      Workaround

      Remove the --ServiceUser <SERVICE_USER> --ServicePassword <SERVICE_PASSWORD> string from the line 166 in the service.bat file, and run the service.bat install command again.
      This is how the line 166 in the service.bat file should look like:

      "%EXECUTABLE%" //IS//%SERVICE_ID% --Startup %ES_START_TYPE% --StopTimeout %ES_STOP_TIMEOUT% --StartClass org.elasticsearch.bootstrap.Elasticsearch --StopClass org.elasticsearch.bootstrap.Elasticsearch --StartMethod main --StopMethod close --Classpath "%ES_CLASSPATH%" --JvmSs %JVM_SS% --JvmMs %JVM_XMS% --JvmMx %JVM_XMX% --JvmOptions %JVM_OPTS% ++JvmOptions %ES_PARAMS% %LOG_OPTS% --PidFile "%ES_HOME%\bin\elasticsearch.pid" --DisplayName "Atlassian Bitbucket Elasticsearch %ES_VERSION% (%SERVICE_ID%)" --Description "Atlassian Bitbucket Elasticsearch %ES_VERSION% Windows Service - http://elasticsearch.org" --Jvm "%JAVA_HOME%%JVM_DLL%" --StartMode jvm --StopMode jvm --StartPath "%ES_HOME%" ++StartParams start
      

            Assignee:
            Norman Ma (Inactive)
            Reporter:
            Caterina Curti
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: