In looking for a good suite of mail/contacts/calendar .etc apps, I tried out KDE's Kontact and ran into the following issue upon starting pretty much any of the bundled applications (kmail, korganiser .etc). The application would display a loading screen like Image 1, and then it would display the error in Image 2, saying The Akonadi personal information management service is not operational. or something to that effect.

Image 1: loading...

Image 2: Error

Here is my system info as provided by screenfetch:

 OS: KDE neon 5.12
 Kernel: x86_64 Linux 4.13.0-45-generic
 Uptime: 4h 37m
 Packages: 2060
 Shell: bash 4.3.48
 Resolution: 1280x800
 DE: KDE 5.47.0 / Plasma 5.13.1
 WM: KWin
 GTK Theme: Breeze [GTK2/3]
 Icon Theme: breeze
 Font: Noto Sans Regular
 CPU: Intel Core2 Duo P8700 @ 2x 2.534GHz [36.0°C]
 GPU: intel
 RAM: 1802MiB / 2946MiB

I have already tried uninstalling (and reinstalling) the Kontact suite (both with and without the --purge argument to apt and for some reason the "Details" button provided on the error screen appears to do nothing when i click on it.

I had already saved the selftest report file to my desktop and then subsequently forgot it was there (redactions mine).

  • Posting this as a comment since I do not have enough reputation points to post it as a separate answer. I encountered similar error while starting the knotes application in Debian 10 (Buster). I was able to solve it by installing the akonadi-backend-mysql package. – Kamaraju Kusumanchi Sep 19 at 17:30


The error logs show that the akonadi verion of the mysql server that these K* applications require is trying to access ~/.local/share/akonadi/db_data/ except db_data doesn't exist, so it throws an error much like touch ~/nonexistent_dir/file.txt would.

To solve, simply run the below commands. cd ~/.local/share/akonadi/; mkdir db_data


After doing a lot of digging around on the internet (there was a decent amount of information but most of it was incomplete/unsolved forum threads about similar but not identical issues with Akonadi) I was able to find this general summary of Akonadi from KDE which was an excellent kickstart into my own investigating.

After playing around with the commands mentioned in the link, I got the following output (redactions mine):

$ akonadictl start
$ Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
mysqld: [ERROR] Could not open required defaults file: /home/[my username]/.config/akonadi/
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/[my username]/.local/share/akonadi/mysql.conf", "--datadir=/home/[my username]/.local/share/akonadi/db_data/", "--socket=/tmp/akonadi-[my username].UXCgLp/mysql.socket", "--pid-file=/tmp/akonadi-[my username].UXCgLp/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: "mysqld: Can't change dir to '/home/[my username]/.local/share/akonadi/db_data/' (Errcode: 2 - No such file or directory)\n2018-06-21T19:34:18.989616Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.\n2018-06-21T19:34:18.989703Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).\n2018-06-21T19:34:18.991172Z 0 [Warning] Can't create test file /home/[my username]/.local/share/akonadi/db_data/[my hostname].lower-test\n2018-06-21T19:34:18.992274Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22-0ubuntu0.16.04.1) starting as process 11859 ...\n2018-06-21T19:34:19.006500Z 0 [Warning] Can't create test file /home/[my username]/.local/share/akonadi/db_data/[my hostname].lower-test\n2018-06-21T19:34:19.006549Z 0 [Warning] Can't create test file /home/[my username]/.local/share/akonadi/db_data/[my hostname].lower-test\n2018-06-21T19:34:19.006623Z 0 [ERROR] failed to set datadir to /home/[my username]/.local/share/akonadi/db_data/\n2018-06-21T19:34:19.006632Z 0 [ERROR] Aborting\n\n2018-06-21T19:34:19.006658Z 0 [Note] Binlog end\n2018-06-21T19:34:19.006726Z 0 [Note] /usr/sbin/mysqld: Shutdown complete\n\n"
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/akonadi-[my username].UXCgLp/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/tmp/akonadi-[my username].UXCgLp/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadicontrol: Application 'akonadiserver' exited normally...

This produces a couple interesting lines. The problematic one being org.kde.pim.akonadiserver: stderr: "mysqld: Can't change dir to '/home/[my username]/.local/share/akonadi/db_data/' (Errcode: 2 - No such file or directory). To me this looked like the program was trying to write to a directory to which it didn't have access and was throwing an error, much like touch ~/nonexistent_dir/file.txt would.

So I ran cd ~/.local/share/akonadi/; mkdir db_data and retried it. Bam it worked.

| improve this answer | |
  • 3
    Note: if this doesn't work for you, try uninstalling the akonadi-server package from the command line and deleting ~/.config/akonadi/ and ~/.local/share/akonadi/ before reinstalling akonadi-server and its dependent packages (akonadi-server kdepim-runtime kmail knotes kontact korganizer). – DeveloperACE Jun 21 '18 at 20:13
  • also, it turns out that i had already saved the error log from the "details button in the error message" to my desktop, so here it is: pastebin.com/P54Aeh3q. it shows the same error that i fixed under the "test 15" section of the file – DeveloperACE Jun 21 '18 at 20:19

Similar problem, different solution. Mine was diagnosed as such:

$ akonadictl --verbose start                                      
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld-akonadi" "--defaults-file=/home/dargaud/.local/share/akonadi/mysql.conf --datadir=/home/dargaud/.local/share/akonadi/db_data/ --socket=/run/user/10705/akonadi/mysql.socket --pid-file=/run/user/10705/akonadi/mysql.pid"
org.kde.pim.akonadiserver: database server stopped unexpectedly

$ tail /var/log/syslog                      
audit: type=1400 audit(1593423663.888:404): apparmor="DENIED" operation="mknod" profile="/usr/sbin/mysqld" name="/home/dargaud/.local/share/akonadi/db_data/mysqld_tmp_file_case_insensitive_test.lower-test" pid=156675 comm="mysqld-akonadi" requested_mask="c" denied_mask="c" fsuid=10705 ouid=10705

Solution, adding the following two lines to the apparmor config file for mysqld:

$ sudo nano /etc/apparmor.d/usr.sbin.mysqld
/{,var/}run/user/[0-9]*/akonadi/** rw,
/home/*/.local/share/akonadi/** rwk,

Followed by:

$ sudo systemctl restart apparmor.service
$ akonadictl --verbose start 
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.