Bug 500657 - Akonadi silently fail to start
Summary: Akonadi silently fail to start
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.3.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-24 10:33 UTC by lesto
Modified: 2025-02-24 17:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lesto 2025-02-24 10:33:32 UTC
SUMMARY
Kontact wont work telling me there is a background service not running.
Checking on logs, i see the error:
```
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
[...]
org.kde.pim.akonadiserver: See "~/.local/share/akonadi/db_data/mysql.err" for more details
```

cat "~/.local/share/akonadi/db_data/mysql.err":

```
2025-02-24 10:31:08 0 [Note] InnoDB: Completed initialization of buffer pool
2025-02-24 10:31:08 0 [ERROR] InnoDB: File ./ib_logfile0 was not found
2025-02-24 10:31:08 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2025-02-24 10:31:08 0 [Note] InnoDB: Starting shutdown...
2025-02-24 10:31:09 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2025-02-24 10:31:09 0 [Note] Plugin 'wsrep-provider' is disabled.
2025-02-24 10:31:09 0 [ERROR] Unknown/unsupported storage engine: innodb
2025-02-24 10:31:09 0 [ERROR] Aborting
```

The file is not there, in ~/.local/share/akonadi/db_data, so i touch it.
Then i had an error that the file ibdata1 is corrupted, so i rename it.
Now i have an error that some basic table are missing (Table 'kontact[7838]: Error    : Table 'akonadi.collectionattributetable' doesn't exist in engine
' doesn't exist in engine)

STEPS TO REPRODUCE
1. break/disable mariaDB
2. try to start any app requiring akonadi

OBSERVED RESULT
app fail with generic error about background service missing

EXPECTED RESULT
akonadi report error, and in this specific case ask to repair/recreate the database

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 47.0 GiB of RAM
Graphics Processor: AMD Radeon RX 6750 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B450 AORUS PRO
Comment 1 Allen Winter 2025-02-24 13:11:12 UTC
try the solutions I posted to https://bugs.kde.org/show_bug.cgi?id=500657 
not sure if this is the same problem.
Comment 2 Allen Winter 2025-02-24 13:12:25 UTC
wrong url.
I mean https://bugs.kde.org/show_bug.cgi?id=499554
Comment 3 lesto 2025-02-24 13:19:14 UTC
i fixed this by manually deleting "~/.local/share/akonadi"
i still have a copy of the original files.
I think a DB fix/restore would may have worked, but i dont think i had anything in there so i prefer to go from scratch
Comment 4 Allen Winter 2025-02-24 13:22:24 UTC
ok, if you fixed it then let's close this issue
Comment 5 lesto 2025-02-24 13:28:34 UTC
this issue is not about how to fix the issue, is about it being silent to the user, so there is no user-friendly way to investigate; you need to know what to look for in the journal, know that akonadi uses a DB (and what DB your distro uses), that uses custom data folder (and where they are) and/or that there are command to try repair it.  
On top of this, is very hard to find anything about this issue, both on search engine and asking AIs.  
I think there should be some sort of user notification that something is broken at least
Comment 6 Allen Winter 2025-02-24 17:13:39 UTC
https://userbase.kde.org/Akonadi

we're adding more info to that wiki and we plan to add a link to that wiki from the Kontact itself , where applicable.