Start a conversation

Fixing Corrupt .journal.db with SQLite Error

Overview

You are seeing SQLiteDB errors in the Error log such as the following, and your users may report issues sending or receiving emails with the following error appearing within the Message Queue: "4.3.0 Internal Server Error: Cannot write to Mailbox":

  • SQLiteDbWriteCache.h: [Mail Path]/[Domain]/[Username]/.journal.db: runVacuum - SQLite error: code 11, error SQLITE_CORRUPT[11]: database disk image is malformed
  • SQLiteDb.cpp: journal corruption detected - cannot remove journal '[Mail Path]/[Domain]/[User]/.journal.db' (file is used by another process)
  • SQLiteDb.cpp: SQLiteDb::open() - SQLite error: file [Mail Path]/[Domain]/[User]/.journal.db, code 14, error SQLITE_CANTOPEN[14]: unable to open database file

 

Solution

This result code indicates that the database file .journal.db is corrupt. The database becomes corrupt when a rogue process opens a database file or journal and writes malformed data into the middle of it. This corruption can prevent the affected user's ability to send and receive emails in some situations, requiring a rebuild of the concerned .journal.db files.

  1. Stop Kerio Connect.

  2. Open a File Explorer.

  3. Navigate to the Kerio Store folder. The default paths for various Operating Systems are listed below:

    • Windows: C:\Program Files\Kerio\MailServer\Store\Mail

    • Mac: /usr/local/kerio/mailserver/store/mail

    • Linux: /opt/kerio/mailserver/store/mail

  4. Open the affected user folder (i.e. [domain.com]/[username])
  5. Delete the file .journal.db.

    113.png

  6. Start Kerio Connect.

 

Testing

The file .journal.db rebuilds itself, usually instantly, but sometimes it can take a while. The rebuilding of this file should not affect the users' ability to use their email accounts.

Once all impacted journals are rebuilt, the message queue should begin processing, and the error string should no longer appear in the error log.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments