Akonadi doesn't start, crashes by start from console

After an update of my tumbleweed (I think on Tuesday) I got the above problem. I searched the web but no remedy of this often encountered problem worked. Any others with the same problem and ideas here?

Btw. I can’t log in to bugzilla, they always kick me out without any comment, changed password twice, no change … Why is there no link from here working with the credentials already entered?

In general, when anything KDE crashes, “DrKonqi” fires up and, you can enter a KDE Bug Report …

  • With “coredumpctl list” you should get a list of the most recent Core Dumps – including those from KDE …

After attempting “akonadictl start”, any errors should be written to ‘~/.local/share/sddm/xorg-session.log’ or, the Wayland session log if you’re not using X11 …
Also, take a look in ‘~/.local/share/akonadi/’ and ‘~/.local/share/akonadi/db_data/’ – the “err” files locate there may indicate the reason for the issue you’re experiencing.

Does Akonadi start OK with another, new, fresh, (Test), user?

Do you mean <https://bugzilla.opensuse.org/&gt;?

  • You should be able to login with the username and password you use for this Forum.
  • Did you attempt to login into the SUSE
    (.com) Bugzilla? – <https://bugzilla.suse.com/&gt;*=2]If you attempted to access that Bugzilla, you’ll first need to sign up for a SUSE Services Contract …

Sorry to answer only now. Idiotically I somehow opened a new thread (https://forums.opensuse.org/showthread.php/553537-Akonadi-server-trouble-Kontact-crashing-on-startup) with this problem and didn’t realize that here is an answer as well, my apologies. The problem is not solved until even now.

Dr. Konqi came and collected for quite some time data. But it is not clear (at least to me) whether it sent them.

I didn’t know coredumpctl, nice. Last several coredump messages are


Thu 2021-05-06 13:57:24 CEST   3610  1000   100  11 truncated /usr/sbin/mariadbd[FONT=arial]

that was just a minute earlier but I didn’t start Kontact at all…

[/FONT]“~/.local/share/sddm/xorg-session.log” has no errors. But. “akonadictl status” results in “stopped” the ensuing “akonadictl start” gets “already running”. Hmm.

The err-file in ~/.local/share/akonadi/ has a long list with [CRITICAL], starting with:
[CRITICAL] org.kde.pim.akonadiserver: DB error: “Lost connection to MySQL server during query”
and lots of “cannot connect to database”. Currently more lines are added it is hard to read ;).

‘~/.local/share/akonadi/db_data/’ is also full of errors starting with “Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files”. It is quite long but I could upload it to pastebin if that helps.

Uuups, the first one. Works now. shrug

Then, the Akonadi database is corrupt …

Bottom line –

  • If the Akonadi database becomes corrupt, it can’t be repaired …
  • Delete it and start with a fresh database and, configuration – everything related to Akonadi and Kontact in ‘~/.config/’ …
  • If you haven’t been regularly archiving everything in Kontact, there is a chance that, you’ll lose some local e-Mail, some local Appointments, some local Tasks, some local Notes and, some local Addresses …
  • If you’ve been using IMAP for the e-Mails and network services such as LDAP and Kolab then, nothing should have been lost …

I did that already, I think, that is to say I removed ‘~/.local/share/akonadi/db_data/’ and even ‘~/.local/share/akonadi/’ but the calendar stay lost.

The corruption must be lodged deeper in the akonadi data structures. Well, I found a solution in a way. To make a long story short, I restored ~/.local/share/akonadi (about 1.4 GB) from a backup. Regrettably it took about 10 days to understand the situation an to come to this solution / workaround. The density of my backups thins with time, so I lost about 12 days of calendar entries and had to reorganize my sent mail folder. But I’m back in business, thank god. I wish I understood the true cause, though.

Thank you for your help :).

Well, seems Akonadi is doing the corruption itself. The “new” data out of the backups ran out of luck, Akonadi is crashing again. Seems I am forced to thunderbird…

As User:

akonadictl stop
akonadictl start

And post all from the terminal.

Okay, here it comes:

me@PC:~> akonadictl stop 
Akonadi is not running. 
me@PC:~> akonadictl start

The following errors occurred with your submission 	


  - The text that you have entered is too long (35333 characters). Please shorten it to 15000 characters long.


 
Ahm, yes. I'll post it to pastebin:

https://paste.opensuse.org/44839712

I just hope you can make sense of it :).

OK, but Leap 15.2 –


 > l ~/.local/share/akonadi/
insgesamt 20
drwxr-xr-x   7 xxx users  189 14. Mai 14:43 ./
drwx------  86 xxx users 4096 12. Mai 13:03 ../
-rw-r--r--   1 xxx users  140 14. Mai 14:43 Akonadi.error
-rw-r--r--   1 xxx users  140 14. Mai 14:43 Akonadi.error.old
drwxr-xr-x   6 xxx users  273 14. Mai 14:43 db_data/
drwxr-xr-x   2 xxx users    6 27. Nov 10:26 db_misc/
drwxr-xr-x 102 xxx users 4096 29. Nov 17:46 file_db_data/
drwxr-xr-x   2 xxx users    6 29. Apr 19:19 file_lost+found/
-rw-r--r--   1 xxx users 3423 27. Nov 10:26 mysql.conf
drwxr-xr-x   8 xxx users  105 27. Nov 10:26 search_db/
lrwxrwxrwx   1 xxx users   22 14. Mai 14:43 socket-yyy-default -> /run/user/1000/akonadi/
 > 
 > akonadictl status
Akonadi Control: stopped
Akonadi Server: stopped
Akonadi Server Search Support: available (Remote Search, Akonadi Search Plugin)
Available Agent Types: akonadi_akonotes_resource, akonadi_archivemail_agent, akonadi_birthdays_resource, akonadi_contacts_resource, akonadi_davgroupware_resource, akonadi_ews_resource, akonadi_ewsmta_resource, akonadi_followupreminder_agent, akonadi_googlecalendar_resource, akonadi_googlecontacts_resource, akonadi_ical_resource, akonadi_icaldir_resource, akonadi_imap_resource, akonadi_indexing_agent, akonadi_kalarm_dir_resource, akonadi_kalarm_resource, akonadi_knut_resource, akonadi_kolab_resource, akonadi_maildir_resource, akonadi_maildispatcher_agent, akonadi_mailfilter_agent, akonadi_mbox_resource, akonadi_migration_agent, akonadi_mixedmaildir_resource, akonadi_newmailnotifier_agent, akonadi_notes_agent, akonadi_notes_resource, akonadi_openxchange_resource, akonadi_pop3_resource, akonadi_sendlater_agent, akonadi_tomboynotes_resource, akonadi_unifiedmailbox_agent, akonadi_vcard_resource, akonadi_vcarddir_resource
 > akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
 > akonadi.collectionattributetable                   OK
akonadi.collectionmimetyperelation                 OK
akonadi.collectionpimitemrelation                  OK
akonadi.collectiontable                            OK
akonadi.flagtable                                  OK
akonadi.mimetypetable                              OK
akonadi.parttable                                  OK
akonadi.parttypetable                              OK
akonadi.pimitemflagrelation                        OK
akonadi.pimitemtable                               OK
akonadi.pimitemtagrelation                         OK
akonadi.relationtable                              OK
akonadi.relationtypetable                          OK
akonadi.resourcetable                              OK
akonadi.schemaversiontable                         OK
akonadi.tagattributetable                          OK
akonadi.tagremoteidresourcerelationtable           OK
akonadi.tagtable                                   OK
akonadi.tagtypetable                               OK
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QDBusConnection: name 'org.freedesktop.Akonadi.Control' had owner '' but we thought it was ':1.144'

 > 

Given the following trace content –


81. org.kde.pim.akonadiserver: Subscriber "" disconnected
147. org.kde.pim.akonadiserver:   DB error:  "Lost connection to MySQL server during query"
148. org.kde.pim.akonadiserver:   Error text: "Lost connection to MySQL server during query QMYSQL3: Der Befehl konnte nicht ausgeführt werden"
154. org.kde.pim.akonadicore: "QLocalSocket: Die Verbindung wurde von der Gegenseite geschlossen" "/run/user/1000/akonadi/akonadiserver-cmd.socket"

are you certain that, there’s a link in ‘~/.local/share/akonadi/’ named “socket-«hostname»-default” pointing to ‘/run/user/1000/akonadi/’?

And, are certain that, ‘/run/user/1000/akonadi/’ contains the following? –


 > l ~/.local/share/akonadi/socket-yyy-default/
insgesamt 4
drwxr-xr-x 2 xxx users 120 14. Mai 18:58 ./
drwx------ 9 xxx users 320 14. Mai 18:57 ../
srwxr-xr-x 1 xxx users   0 14. Mai 18:58 akonadiserver-cmd.socket=
srwxr-xr-x 1 xxx users   0 14. Mai 18:58 akonadiserver-ntf.socket=
-rw-rw---- 1 xxx users   5 14. Mai 18:58 mysql.pid
srwxrwxrwx 1 xxx users   0 14. Mai 18:58 mysql.socket=
 > 

Just so there is no misunderstanding: I’m running tumbleweed (last “zypper dup” yesterday evening).

Yes, on my machine it is "socket-PC-default → /run/user/1000/akonadi"

Yes, see above.

Ahhh, no. It contains just one file: “mysql.pid” which contains 5 Bytes, in this case 6276. What do I do now?

Check that the Akonadi configuration is OK – the sockets have to be defined –


 > cat .config/akonadi/akonadiserverrc 
[Debug]
Tracer=null

%General]
Driver=QMYSQL

