由于“未知错误”,KDE 上的 Akonadi 无法启动,我无法更新 MariaDB

由于“未知错误”,KDE 上的 Akonadi 无法启动,我无法更新 MariaDB

Konact / KMail 无法启动,因为 Akonadi 失败了。我无法启动 akonadi

~$ akonadictl --verbose start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Found mysql_install_db:  "/usr/bin/mysql_install_db"
org.kde.pim.akonadiserver: Found mysqlcheck:  "/usr/bin/mysqlcheck"
org.kde.pim.akonadiserver: Using mysqld: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadicontrol: Service ":1.89" owner changed from "" to ":1.89"
org.kde.pim.akonadicontrol: Service ":1.90" owner changed from "" to ":1.90"
org.kde.pim.akonadiserver: mysqld reports version 10.3.34 (MariaDB)
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld-akonadi" "--defaults-file=/home/raeg/.local/share/akonadi/mysql.conf --datadir=/home/raeg/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid"
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/raeg/.local/share/akonadi/mysql.conf", "--datadir=/home/raeg/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: "2022-05-10 15:12:03 0 [Note] /usr/sbin/mysqld-akonadi (mysqld 10.3.34-MariaDB-0ubuntu0.20.04.1) starting as process 7312 ...\n"
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
org.kde.pim.akonadiserver: terminating connection threads
org.kde.pim.akonadiserver: terminating service threads
org.kde.pim.akonadiserver: stopping db process
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Service ":1.90" owner changed from ":1.90" to ""
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...

尝试更新 MariaDB

我读到,我应该更新 MariaDB,但我不知道如何更新。

~$ sudo systemctl restart mariadb
Failed to restart mariadb.service: Unit mariadb.service not found.
~$ sudo mysql_upgrade
Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
FATAL ERROR: Upgrade failed
~$ sudo mariadb-upgrade
sudo: mariadb-upgrade: Command not found
~$ mariadb --version
mariadb  Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

然后我跑了

curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.8
sudo apt update && sudo apt upgrade -y
~$ mariadb --version
mariadb  Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

但正如我们所见,情况并没有发生太大变化。

我读,https://bbs.archlinux.org/viewtopic.php?id=184192,升级到 MariaDB 版本 10 可能是问题所在。它建议降级,然后做一些事情,然后再次升级。但是,那篇文章是 2014 年的,所以我不确定它是否仍然适用。

应用装甲

根据升级到 Ubuntu 20.04.2 LTS 会破坏 Akonadi,从而破坏 KMail这可能是 apparmor 的问题,所以我运行了

sudo systemctl disable apparmor

并重新启动,但没有帮助。

我能做些什么?

答案1

我尝试了 Make42 的答案,但一开始没有用。然后我编辑/root/.local/share/akonadi/mysql.conf并添加了行

user=root

[mysqld]部分中。然后akonadictl start工作。

答案2

我不知道为什么,但这有帮助:

  1. 我将其重命名~/.local/share/akonadi/mysql.conf~/.local/share/akonadi/mysql.conf_backup
  2. 然后我用 重新启动了 akonadi akonadictl start

该文件mysql.conf已重新创建(与原始文件相同mysql.conf_backup)并且现在一切恢复正常。

相关内容