2

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).

4

Solution

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


Explaination

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.

  • 2
    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

protected by Community Feb 21 at 10:28

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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