[QMYSQL]
Host=
Name=akonadi
Options="UNIX_SOCKET=/run/user/1000/akonadi/mysql.socket"
ServerPath=/usr/sbin/mysqld
StartServer=true
 > 
 > cat .config/akonadi/akonadiconnectionrc 
[DBUS]
Address="unix:path=/run/user/1000/bus"

[Data]
Method=UnixPath
UnixPath=/run/user/1000/akonadi/akonadiserver-cmd.socket

[Notifications]
Method=UnixPath
UnixPath=/run/user/1000/akonadi/akonadiserver-ntf.socket
 > 

It may well be that, AppArmor is the culprit – you may have to set the Akonadi Server to “complain” –

 # aa-complain /usr/bin/akonadiserver

Okay. “akonadiserverrc” is exactly like yours. “akonadiconnectionrc” didn’t exist. So I created it and copied your template verbatim into the new file. Akonadi still crashes.


me@PC:~> sudo aa-complain /usr/bin/akonadiserver 
Profil for /usr/bin/akonadiserver not found, will be skipped.
me@PC:~>

No joy either. When started from the console Akonadi gives four complaints during shutdown:


...
org.kde.pim.akonadicontrol: ProcessControl: Application "/usr/bin
/akonadi_akonotes_resource" stopped unexpectedly ( "Der Prozess ist abgestürzt" ) 
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadi_akonotes_resource' crashed. No restart!
...
[FONT=monospace]org.kde.pim.akonadicontrol: ProcessControl: Application "/usr/bin/akonadi_ical_resource" stopped unexpectedly ( "Der Prozess ist abgestürzt" ) 
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadi_ical_resource' crashed. No restart! 
org.kde.pim.akonadicontrol: ProcessControl: Application "/usr/bin/akonadi_ical_resource" stopped unexpectedly ( "Der Prozess ist abgestürzt" ) 
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadi_ical_resource' crashed. No restart!
[/FONT]...
[FONT=monospace][FONT=monospace]org.kde.pim.akonadicontrol: ProcessControl: Application "/usr/bin/akonadi_notes_agent" stopped unexpectedly ( "Der Prozess ist abgestürzt" ) 
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadi_notes_agent' crashed. No restart!
...
[/FONT][/FONT]

Is that of any significance or helpful?

What happens if, you set up a new, fresh, Test User and, set up Kontact from scratch?

  1. Start and set up KMail.
  2. Start and set up KOrganizer.
  3. Start and set up KAdressBook.
  4. Start and set up Akregator.
  5. Start Kontact.

This is weird. I set up that test-user and KMail and connected it to one of my mail providers. Mails in the inbox and other directories were there.

Then I started KOrganizer and imported one *.ics calendar file. That showed up as akonadi_ical_ressource in the left panel, not with the name I assigned it. And the entries of the right panel didn’t show up at all, i.e. the calendar of 1.2 MB showed as empty.

KAdressBook and Akregator ran normal.

When I started Kontact there were no mails anymore and the connection to my provider was gone, just its name was still there in the send panel of the setup.

Remove the entire PIM suite and reinstall? In case of which: how do I save my local data? Thanks for your help.

P.S.: I just ran the daily “sudo zypper dup” in the background. Lots and lots of PIM-rpms got updated. I’ll reboot and have a look.

No luck, Kontact is still crashing.

System and User are separated – there’s no user data in System …

  • Catch-22 with local User data – Kontact has to be up and running …

Places where local User data is stored –

  • KWallet – Folders: “imap”; “mailtransports”: “pop3” – problem: the passwords are stored in a folder named as a numeric identifier …
    *=2]Solution: store the ISP login information in the KWallet folder “Passwords” – sub-folder language specific “Passwords” »auf Deutsch „Passwörter”« …
    *=4]Or, maintain paper copies …
  • ‘~/.config/’
  • ‘~/.local/share/’

Okay, I do a regular backup on every boot. Since this is a home PC backup happens may even be several times per day. So the data will be preserved, it is just the trick of restoring them…

Do you know the zypper command to remove the PIM thoroughly and totally?

Yes, but, first, have you been obeying the Tumbleweed rule?

Rolling release means no updates, only urgent patches and upgrades


 # zypper dup
 # zypper dup --from packman-essentials --allow-vendor-change

[HR][/HR]Removing the KDE PIM –


 > rpm --query --recommends patterns-kde-kde_pim 
akregator
kaddressbook
kleopatra
kmail
knotes
kontact
korganizer
 > 

  • Remove the components and then, the pattern.

And then, you need to remove any parts of Akonadi which have not been removed by the KDE PIM components –

 > zypper search --installed-only akonadi

Yes, I do a (daily) “sudo zypper --verbose dup --allow-vendor-change --details”.

[FONT=arial]I’ll try the rest later, currently I’m a bit pressed for time. Thanks again for your input.

[/FONT]