![Akonadi 服务器无法启动](https://linux22.com/image/926318/Akonadi%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8.png)
阿科纳迪拒绝开始。
我尝试删除该~/.local/share/akonadi
文件夹并重新运行它,还尝试以新用户身份启动 Akonadi。
正如您所见,它并没有抱怨 mysql-files 目录,尽管我有它。
我清除akonadi/*
并重新安装。apparmor
停止并禁用,因此不是 apparmor 问题
mysql Ver 8.0.20-0ubuntu0.20.04.1 适用于 x86_64 上的 Linux(Ubuntu)
$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadicontrol: Service ":1.181" owner changed from "" to ":1.181"
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Found mysql_install_db: ""
org.kde.pim.akonadiserver: Found mysqlcheck: "/usr/bin/mysqlcheck"
org.kde.pim.akonadiserver: Using mysqld: "/usr/sbin/mysqld"
org.kde.pim.akonadiserver: mysqld reports version 8.0.20 (Oracle MySQL)
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld" "--defaults-file=/home/brad/.local/share/akonadi/mysql.conf --datadir=/home/brad/.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"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/brad/.local/share/akonadi/mysql.conf", "--datadir=/home/brad/.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: ""
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Process operation timed out"
org.kde.pim.akonadiserver: terminating connection threads
org.kde.pim.akonadiserver: terminating service threads
org.kde.pim.akonadiserver: stopping db process
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/user/1000/akonadi/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/run/user/1000/akonadi/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Service ":1.181" owner changed from ":1.181" to ""
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
升级到 20.10 后重新安装了 mysql-server,输出如下:
$ akonadictl start--verbose
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"
org.kde.pim.akonadiserver: mysqld reports version 10.5.12 (MariaDB)
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld" "--defaults-file=/home/brad/.local/share/akonadi/mysql.conf --datadir=/home/brad/.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"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/brad/.local/share/akonadi/mysql.conf", "--datadir=/home/brad/.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: "2021-09-11 15:01:03 0 [Note] /usr/sbin/mysqld (mysqld 10.5.12-MariaDB-0ubuntu0.21.04.1) starting as process 10897 ...\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: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
更新:这个问题已通过重新安装 mysql 解决
brad@zika:~$ akonadictl start -v
akonadictl 5.18.1 (21.08.1)
brad@zika:~$ akonadictl start
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadictl: done.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
brad@zika:~$ org.kde.pim.akonadiserver: Starting up the Akonadi Server...
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
org.kde.pim.akonadiserver: Running DB initializer
org.kde.pim.akonadiserver: DB initializer done
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadicontrol: Akonadi server is now operational.
brad@zika:~$ akonadictl status
Akonadi Control: running
Akonadi Server: running
Akonadi Server Search Support: available (Remote Search)
Available Agent Types: No agent types found!
brad@zika:~$ akonadictl stop
brad@zika:~$ org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
brad@zika:~$
答案1
当我们遇到 KDE 自带的默认 mysql 问题时,我们可以拥有自己的 MySQL 服务器并要求 KDE 将其数据存储在那里。
详细信息请见此处 https://gist.github.com/aldolat/e8066baf8a390e5d5f5ed6e0849ec78c