Starting Bitbucket Server/Data Center after upgrade to 8.x fails due to sidecar issue with error UnsatisfiedDependencyException
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
After upgrading Bitbucket Server/DataCenter from a version < 8.x to any version >=8.x, it fails to start with below errors logged in the server log file.
1
2
2022-08-09 06:00:12,696 ERROR [spring-startup] c.a.s.i.s.g.m.DefaultSidecarManager Sidecar could not be started. (Exit code: 1)
2022-08-09 06:00:12,705 WARN [spring-startup] o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshHealthcheck' defined in URL [jar:file:/opt/atlassian/bitbucket/8.1.0/app/WEB-INF/lib/bitbucket-git-mesh-8.1.0.jar!/com/atlassian/stash/internal/scm/git/mesh/MeshHealthcheck.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshClient' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshClient' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to start Mesh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2022-08-09 06:00:13,051 ERROR [spring-startup] c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshHealthcheck' defined in URL [jar:file:/opt/atlassian/bitbucket/8.1.0/app/WEB-INF/lib/bitbucket-git-mesh-8.1.0.jar!/com/atlassian/stash/internal/scm/git/mesh/MeshHealthcheck.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshClient' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshClient' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to start Mesh
.
.
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshClient' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshClient' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to start Mesh
... 6 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to start Mesh
... 6 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to start Mesh
... 6 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to start Mesh
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160)
... 5 common frames omitted
Caused by: java.lang.IllegalStateException: Failed to start Mesh
at com.atlassian.stash.internal.scm.git.mesh.DefaultSidecarManager.startSidecar(DefaultSidecarManager.java:166)
at com.atlassian.stash.internal.scm.git.mesh.DefaultSidecarManager.start(DefaultSidecarManager.java:109)
... 5 common frames omitted
Environment
8.x.x
Diagnosis
Check if the user is starting Bitbucket 8.x for the first time on the server after the upgrade.
Look for the above mentioned error message in the log file.
Cause
Bitbucket 8.x (sidecar as well as mesh nodes) require a Git version equal or higher than 2.31.
Solution
Update git version on the server as per document Bitbucket - Supported Platform.
Was this helpful?