JIRA throws SQLException with Table is read only errno 165 when starting

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

Problem

After starting JIRA the following error is displayed when attempting to access the application:

(Auto-migrated image: description temporarily unavailable)

The following appears in the atlassian-jira.log

1 2015-06-08 14:53:14,682 localhost-startStop-1 ERROR [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event '[com.atlassian.plugin.event.events.PluginEnabledEvent@59cad9e6, SingleParameterMethodListenerInvoker{method=public void com.atlassian.webhooks.plugin.WebHookEventsProcessor.onEvent(java.lang.Object), listener=com.atlassian.webhooks.plugin.WebHookEventsProcessor@2fffef24}]' from the invoker 'java.lang.RuntimeException: Generic Entity Exception occurred in deleteByAnd (SQL Exception while executing the following:DELETE FROM propertytext WHERE ID=? (Can't lock file (errno: 165 "Table is read only")))'

Diagnosis

Environment

  • JIRA is connected to a MySQL database server

Diagnostic Steps

  • Any specific steps necessary to reproduce the issue that will ensure that the customer is actually experiencing the same problem as the one that that is being described.

  • Steps like these will often involve checking data using SQL SELECT queries to see if the application is in a particular state OR any checks to ensure that the customers environment is in a state that will bring about the described problem

This section is optional, especially if the problem is triggered regardless of the environment and diagnosis

Cause

Corrupted InnoDB tables due to unknown reasons.

Solution

Resolution

Edit the MySQL option file (eg. /etc/my.cnf) to include the innodb_force_recovery option.

ℹ️ See MySQL documentation for details on what values to use when setting this option: Forcing InnoDB Recovery

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.