Bitbucket Server is returning 503 Service Unavailable error after AWS RDS MySQL Server upgraded from 5.6.51 to 5.7.38

Bitbucket Data Center と Server の管理

このページの内容

お困りですか?

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

コミュニティに質問


プラットフォームについて: 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 は除く

要約

After AWS RDS MySQL Server upgraded from 5.6.51 to 5.7.38, Bitbucket is not coming up and Browser is showing a 503 Service Unavailable error.

環境

Bitbucket - 6.10.17
MySQL - 5.7.38

診断

The following error messages appears in the atlassian-bitbucket.log.

2022-10-18 04:36:41,253 ERROR [spring-startup]  com.zaxxer.hikari.pool.HikariPool bitbucket - Exception during pool initialization.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2115)
Caused by: java.sql.SQLException: Unknown system variable 'storage_engine'
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2497)
	at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1540)

原因

MySQL 5.7.x uses InnoDB by default, and has removed the storage_engine system variable. Having this variable in the jdbc connection string for MYSQL database in bitbucket.properties file under <Bitbucket-Home>/shared directory causes Bitbucket to fail while starting.

ソリューション

To overcome this issue, below steps can be followed:

1. Stop the Bitbucket.
2. Edit the bitbucket.properties file.
3. Replace "storage_engine" string with "default_storage_engine" in the jdbc connection string for database available under bitbucket.properties file.
4. Bring up the Bitbucket.

Note: Before following above steps, please take the Backup of an existing bitbucket.properties file.

最終更新日: 2023 年 2 月 15 日

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

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