Bug 399346

Summary: Can not start Akonadi
Product: [KDE Neon] neon Reporter: Patrice Grundmann <patrice.grundmann>
Component: Packages User EditionAssignee: Neon Bugs <neon-bugs>
Severity: critical CC: dvratil, jr, neon-bugs, rikmills, sitter, sknauss, tonal.promsoft
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Akonadi selftest report

Description Patrice Grundmann 2018-10-03 17:24:36 UTC
Created attachment 115390 [details]
Akonadi selftest report


1. in a fresh installation of KDE Neon, I have apt install Kontact


— A error windows appear, here is the log joined
— I have try a : akonadictl start but I have a error (commande line result joined)


$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

FATAL ERROR: Could not find my_print_defaults

The following directories were searched:


If you compiled from source, you need to either run 'make install' to
copy the software into the correct location ready for operation.
If you don't want to do a full install, you can use the --srcddir
option to only install the mysql database and privilege tables

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

The latest information about mysql_install_db is available at
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/patrice/.local/share/akonadi/mysql.conf", "--datadir=/home/patrice/.local/share/akonadi/db_data/", "--socket=/tmp/akonadi-patrice.21Y4l2/mysql.socket", "--pid-file=/tmp/akonadi-patrice.21Y4l2/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: "2018-10-03 11:25:50 139824482577536 [Note] /usr/sbin/mysqld (mysqld 10.1.34-MariaDB-0ubuntu0.18.04.1) starting as process 3306 ...\n2018-10-03 11:25:50 139824482577536 [Warning] Can't create test file /home/patrice/.local/share/akonadi/db_data/neon.lower-test\n\x07/usr/sbin/mysqld: Can't change dir to '/home/patrice/.local/share/akonadi/db_data/' (Errcode: 2 \"No such file or directory\")\n2018-10-03 11:25:50 139824482577536 [ERROR] Aborting\n\n"
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadicontrol: Application 'akonadiserver' exited normally...

(available in About System)
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50
Qt Version: 5.11.1

Comment 1 Rik Mills 2018-10-12 19:04:22 UTC
I can reproduce this on Neon 18.04 user edition on a fresh install, and using Kubuntu CI builds of apps/akonadi stable 18.08 branch.

(1) I am not sure it was intentional for Neon to switch to mariadb. This may be a result of the packaging for the mysql backend having:

Depends: libqt5sql5-mysql,
         mysql-client-core-5.6 | virtual-mysql-client-core,
         mysql-server-core-5.6 | virtual-mysql-server-core,

whereas mysql 5.6 package do not exist in Bionic (5.7 is there) so mariadb gets pulled in instead.

(2) This looks very similar to https://bugs.kde.org/show_bug.cgi?id=392948 which was supposedly fixed.

I would note that the same result and workaround

mkdir -p ~/.local/share/akonadi/db_data/

before starting akonadi for the 1st time, works with both mariadb on Neon and mysql on Kubuntu.
Comment 2 Rik Mills 2018-10-12 19:22:44 UTC
Testing with Kubuntu 18.01 daily iso with akonadi 18.04.3, and all starts ok.
Comment 3 Rik Mills 2018-10-12 19:23:18 UTC
(In reply to Rik Mills from comment #2)
> Testing with Kubuntu 18.01 daily iso with akonadi 18.04.3, and all starts ok.

Should read Cosmic 18.10.
Comment 4 Rik Mills 2018-10-12 22:13:43 UTC
Correction. Akonadi 18.04.3 on Cosmic 18.10 fails to start also, using mysql 5.7


18.08.1 also fails to start on debian unstable with mariadb in a similar manner.
Comment 5 Rik Mills 2018-10-13 07:10:38 UTC
Now also reported in Debian (Cheers Ian)

Comment 6 Daniel Vrátil 2018-11-01 16:33:38 UTC
Can you please test with Akonadi 18.08? The issue should be fixed there.

Comment 7 Sandro Knauß 2018-11-01 18:11:27 UTC
A working workaround is to install mariadb-server than my_print_defaults gets installed. But this doesn't feel like a good solution, we should better make sure that my_print_defaults gets to mariadb-server-core.
Comment 8 Sandro Knauß 2018-11-01 18:32:01 UTC
Additionally I needed to replace:

   rm /usr/sbin/mysqld-akonadi
   ln -s /usr/sbin/mysqld /usr/sbin/mysqld-akonadi

still an issue for 18.08.1. @dvratil so you check does not help here, because we need my_print_defaults in both cases.
Comment 9 Jonathan Riddell 2018-11-01 19:12:20 UTC
I can recreate this using KDE neon user edition ISO from today, the ISO image  must be installed (not live) to get the problem
Comment 10 Jonathan Riddell 2018-11-01 20:16:45 UTC
For now I've added in this more permissive change to apparmour permissions from kubuntu which seems to stop the first-run error
Switching to a symlink as suggested by Sandro may make more sense.
I'm unclear what this stuff about mariadb is about.
Comment 11 Jonathan Riddell 2018-11-02 16:07:00 UTC
the apparmour update has now been deployed and testing on virtualbox and docker with new installs kontact runs fine
Comment 12 Christoph Feck 2018-11-07 23:29:01 UTC
Can this closed?