H2 Database Corruption - File corrupted while reading record

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

本記事で説明している手順は、現時点でのものとなります。そのため、一部のお客様で特定の状況下で動作したという報告がありますが、正式にサポートされているわけではなく、お客様の特定のシナリオで動作することを保証するものではありません。

本番環境での実施の前に一通り非本番環境で検証し、成功しなかった場合にはサポートされている代替案にフォール バックしてください。

また、アトラシアン サポートのサポート対象外のご質問の場合には、Community もご活用ください。

要約

After restarting Bamboo, it fails to start with a "File corrupted while reading record: null" error.

環境

Any supported version of Bamboo (observed in Bamboo 7.2.6).

診断

The following error is found on atlassian-bamboo.log file: 

ERROR [BootstrapUpgradeHelper] Error getting database connection
org.hibernate.HibernateException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: File corrupted while reading record: null. Possible solution: use the recovery tool [90030-199]

原因

The error indicates that a database corruption has occurred in the H2 database. This can happen for different reasons such as disk space limitations or an abrupt server shutdown.

ソリューション

Bamboo ships with a built-in H2 database, which is intended for evaluation purposes but is somewhat susceptible to data loss during system crashes. For production environments, the H2 database is not supported and we recommend that you connect Bamboo to an external database.

To resolve the database corruption issue, you can use the H2 Recover Tool to recover data from the H2 database file. The Recover tool will try to recover the corrupted data, but if the database is completely corrupted, the process of recovering the data might not be completed. In case the recovery tool fails to restore the H2 database data, the recommended path to restore the data would be to restore the entire <bamboo-home>  folder from a backup.

H2 Recovery Tool

To run the Recovery Tool you should use the following command, replacing <BAMBOO_INSTALL> with your Bamboo's install folder path:

java -cp <Bamboo-Install>/lib/h2*.jar org.h2.tools.Recover

Please note that the H2 Database is not supported by Atlassian.

最終更新日: 2024 年 1 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.