Starting Bitbucket with an unsupported git version fails without a clear error in the atlassian-bitbucket.log file

XMLWordPrintable

    • Severity 2 - Major

      Issue Summary

      Starting Bitbucket with an unsupported version of git does not print a useful error to atlassian-bitbucket.log. It is only printed to atlassian-mesh.log, whether the instance is configured to use Bitbucket Mesh or not. 

      This makes it very difficult for an admin to find the cause of Bitbucket failing to start, and can lengthen time to recovery during incidents if this occurs on production systems.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Start Bitbucket on a node with an unsupported version of Git (eg 2.38.1 at time of writing)
      2. Observe that Bitbucket does not start up
      3. View the atlassian-bitbucket.log and confirm you do not see any helpful errors messages regarding git version
      4. View the atlassian-mesh.log and confirm you see the error here
      5. Search all other Bitbucket log files and confirm that the error only appears in atlassian-mesh.log

      Expected Results

      The error message "You are using Git 2.38.1, which is not supported. Downgrade Git to a version between 2.31.0 and 2.38.0 and restart" should be logged to atlassian-bitbucket.log and not just atlassian-mesh.log.

      Actual Results

      You may see unrelated errors in the <local-home-directory>/bitbucket/log/atlassian-bitbucket.log file, eg:

      2022-12-12 19:42:14,679 ERROR [spring-startup]  c.a.s.i.s.g.m.DefaultSidecarManager Sidecar could not be started. (Exit code: 1)
      ...
      2022-12-12 19:42:14,798 ERROR [spring-startup]  c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started

      This error appears in the <local-home-sirectory>/bitbucket/mesh/log/atlassian-mesh.log file, whether you are intending to use Bitbucket Mesh or not:

      2022-12-12 19:42:14,371 WARN  [main] - o.s.c.a.AnnotationConfigApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationClientInterceptor' defined in com.atlassian.bitbucket.mesh.grpc.MeshGrpcWiring$AuthenticationWiring: Unsatisfied dependency expressed through method 'authenticationClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticator' defined in com.atlassian.bitbucket.mesh.grpc.MeshGrpcWiring$AuthenticationWiring: Unsatisfied dependency expressed through method 'authenticator' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationConfig' defined in com.atlassian.bitbucket.mesh.MeshCoreWiring: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.bitbucket.mesh.config.ApplicationConfig]: Factory method 'applicationConfig' threw exception; nested exception is java.lang.IllegalStateException: You are using Git 2.38.1, which is not supported. Downgrade Git to a version between 2.31.0 and 2.38.0 and restart.
      2022-12-12 19:42:14,439 ERROR [main] - o.s.boot.SpringApplication Application run failed
      org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationClientInterceptor' defined in com.atlassian.bitbucket.mesh.grpc.MeshGrpcWiring$AuthenticationWiring: Unsatisfied dependency expressed through method 'authenticationClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticator' defined in com.atlassian.bitbucket.mesh.grpc.MeshGrpcWiring$AuthenticationWiring: Unsatisfied dependency expressed through method 'authenticator' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationConfig' defined in com.atlassian.bitbucket.mesh.MeshCoreWiring: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.atlassian.bitbucket.mesh.config.ApplicationConfig]: Factory method 'applicationConfig' threw exception; nested exception is java.lang.IllegalStateException: You are using Git 2.38.1, which is not supported. Downgrade Git to a version between 2.31.0 and 2.38.0 and restart.

       

      Workaround

      There is no workaround for this issue

            Assignee:
            Unassigned
            Reporter:
            Denise Unterwurzacher [Atlassian] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: