Confluence Logs Full of "Can't find file" Errors When Using MySQL
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
Symptoms
There is excessive logging similar to the below in atlassian-confluence.log
:
1
2
3
2013-07-22 21:08:57,103 ERROR [TP-Processor15] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event 'com.atlassian.mywork.host.event.BeforeCountNewNotificationsEvent@6faf7473' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.mywork.host.service.ClientServiceImpl.verifyAuth(com.atlassian.mywork.host.event.BeforeCountNewNotificationsEvent), listener=com.atlassian.mywork.host.service.ClientServiceImpl@6e4ddf84}'.
-- referer: BASE_URL/dosearchsite.action?queryString=somesearch | url: /rest/mywork/latest/status/notification/count | userName: username
java.lang.RuntimeException: java.sql.SQLException: Can't find file: './DATABASE/TABLE.frm' (errno: 20)
There may be missing data, or some functionality not working as a result.
Cause
The underlying file used to store a table has gone missing from the filesystem. This could happen due to external factors from Confluence only.
Resolution
Revert to the most recent backup that included this table correctly
If that's not possible, then you can:
Take note of the table name from the log entry. In the example above it's "TABLE"
Create an empty test instance of Confluence on exactly the same version
Execute the following SQL to get the command to create the table:
1
SHOW CREATE TABLE <TABLE>;
Stop production Confluence and back up the database
Execute the CREATE statement discovered from the test instance
Start Confluence
ℹ️ If using the test server workaround, note that any data from that table is lost.
Was this helpful?