Bitbucket Server server not allowing SSH connections after a database migration

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

Symptoms

The following appears in the atlassian-bitbucket.log:

1 2013-10-16 20:58:20,487 WARN [NioProcessor-4] net.java.ao.db.MySQLDatabaseProvider Error in schema creation: Can't create table '#sql-7f7_812c8' (errno: 13); attempting to roll back last partially generated table 2013-10-16 20:58:20,611 ERROR [NioProcessor-5] net.java.ao.sql Exception executing SQL update <ALTER TABLE AO_FB71B4_PUBLIC_KEY CHANGE COLUMN KEY_TEXT KEY_TEXT LONGTEXT NOT NULL> java.sql.SQLException: Can't create table '#sql-7f7_812c5' (errno: 13)

Diagnosis

Run the following query on your Bitbucket Server database to check whether the reported table AO_FB71B4_PUBLIC_KEY is present in it:

1 show tables;

Cause

Bitbucket Server is unable to create the 'AO_FB71B4_PUBLIC_KEY' table, though as per the list of tables in your database, this table is already present and hence the process failing when it tries to create it again.

Solution

Workaround

To help workaround this, you can drop this table from the database. Ensure that Bitbucket Server is shut down and that you have a complete database backup prior to attempting this. The table will be automatically recreated when you restart Bitbucket Server:

1 drop table AO_FB71B4_PUBLIC_KEY;

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.