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

While using bundled OpenSearch with Java 17 warnings are displayed on terminal after starting Bitbucket using startup scripts

XMLWordPrintable

      Issue Summary

      While starting Bitbucket using start-bitbucket.sh using Java 17 some warnings are displayed right after and the terminal is not available unless we cancel the operation (Ctrl+C) or press Enter.

      No harm to Bitbucket or OpenSearch with this, only noise after the startup script is run.

      This is reproducible on the Data Center: Yes

      Steps to Reproduce

      1. While on Bitbucket 8.80 or later using Java 17
      2. Starts Bitbucket using start-bitbucket.sh script (not observed when running Bitbucket as a service and starting with systemctl)
      3. Warnings are displayed and the terminal not available

      Expected Results

      Expected results when running Bitbucket 8.18 with Java 17 (tested on Bitbucket 8.18 with Java 11 so the results below are from that occasion):

      ubuntu@ip-10-224-219-115:/opt/atlassian/bitbucket/atlassian-bitbucket-8.18.0/bin$
      openjdk 11.0.18 2023-01-17
      OpenJDK Runtime Environment Temurin-11.0.18+10 (build 11.0.18+10)
      OpenJDK 64-Bit Server VM Temurin-11.0.18+10 (build 11.0.18+10, mixed mode)
      
      ubuntu@ip-10-224-219-115:/opt/atlassian/bitbucket/atlassian-bitbucket-8.18.0/bin$ sudo -u atlbitbucket ./start-bitbucket.sh 
      Starting Atlassian Bitbucket as the current user
      
      Starting the bundled search server
      	Hint: Run start-bitbucket.sh --no-search to skip starting the bundled search server
      Bundled search server started successfully
      
      Bitbucket is being run with a umask that contains potentially unsafe settings.
      The following issues were found with the mask "u=rwx,g=rwx,o=rx" (0002):
       - Access is allowed to 'others'. It is recommended that 'others' be denied
        all access for security reasons.
       - Write access is allowed to 'group'. It is recommend that 'group' be
        denied write access. Read access to a restricted group is recommended
        to allow access to the logs.
      The recommended umask for Bitbucket is "u=,g=w,o=rwx" (0027) and can be
      configured in _start-webapp.sh
      
      The current open files limit is set to less than 6192
      Attempting to increase limit...
      	Limit increased to 6192 open files
      
      Starting Bitbucket webapp at http://localhost:7990
      The Bitbucket webapp has been started.
      
      If you cannot access Bitbucket within 3 minutes, or encounter other issues, check the troubleshooting guide at:
      https://go.atlassian.com/bbs-troubleshooting-installations
      ubuntu@ip-10-224-219-115:/opt/atlassian/bitbucket/atlassian-bitbucket-8.18.0/bin$
      

      Actual Results

      Actual result when running Bitbucket 8.9 or 8.18 with Java 17:

      bitbucket@e2996555ede2:/opt/atlassian/bitbucket/bin$ java --version
      openjdk 17.0.10 2024-01-16
      OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7)
      OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing)
      
      bitbucket@e2996555ede2:/opt/atlassian/bitbucket/bin$ ./start-bitbucket.sh
      ...
      Starting Bitbucket webapp at http://localhost:7990
      The Bitbucket webapp has been started.
      If you cannot access Bitbucket within 3 minutes, or encounter other issues, check the troubleshooting guide at:
      https://go.atlassian.com/bbs-troubleshooting-installations
      WARNING: A terminally deprecated method in java.lang.System has been called
      WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.OpenSearch (file:/opt/atlassian/bitbucket/opensearch/lib/opensearch-1.3.14.jar)
      WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.OpenSearch
      WARNING: System::setSecurityManager will be removed in a future release
      
      bitbucket@e2996555ede2:/opt/atlassian/bitbucket/bin$ WARNING: A terminally deprecated method in java.lang.System has been called
      WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.OpenSearch (file:/opt/atlassian/bitbucket/opensearch/lib/opensearch-1.3.14.jar)
      WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.OpenSearch
      WARNING: System::setSecurityManager will be removed in a future release
      WARNING: A terminally deprecated method in java.lang.System has been called
      WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.Security (file:/opt/atlassian/bitbucket/opensearch/lib/opensearch-1.3.14.jar)
      WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.Security
      WARNING: System::setSecurityManager will be removed in a future release
      
      <press Ctrl+C or Enter to exit>
      
      bitbucket@e2996555ede2:/opt/atlassian/bitbucket/bin$
      

      According to OpenSearch's documentation, OpenSearch 1.3 that is bundled with Bitbucket does not support Java 17

      Workaround

      No workaround available while using Bitbucket's startup scripts.

              74d6667aa35c Josh Aguilar
              13a66df57723 Victor Menes
              Votes:
              10 Vote for this issue
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: