Akonade server dieing

For the last two upgrader (zypper dup) I’ve had an unusable Akonadi server. It just dies.
I tried to start it manually and I get this:


.
➜  ~ akonadictl start  


org.kde.pim.akonadiserver: Cannot connect to agent instance with identifier 'akonadi_ical_resource_1', error message: ''
org.kde.pim.akonadiserver: ItemRetrievalJob for request 0x7eff50089fc0 finished with error: "Unable to contact resource"
org.kde.pim.akonadiserver: Cannot connect to agent instance with identifier 'akonadi_ical_resource_1', error message: ''
org.kde.pim.akonadiserver: ItemRetrievalJob for request 0x7eff500c3e70 finished with error: "Unable to contact resource"
KCrash: Application 'akonadiserver' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi
org.kde.pim.akonadiserver: DATABASE ERROR:
org.kde.pim.akonadiserver:   Error code: "2013"
org.kde.pim.akonadiserver:   DB error:  "Lost connection to MySQL server during query"
org.kde.pim.akonadiserver:   Error text: "Lost connection to MySQL server during query QMYSQL3: Unable to execute statement"
org.kde.pim.akonadiserver:   Values: QMap((":0", QVariant(qlonglong, 280)))
org.kde.pim.akonadiserver:   Query: "SELECT PimItemTable.id, PimItemTable.remoteId, PimItemTable.mimeTypeId, PimItemTable.rev, PimItemTable.remoteRevision, PimItemTable.size, PimItemTable.datetime, PimItemTable.collectionId FROM PimItemTable WHERE ( PimItemTable.collectionId = :0 ) ORDER BY PimItemTable.id DESC"
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection ETMCalendar (0x5586f66e64f0) : Unable to list items
QSocketNotifier: Invalid socket 25 and type 'Write', disabling...
QSocketNotifier: Invalid socket 6 and type 'Read', disabling...
QSocketNotifier: Invalid socket 15 and type 'Read', disabling...
QSocketNotifier: Invalid socket 24 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
QSocketNotifier: Invalid socket 27 and type 'Read', disabling...
QSocketNotifier: Invalid socket 38 and type 'Read', disabling...
QSocketNotifier: Invalid socket 56 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
QSocketNotifier: Invalid socket 63 and type 'Read', disabling...
QSocketNotifier: Invalid socket 66 and type 'Read', disabling...
QSocketNotifier: Invalid socket 69 and type 'Read', disabling...
QSocketNotifier: Invalid socket 75 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
QSocketNotifier: Invalid socket 78 and type 'Read', disabling...
QSocketNotifier: Invalid socket 83 and type 'Read', disabling...
QSocketNotifier: Invalid socket 87 and type 'Read', disabling...
QSocketNotifier: Invalid socket 88 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
QSocketNotifier: Invalid socket 94 and type 'Read', disabling...
QSocketNotifier: Invalid socket 100 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
QSocketNotifier: Invalid socket 37 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
QSocketNotifier: Invalid socket 51 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
ProtocolException thrown:Failed to write data to stream
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
QSocketNotifier: Invalid socket 52 and type 'Read', disabling...
QSocketNotifier: Invalid socket 60 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
QSocketNotifier: Invalid socket 72 and type 'Read', disabling...
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
QSocketNotifier: Invalid socket 77 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
QSocketNotifier: Invalid socket 81 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
QSocketNotifier: Invalid socket 86 and type 'Read', disabling...
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
QSocketNotifier: Invalid socket 82 and type 'Read', disabling...
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
QSocketNotifier: Invalid socket 93 and type 'Read', disabling...
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
QSocketNotifier: Invalid socket 97 and type 'Read', disabling...
true
Account "shieldfire@gmail.com" not found in KWallet
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
ProtocolException thrown:Failed to write data to stream
org.kde.pim.akonadicore: Protocol Exception: "Failed to write data to stream"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: Job error:  "" for collection: QVector()
org.kde.pim.akonadicore: Job error:  "" for collection: QVector()
org.kde.pim.imapresource: CollectionFetch for idling failed. error= 1 , errorString= ""
org.kde.pim.mailcommon: failed to retrieve tags  ""
org.kde.pim.imapresource: CollectionFetch for idling failed. error= 1 , errorString= ""
org.kde.pim.mailfilteragent: ""
org.kde.pim.akonadicore: Job error:  "" for collection: QVector()
org.kde.pim.akonadicore: Job error:  "" for collection: QVector()
➜  ~ QSocketNotifier: Invalid socket 10 and type 'Read', disabling...
QSocketNotifier: Invalid socket 9 and type 'Read', disabling...
QMYSQLResult::cleanup: unable to free statement handle
QMYSQLResult::cleanup: unable to free statement handle
QMYSQLResult::cleanup: unable to free statement handle
QSocketNotifier: Invalid socket 26 and type 'Read', disabling...
QMYSQLResult::cleanup: unable to free statement handle

MYSQLResult::cleanup: unable to free statement handle
QSocketNotifier: Invalid socket 49 and type 'Read', disabling...
QMYSQLResult::cleanup: unable to free statement handle
SQLResult::cleanup: unable to free statement handle
QMYSQLResult::cleanup: unable to free statement handle
QMYSQLResult::cleanup: unable to free statement handle
Unable to start Dr. Konqi
Re-raising signal for core dump handling.

org.kde.pim.maildispatcher: Item 58101 does not have the required attribute Address.
org.kde.pim.maildispatcher: Item 58100 does not have the required attribute Address.
org.kde.pim.maildispatcher: Item 58099 does not have the required attribute Address.

org.kde.pim.maildispatcher: Item 58077 does not have the required attribute Address.
Item: QUrl("akonadi:?item=58292")
akonadi_ical_resource: Can't find incidence with uid  "libkcal-1626774113.169//shieldfire@gmail.com" ; item.id() =  58292
org.kde.pim.akonadiserver: ItemRetrievalJob for request 0x7f35340611f0 finished with error: "Unable to retrieve item from resource: Invalid item retrieved"
Item: QUrl("akonadi:?item=58393")
akonadi_ical_resource: Can't find incidence with uid  "libkcal-1410722015.336//shieldfire@gmail.com" ; item.id() =  58393
org.kde.pim.akonadiserver: ItemRetrievalJob for request 0x7f353405d240 finished with error: "Unable to retrieve item from resource: Invalid item retrieved"
org.kde.pim.akonadiserver: DATABASE ERROR:
org.kde.pim.akonadiserver:   Error code: "2013"
org.kde.pim.akonadiserver:   DB error:  "Lost connection to MySQL server during query"
org.kde.pim.akonadiserver:   Error text: "Lost connection to MySQL server during query QMYSQL3: Unable to store statement results"
org.kde.pim.akonadiserver:   Values: QMap((":0", QVariant(qlonglong, 10))(":1", QVariant(qlonglong, 5))(":2", QVariant(QString, "PLD"))(":3", QVariant(QString, "ATR"))(":4", QVariant(qlonglong, 280)))
org.kde.pim.akonadiserver:   Query: "SELECT PimItemTable.id, PartTable.partTypeId, PartTable.data, PartTable.storage, PartTable.version, PartTable.datasize FROM PimItemTable INNER JOIN PartTable ON ( PimItemTable.id = PartTable.pimItemId ) INNER JOIN PartTypeTable ON ( PartTable.partTypeId = PartTypeTable.id ) WHERE ( ( PartTable.partTypeId = :0 OR PartTable.partTypeId = :1 OR PartTypeTable.ns = :2 OR PartTypeTable.ns = :3 ) AND PimItemTable.collectionId = :4 ) ORDER BY PimItemTable.id DESC"
org.kde.pim.akonadiserver: Handler exception when handling command FetchItems on connection ETMCalendar (0x56237d4f0510) : Unable to list item parts
QSocketNotifier: Invalid socket 49 and type 'Write', disabling...
KCrash: Application 'akonadiserver' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi
QSocketNotifier: Invalid socket 6 and type 'Read', disabling...
QSocketNotifier: Invalid socket 14 and type 'Read', disabling...
QSocketNotifier: Invalid socket 24 and type 'Read', disabling...
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-cmd.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"

org.kde.pim.akonadicore: Socket error occurred: "QLocalSocket: Remote closed"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
org.kde.pim.akonadicore: "QLocalSocket: Remote closed" "/run/user/1000/akonadi/akonadiserver-ntf.socket"
➜  ~ 


Output shortened because forum hated the lenght.

Trying to enter


akonadictl fsck

results in the error message that the server crashed.
Now what do I do?

The crash is apparently caused by ‘akonadi_ical_resource_1’, it seems. (the rest of the errors are probably just the result of the crash, as the mysql server has been terminated already)

As a first step, I would try to delete ~/.config/akonadi/agent_config_akonadi_ical_resource_1_changes.dat, if such a file is corrupted it can cause strange problems.

If that doesn’t help, maybe try to disable it completely.
I suppose deleting/renaming ~/.config/akonadi/agent_config_akonadi_ical_resource_1 might do.
If not, edit ~/.config/akonadi/agentsconfigrc (or similar, I cannot check at the moment) and remove the line referring to ‘akonadi_ical_resource_1’. (make a backup of the file first! :wink: )

In the end the crash is probably related to this bug, that should be fixed in 20.08:
https://bugs.kde.org/show_bug.cgi?id=408897

I created a ‘akonadi-server’ package with the fix here:
https://download.opensuse.org/repositories/home:/wolfi323:/branches:/openSUSE:/Factory/openSUSE_Tumbleweed/

You can try to install that if you want to, it should fix the crash if yours is indeed related to that bug report.
(you should install akonadi-server and all libKF5Akonadi* packages, maybe better add it as repo and do a full switch with zypper or YaST, as explained in https://en.opensuse.org/SDB:Vendor_change_update#Full_repository_Vendor_change)

Maybe it would completely make things work for you again, I don’t know (that probably depends on what the real problem is).

I tried those suggestions with no luck. Will look into the second post tomorrow.

Thanks,
Martin S