Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-9056

Installer does not copy Elasticsearch configuration into BITBUCKET_HOME/shared/search

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 4.8.6, 4.9.1
    • 4.8.0, 4.9.0
    • None
    • None

      Summary

      The installer for Linux does not copy the contents of BITBUCKET_INSTALL/elasticsearch/config-template into BITBUCKET_HOME/shared/search which results in Elasticsearch running but listening on port 9200 and not 7992 that we expect.

      Environment

      • Linux using the bin installer

      Steps to Reproduce

      Install Bitbucket Server as root on a Linux machine without the atlbitbucket user account, and select Install as a service: Yes.

      Expected Results

      BITBUCKET_HOME/shared/search contains the following files:

      ├── buckler
      │   └── buckler.yml
      ├── elasticsearch.yml
      └── logging.yml
      

      Actual Results

      BITBUCKET_HOME/shared/search does not contain the required yml files.

      The <Bitbucket Installation directory>/.install4j/installation.log contains a message of the form:

      [ERROR] com.install4j.runtime.installer.helper.launching.LaunchHelper: return value is 1
      [INFO] com.install4j.runtime.installer.helper.launching.LaunchHelper: stdout output was empty
             
      stderr output:
      ---BEGIN---
      su: user atlbitbucket does not exist
      ---END---
      

      The instance launches normally, but all code and repository search functionality doesn't work. On the Administration >> Server settings page the Search settings show a blank username and password.

      Workaround

      1. Copy the files from BITBUCKET_INSTALL/elasticsearch/config-template folder to BITBUCKET_HOME/shared/search 
      2. Restart Elasticsearch

          Form Name

            [BSERV-9056] Installer does not copy Elasticsearch configuration into BITBUCKET_HOME/shared/search

            Hi joachim.bollen1, Thanks for raising that support ticket and attaching that logfile. The specific problem in this issue doesn't seem to be happening in your case. I see in your installation.log:

            [INFO] com.install4j.runtime.beans.actions.misc.RunExecutableAction [ID 81887]: Execute action
                   Property executable: bin/install.sh
                   Property workingDirectory: /srv/data/opt/atlassian/bitbucket/4.9.1
                   Property useRollbackExecutable: false
                   Property rollbackExecutable: null
                   Property rollbackWorkingDirectory: null
                   Property rollbackArguments: null
                   Property wait: true
                   Property waitForStreams: true
                   Property returnCodeVariable: stash.user.query.result
                   Property timeout: 10
                   Property logArguments: false
                   Property stdoutRedirectionMode: To log file
                   Property stdoutVariableName: 
                   Property stdoutFile: null
                   Property failOnStdoutFileError: false
                   Property stderrRedirectionMode: To log file
                   Property stderrVariableName: 
                   Property stderrFile: null
                   Property failOnStderrFileError: false
                   Property stdinRedirectionMode: No redirection
                   Property stdinString: 
                   Property stdinFile: null
                   Property failOnStdinFileError: false
                   Property includeParentEnvironmentVariables: true
                   Property environmentVariables: {}
                   Property showWindowsConsole: false
                   Property keepConsoleWindow: false
                   Property arguments: [logging of arguments is disabled]
                   Property rollbackSupported: false
                   used working dir: /srv/data/opt/atlassian/bitbucket/4.9.1
            [INFO] com.install4j.runtime.installer.helper.launching.LaunchHelper: stdout output was empty
                   stderr output was empty
            [INFO] com.install4j.runtime.beans.actions.misc.RunExecutableAction [ID 81887]: Variable changed: stash.user.query.result=0[class java.lang.Integer]
                   Execute action successful after 503 ms
            

            which indicates to me that the installation of BITBUCKET_INSTALL/elasticsearch/config-template seemed to work perfectly. I think something else must have happened to your client's instance for it to come up with the wrong configuration. This might have to be followed up separately (perhaps on the support ticket you raised).

            Cristan Szmajda (Inactive) added a comment - Hi joachim.bollen1 , Thanks for raising that support ticket and attaching that logfile. The specific problem in this issue doesn't seem to be happening in your case. I see in your installation.log : [INFO] com.install4j.runtime.beans.actions.misc.RunExecutableAction [ID 81887]: Execute action Property executable: bin/install.sh Property workingDirectory: /srv/data/opt/atlassian/bitbucket/4.9.1 Property useRollbackExecutable: false Property rollbackExecutable: null Property rollbackWorkingDirectory: null Property rollbackArguments: null Property wait: true Property waitForStreams: true Property returnCodeVariable: stash.user.query.result Property timeout: 10 Property logArguments: false Property stdoutRedirectionMode: To log file Property stdoutVariableName: Property stdoutFile: null Property failOnStdoutFileError: false Property stderrRedirectionMode: To log file Property stderrVariableName: Property stderrFile: null Property failOnStderrFileError: false Property stdinRedirectionMode: No redirection Property stdinString: Property stdinFile: null Property failOnStdinFileError: false Property includeParentEnvironmentVariables: true Property environmentVariables: {} Property showWindowsConsole: false Property keepConsoleWindow: false Property arguments: [logging of arguments is disabled] Property rollbackSupported: false used working dir: /srv/data/opt/atlassian/bitbucket/4.9.1 [INFO] com.install4j.runtime.installer.helper.launching.LaunchHelper: stdout output was empty stderr output was empty [INFO] com.install4j.runtime.beans.actions.misc.RunExecutableAction [ID 81887]: Variable changed: stash.user.query.result=0[class java.lang.Integer] Execute action successful after 503 ms which indicates to me that the installation of BITBUCKET_INSTALL/elasticsearch/config-template seemed to work perfectly. I think something else must have happened to your client's instance for it to come up with the wrong configuration. This might have to be followed up separately (perhaps on the support ticket you raised).

            Hi @cszmajda,

            Please find the installation.log file attached.
            installation.log

            joachimbollen added a comment - Hi @cszmajda, Please find the installation.log file attached. installation.log

            @cszmajda I've opened ticket SSP-17166.

            I won't be able to get back to you before tuesday, because I'm only at this client a few days a week, but I'll keep you posted.

            joachimbollen added a comment - @cszmajda I've opened ticket SSP-17166. I won't be able to get back to you before tuesday, because I'm only at this client a few days a week, but I'll keep you posted.

            Hi joachim.bollen1, Could you please attach your BITBUCKET_INSTALL/.install4j/installation.log file? Or, alternatively, if you prefer you can open a support case at https://support.atlassian.com/browse/SSP where your attachment(s) won't be public.

            Cristan Szmajda (Inactive) added a comment - Hi joachim.bollen1 , Could you please attach your BITBUCKET_INSTALL/.install4j/installation.log file? Or, alternatively, if you prefer you can open a support case at https://support.atlassian.com/browse/SSP where your attachment(s) won't be public.

            I don't think this issue is solved. I just upgraded a Bitbucket Server instance from 4.5.2 to 4.9.1, and the elasticsearch settings aren't copied over... Elasticsearch was still listening at 9200, with no buckler configuration available.

            joachimbollen added a comment - I don't think this issue is solved. I just upgraded a Bitbucket Server instance from 4.5.2 to 4.9.1, and the elasticsearch settings aren't copied over... Elasticsearch was still listening at 9200, with no buckler configuration available.

            Brent P added a comment -

            ccurti, fkraemer, jethomas - cszmajda spent a few hours trying to reproduce this and was unable to. If you guys see this again can you please provide the <Bitbucket Installation directory>/.install4j/installation.log file (I hear, Caterina added that to the issue description - thanks).

            Brent P added a comment - ccurti , fkraemer , jethomas - cszmajda spent a few hours trying to reproduce this and was unable to. If you guys see this again can you please provide the <Bitbucket Installation directory>/.install4j/installation.log file (I hear, Caterina added that to the issue description - thanks).

              cszmajda Cristan Szmajda (Inactive)
              jethomas Jeff Thomas
              Affected customers:
              1 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: