Bug 482442 - After update to plasma 6, akonadi can't start because mysql configuration is missing/faulty
Summary: After update to plasma 6, akonadi can't start because mysql configuration is ...
Status: CONFIRMED
Alias: None
Product: neon
Classification: KDE Neon
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords: qt6
: 484574 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-05 06:59 UTC by Martin Tlustos
Modified: 2024-05-23 22:54 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Tlustos 2024-03-05 06:59:41 UTC
After updating to plasma 6, akonadi started fine, though with some problems (reported elsewhere). then I did a cleanup (remove unnecessary packages), and now akonadi won't start.
First error message:
martin@martin-aspirea51544g:~$ akonadictl start
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadictl:    done.
martin@martin-aspirea51544g:~$ Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Did not find MySQL server default configuration (mysql-global.conf)
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

Then I tried installing akonadi-backend-mysql (wasn't installed), and now the error changed to:
martin@martin-aspirea51544g:~$ akonadictl start
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadictl:    done.
martin@martin-aspirea51544g:~$ Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Failed to detect mysqld version!
org.kde.pim.akonadiserver: Could not start database server!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: QList("--defaults-file=/home/martin/.local/share/akonadi/mysql.conf", "--datadir=/home/martin/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: process error: "execve: Permission denied"
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

System info:
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-21-generic (64-bit)
Graphics Platform: Wayland
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 15,0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Acer
Product Name: Aspire A515-44G
System Version: V1.12
Comment 1 Joshua J. Kugler 2024-03-06 00:11:49 UTC
Similar problems. Fresh install. Installed kmail, had to manually install akonadi-backend-mysql. Akonadi still won't start.

$ akonadictl start
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadictl:    done.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Failed to detect mysqld version!
org.kde.pim.akonadiserver: Could not start database server!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld"
org.kde.pim.akonadiserver: arguments: QList("--defaults-file=/home/jkugler/.local/share/akonadi/mysql.conf", "--datadir=/home/jkugler/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: process error: "execve: Permission denied"
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

Tried sudo aa-complain /usr/bin/akonadiserver and got the error "ERROR: Include file /etc/apparmor.d/local/mariadbd_akonadi not found"

Currently stuck. :)
Comment 2 Joshua J. Kugler 2024-03-06 00:15:13 UTC
Seems this bug had a similar error (Permission denied): https://bugs.kde.org/show_bug.cgi?id=427618
Comment 3 Joshua J. Kugler 2024-03-06 00:53:47 UTC
In trying to invoke mysqld directly:

$ /usr/sbin/mysqld --defaults-file=/home/jkugler/.local/share/akonadi/mysql.conf --datadir=/home/jkugler/.local/share/akonadi/db_data/  --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid

MariaDB starts and runs without issue.
Comment 4 Joshua J. Kugler 2024-03-06 00:58:26 UTC
In /etc/apparmor.d/, I ran:

sudo aa-complain ./mariadbd_akonadi
sudo aa-complain ./mysqld_akonadi

Akonadi is up and running now.
Comment 5 Carlos De Maine 2024-03-06 01:00:02 UTC
have fixed a packaging error which should mean that all the apparmor files are installed.  building now but plasma 6.0.1 just started as well so could take a while - https://invent.kde.org/neon/kde/akonadi/-/commit/2ebb2156dda19bed3d0795d95fa24a78e32193b6
Comment 6 Carlos De Maine 2024-03-06 10:50:04 UTC
hhhmmm no.  that actually made it worse.  reverted.  investigating the nuances of dh_apparmor and why it isn't working correctly
Comment 7 Martin Tlustos 2024-03-25 08:38:17 UTC
Since an update some time ago, it started working again. If no one is against it, I would suggest closing this as fixed.
Comment 8 Christophe Marin 2024-03-27 08:14:46 UTC
*** Bug 484574 has been marked as a duplicate of this bug. ***
Comment 9 Achim Bohnet 2024-05-21 11:02:58 UTC
Same here:  Freshly installed neon user 20240614-1438 + all updates.   Copied my old $HOME to the new installation. Installed kmail, korganizer and akonadictl start fails with 'Failed to detect mysqld version!'

Touching missing files aa-complain  complains about does not help:


[0]master|root@op04lt:/etc/apparmor.d# aa-complain usr.bin.akonadiserver 

ERROR: Include file /etc/apparmor.d/local/mariadbd_akonadi not found
[1]master|root@op04lt:/etc/apparmor.d# touch /etc/apparmor.d/local/mariadbd_akonadi
[0]master|root@op04lt:/etc/apparmor.d# aa-complain usr.bin.akonadiserver 

ERROR: Include file /etc/apparmor.d/local/mysqld_akonadi not found
[1]master|root@op04lt:/etc/apparmor.d# ll /etc/apparmor.d/local/mysqld_akonadi
ls: cannot access '/etc/apparmor.d/local/mysqld_akonadi': No such file or directory
[2]master|root@op04lt:/etc/apparmor.d# touch /etc/apparmor.d/local/mysqld_akonadi
[0]master|root@op04lt:/etc/apparmor.d# aa-complain usr.bin.akonadiserver 
Setting /etc/apparmor.d/usr.bin.akonadiserver to complain mode.
Comment 10 Achim Bohnet 2024-05-21 11:09:22 UTC
After touching the 2 missing files aa-complained about + 

   systemctl reload apparmor.service

Now **akonadictl start** works :-)