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

Failure while importing repositories when running on Java 11

    XMLWordPrintable

Details

    Description

      Issue Summary

      Importing repositories from Bitbucket Cloud / Github fails on Bitbucket Server running on Java 11. Additionally, it causes abnormal CPU utilization on the server and queues up additional import requests.

      Environment

      Java 11 (Even the latest version, `11.0.3`)

      $java -version
      openjdk version "11.0.3" 2019-04-16
      OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
      OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)
      

      Steps to Reproduce

      1. Use Java 11 JRE to run bitbucket server (any version >= 6.0)
      2. Try to import a repository from github/bitbucket cloud

      Expected Results

      No errors are found in the server logs and the UI

      Actual Results

      In the server logs,

      2019-06-06 14:38:51,984 WARN  [http-nio-7990-exec-2] admin @1BEE1W4x878x6x0 ovgau 0:0:0:0:0:0:0:1 "POST /rest/importer/latest/external-source/owners HTTP/1.1" c.a.b.i.i.r.ExternalRepositoryResource Error making external request: Request to the external repository source failed with error: 'peer not authenticated'
      

      Attaching the screenshot of what happens on the UI.

      Additionally, subsequent import requests start getting queued on the server and they get timed out on the UI (504- Gateway error). Also, on the server side, cpu utilization goes to crazy high levels and never comes down till the app is restarted.

      Workaround

      1) Run Bitbucket Server with Java 8; or
      2) Run Bitbucket Server with Java 11.0.8 or later; or
      2) The issue is observed with Java 11 that uses TLS v3. Using TLS v2 works fine and doesn't cause this issue. This can be done by setting the following JVM parameter: -Dhttps.protocols=TLSv1.2 while starting bitbucket server up.

      Note

      This might also effect other functionalities of the app that use the HttpClient , most notably webhooks and some third party apps.

      Attachments

        Issue Links

          Activity

            People

              khughes@atlassian.com Kristy
              csubraveti Chandravadan
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: