Bug 399346 - Can not start Akonadi
Summary: Can not start Akonadi
Status: RESOLVED DOWNSTREAM
Alias: None
Product: neon
Classification: Unclassified
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Neon Packages Linux
: NOR critical
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-03 17:24 UTC by Patrice Grundmann
Modified: 2019-12-11 05:30 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Akonadi selftest report (11.69 KB, text/plain)
2018-10-03 17:24 UTC, Patrice Grundmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrice Grundmann 2018-10-03 17:24:36 UTC
Created attachment 115390 [details]
Akonadi selftest report

SUMMARY


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


OBSERVED RESULT

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

EXPECTED RESULT

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

FATAL ERROR: Could not find my_print_defaults

The following directories were searched:

    /usr/bin
    /usr/extra

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
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
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...


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

ADDITIONAL INFORMATION
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

https://bugs.launchpad.net/ubuntu/+source/akonadi/+bug/1797643

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)

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910902
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.


https://cgit.kde.org/akonadi.git/commit/src/server/storage/dbconfigmysql.cpp?id=a3d9f7647bf36a35deb996516ebd84f88976f013
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
https://launchpadlibrarian.net/393075010/akonadi_4%3A18.04.3-0ubuntu1_4%3A18.04.3-0ubuntu2.diff.gz
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?