Bitbucket Mesh Sidecar H2 database migration

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

When accessing a repository via the web user interface an error occurs saying "Repository not available - offline. The repository will be available once the Bitbucket Mesh node is online".

Environment

Bitbucket Server or Data Center version 8 or newer, which Mesh Sidecar enabled.

Diagnosis

The <Bitbucket home>/log/atlassian-bitbucket.log will show an error such as the following:

2024-01-09 15:45:41,940 WARN  [mesh-sidecar-monitor:thread-1]  c.a.s.i.s.g.m.DefaultSidecarManager Sidecar has not fully started after 5609ms. Bitbucket will continue starting. More details may be available in the Mesh logs
2024-01-09 15:45:41,941 WARN  [mesh-sidecar-monitor:thread-1]  c.a.s.i.s.g.m.DefaultSidecarManager atlassian-mesh.log: WARN  [main] - o.s.c.a.AnnotationConfigApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseValidator' defined in com.atlassian.bitbucket.mesh.MeshDatabaseWiring: Invocation of init method failed; nested exception is com.atlassian.bitbucket.mesh.UnsupportedH2StoreException: The storage format for the internal database that you are using has changed and requires manual migration.
2024-01-09 15:45:41,941 ERROR [mesh-sidecar-monitor:thread-1]  c.a.s.i.s.g.m.DefaultSidecarManager atlassian-mesh.log: ERROR [main] - o.s.b.d.LoggingFailureAnalysisReporter 

***************************
APPLICATION FAILED TO START
***************************

Description:

The storage format for the internal database that you are using has changed and requires manual migration.

Action:

Please perform the manual migration of the database. See https://confluence.atlassian.com/bitbucketserver088/migrate-h2-database-1216583295.html.

Cause

The Mesh Sidecar process unable to come up due to H2 database is not migrated. Even if Mesh has not been enabled, Bitbucket Server uses the local Mesh Sidecar process to handle requests that require interaction with git processes.

Solution

  1. Manually perform the H2 database migration as per Migrate H2 database
    OR
  2. Let Bitbucket rebuild the H2 database during the startup:
    1. Stop Bitbucket service and ensure that there are no other Java processes running, you can use the following command: 

      ps -ef | grep java
    2. Rename the following files if they exist (append .bac into the filename):
      1. <Bitbucket home>/mesh/mesh.mv.db 
      2. <Bitbucket home>/mesh/mesh.trace.db 
    3. Start Bitbucket service.


Last modified on Jan 10, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.