Por que o Akonadi no KDE 4.6.0 se recusa a iniciar?

4

O Akonadi se recusa a iniciar minha nova instalação do KDE 4.6.0 do PPA kubuntu-backports no Ubuntu 10.10 Maverick Meerkat, impedindo-me de usar o KMail. Aqui está a saída completa do erro:

patches@pleistocene:~/.local/share$ akonadictl start
Starting Akonadi Server...
   done.
patches@pleistocene:~/.local/share$ Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
search paths:  ("/home/patches/bin", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin") 
Found mysql_install_db:  "/usr/bin/mysql_install_db" 
Found mysqlcheck:  "/usr/bin/mysqlcheck" 
Database process exited unexpectedly during initial connection!
executable: "/usr/sbin/mysqld-akonadi"
arguments: ("--defaults-file=/home/patches/.local/share/akonadi//mysql.conf", "--datadir=/home/patches/.local/share/akonadi/db_data/", "--socket=/home/patches/.local/share/akonadi/socket-pleistocene/mysql.socket")
stdout: ""
stderr: "Could not open required defaults file: /home/patches/.local/share/akonadi//mysql.conf
Fatal error in defaults handling. Program aborted
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld-akonadi: Can't find file: './mysql/plugin.frm' (errno: 13)
110209 16:41:12 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110209 16:41:12  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
"
exit code: 1
process error: "Unknown error"
"[
0: akonadiserver(_Z11akBacktracev+0x35) [0x8086055]
1: akonadiserver() [0x8086516]
2: [0xb772e400]
3: [0xb772e416]
4: /lib/libc.so.6(gsignal+0x51) [0xb6e9f941]
5: /lib/libc.so.6(abort+0x182) [0xb6ea2e42]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8c) [0xb74d62dc]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x8087574]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8e) [0xb757168e]
9: /usr/lib/libQtCore.so.4(+0x103425) [0xb7581425]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3d) [0xb758295d]
11: akonadiserver(_ZN6QDebugD1Ev+0x43) [0x8081b73]
12: akonadiserver(_ZN13DbConfigMysql19startInternalServerEv+0x1c27) [0x810c177]
13: akonadiserver(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0xe3) [0x8087a23]
14: akonadiserver(_ZN7Akonadi13AkonadiServerC1EP7QObject+0xca) [0x8088b6a]
15: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x48) [0x808a1d8]
16: akonadiserver(main+0x364) [0x8080fb4]
17: /lib/libc.so.6(__libc_start_main+0xe7) [0xb6e8bce7]
18: akonadiserver() [0x8080b81]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
search paths:  ("/home/patches/bin", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin") 
Found mysql_install_db:  "/usr/bin/mysql_install_db" 
Found mysqlcheck:  "/usr/bin/mysqlcheck" 
Database process exited unexpectedly during initial connection!
executable: "/usr/sbin/mysqld-akonadi"
arguments: ("--defaults-file=/home/patches/.local/share/akonadi//mysql.conf", "--datadir=/home/patches/.local/share/akonadi/db_data/", "--socket=/home/patches/.local/share/akonadi/socket-pleistocene/mysql.socket")
stdout: ""
stderr: "Could not open required defaults file: /home/patches/.local/share/akonadi//mysql.conf
Fatal error in defaults handling. Program aborted
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld-akonadi: Can't find file: './mysql/plugin.frm' (errno: 13)
110209 16:41:12 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110209 16:41:12  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
"
exit code: 1
process error: "Unknown error"
"[
0: akonadiserver(_Z11akBacktracev+0x35) [0x8086055]
1: akonadiserver() [0x8086516]
2: [0xb77ae400]
3: [0xb77ae416]
4: /lib/libc.so.6(gsignal+0x51) [0xb6f1f941]
5: /lib/libc.so.6(abort+0x182) [0xb6f22e42]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8c) [0xb75562dc]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x8087574]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8e) [0xb75f168e]
9: /usr/lib/libQtCore.so.4(+0x103425) [0xb7601425]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3d) [0xb760295d]
11: akonadiserver(_ZN6QDebugD1Ev+0x43) [0x8081b73]
12: akonadiserver(_ZN13DbConfigMysql19startInternalServerEv+0x1c27) [0x810c177]
13: akonadiserver(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0xe3) [0x8087a23]
14: akonadiserver(_ZN7Akonadi13AkonadiServerC1EP7QObject+0xca) [0x8088b6a]
15: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x48) [0x808a1d8]
16: akonadiserver(main+0x364) [0x8080fb4]
17: /lib/libc.so.6(__libc_start_main+0xe7) [0xb6f0bce7]
18: akonadiserver() [0x8080b81]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
search paths:  ("/home/patches/bin", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin") 
Found mysql_install_db:  "/usr/bin/mysql_install_db" 
Found mysqlcheck:  "/usr/bin/mysqlcheck" 
Database process exited unexpectedly during initial connection!
executable: "/usr/sbin/mysqld-akonadi"
arguments: ("--defaults-file=/home/patches/.local/share/akonadi//mysql.conf", "--datadir=/home/patches/.local/share/akonadi/db_data/", "--socket=/home/patches/.local/share/akonadi/socket-pleistocene/mysql.socket")
stdout: ""
stderr: "Could not open required defaults file: /home/patches/.local/share/akonadi//mysql.conf
Fatal error in defaults handling. Program aborted
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld-akonadi: Can't find file: './mysql/plugin.frm' (errno: 13)
110209 16:41:12 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110209 16:41:12  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
"
exit code: 1
process error: "Unknown error"
"[
0: akonadiserver(_Z11akBacktracev+0x35) [0x8086055]
1: akonadiserver() [0x8086516]
2: [0xb778b400]
3: [0xb778b416]
4: /lib/libc.so.6(gsignal+0x51) [0xb6efc941]
5: /lib/libc.so.6(abort+0x182) [0xb6effe42]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8c) [0xb75332dc]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x8087574]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8e) [0xb75ce68e]
9: /usr/lib/libQtCore.so.4(+0x103425) [0xb75de425]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3d) [0xb75df95d]
11: akonadiserver(_ZN6QDebugD1Ev+0x43) [0x8081b73]
12: akonadiserver(_ZN13DbConfigMysql19startInternalServerEv+0x1c27) [0x810c177]
13: akonadiserver(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0xe3) [0x8087a23]
14: akonadiserver(_ZN7Akonadi13AkonadiServerC1EP7QObject+0xca) [0x8088b6a]
15: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x48) [0x808a1d8]
16: akonadiserver(main+0x364) [0x8080fb4]
17: /lib/libc.so.6(__libc_start_main+0xe7) [0xb6ee8ce7]
18: akonadiserver() [0x8080b81]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
search paths:  ("/home/patches/bin", "/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin", "/bin", "/usr/games", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin") 
Found mysql_install_db:  "/usr/bin/mysql_install_db" 
Found mysqlcheck:  "/usr/bin/mysqlcheck" 
Database process exited unexpectedly during initial connection!
executable: "/usr/sbin/mysqld-akonadi"
arguments: ("--defaults-file=/home/patches/.local/share/akonadi//mysql.conf", "--datadir=/home/patches/.local/share/akonadi/db_data/", "--socket=/home/patches/.local/share/akonadi/socket-pleistocene/mysql.socket")
stdout: ""
stderr: "Could not open required defaults file: /home/patches/.local/share/akonadi//mysql.conf
Fatal error in defaults handling. Program aborted
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Warning] Can't create test file /home/patches/.local/share/akonadi/db_data/pleistocene.lower-test
110209 16:41:12 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld-akonadi: Can't find file: './mysql/plugin.frm' (errno: 13)
110209 16:41:12 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110209 16:41:12  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
"
exit code: 1
process error: "Unknown error"
"[
0: akonadiserver(_Z11akBacktracev+0x35) [0x8086055]
1: akonadiserver() [0x8086516]
2: [0xb784e400]
3: [0xb784e416]
4: /lib/libc.so.6(gsignal+0x51) [0xb6fbf941]
5: /lib/libc.so.6(abort+0x182) [0xb6fc2e42]
6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8c) [0xb75f62dc]
7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc4) [0x8087574]
8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8e) [0xb769168e]
9: /usr/lib/libQtCore.so.4(+0x103425) [0xb76a1425]
10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3d) [0xb76a295d]
11: akonadiserver(_ZN6QDebugD1Ev+0x43) [0x8081b73]
12: akonadiserver(_ZN13DbConfigMysql19startInternalServerEv+0x1c27) [0x810c177]
13: akonadiserver(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0xe3) [0x8087a23]
14: akonadiserver(_ZN7Akonadi13AkonadiServerC1EP7QObject+0xca) [0x8088b6a]
15: akonadiserver(_ZN7Akonadi13AkonadiServer8instanceEv+0x48) [0x808a1d8]
16: akonadiserver(main+0x364) [0x8080fb4]
17: /lib/libc.so.6(__libc_start_main+0xe7) [0xb6fabce7]
18: akonadiserver() [0x8080b81]
]
"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
"akonadiserver" crashed too often and will not be restarted! 

Eu tentei mover a pasta ~ / .local / share / akonadi e executá-la como nova, e também tentei iniciar o Akonadi de um novo usuário, tudo sem sucesso.

Solicitado por @djeikyb:

patches@pleistocene:~$ ls -ld ~/.local
drwxrwx--- 3 patches patches 4096 2011-02-07 03:15 /home/patches/.local


patches@pleistocene:~$ mysql_upgrade 
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' 
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

patches@pleistocene:~$ mysql_upgrade -S ~/.local/share/akonadi/socket-pleistocene/
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' '--socket=/home/patches/.local/share/akonadi/socket-pleistocene/' 
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/home/patches/.local/share/akonadi/socket-pleistocene/' (111) when trying to connect
FATAL ERROR: Upgrade failed
    
por Patches 10.02.2011 / 00:56

5 respostas

4

Este parece ser um problema recorrente para mim em cada instalação que eu esqueço. A solução acima resolve o problema, mas eu me pergunto se existe outro caminho. Neste ponto, o Ubuntu 11.10 Oneiric, tudo que você precisa é

sudo aa-complain usr.sbin.mysqld-akonadi

para que o Aknoadi funcione. Mas vamos analisar o problema.

O Apparmor é um utilitário de segurança administrativa que coloca restrições nos programas. Quando o Ubuntu é configurado, o utilitário administrativo apparmor aplica um perfil de segurança em / usr / sbin / mysqld-akonadi. Esse perfil está em /etc/apparmor.d/usr.sbin.mysqld-akonadi "e contém a seguinte especificação, que abreviei aqui para a situação específica:

profile /usr/sbin/mysqld  {
    ## [stuff snipped]
    @{HOME}/.local/share/akonadi/** rwk,
}

Não tenho certeza, mas acredito que "r" significa "read", "w" significa "write" e "k" significa "mknod". Isso está dizendo que o mysqld tem permissão para criar arquivos e diretórios em qualquer lugar sob o diretório aknoadi do usuário.

Onde / usr / sbin / mysqld-akonadi está falhando de acordo com o /var/log/kern.log é:

Apr 11 14:14:42 adiron kernel: [572346.502653] type=1400 audit(1334168082.226:675): apparmor="ALLOWED" operation="mknod" parent=31088 profile="/usr/sbin/mysqld-akonadi///usr/sbin/mysqld" name="/home/xxxxxx/.local/share/akonadi/db_data/adiron.lower-test" pid=31090 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000

Ele está dizendo que está falhando exatamente na chamada "mknod". Estranho, pois acho que está configurado para isso.

No entanto, "homem apparmor" contém as seguintes linhas:

"Um processo confinado não pode chamar mknod (2) para criar dispositivos de caracteres ou blocos."

Essa restrição parece estar em vigor, independentemente da especificação no perfil específico. Um processo "confinado" é aquele que está no modo "impor". Emitir o comando "aa-reclamar" mencionado acima "desconfigura" o processo e, em seguida, é permitido criar os soquetes, apenas reclamando sobre isso, juntamente com tudo o que é permitido fazer, aumentando seus logs.

Não está claro se com esta restrição aparentemente incircunciável do uso de "mknod" na criação dos sockets mysql pode ser configurado no lado akonadi. Em qualquer caso, aqueles parecem ser apenas "avisos" no log Akonadi, e parece que os erros reais são de coisas como:

Apr 11 13:00:10 adiron kernel: [567875.200843] type=1400 audit(1334163610.926:57): apparmor="DENIED" operation="open" parent=15318 profile="/usr/sbin/mysqld-akonadi///usr/sbin/mysqld" name="/home/xxxxx/.local/share/akonadi/db_data/ibdata1" pid=15320 comm="mysqld" requested_mask="rw" denied_mask="rw" fsuid=1000 ouid=1000
Apr 11 13:00:11 adiron kernel: [567875.355533] type=1400 audit(1334163611.078:58): apparmor="DENIED" operation="open" parent=15327 profile="/usr/sbin/mysqld-akonadi///usr/sbin/mysqld" name="//home/xxxxx/.local/share/akonadi/mysql.conf" pid=15329 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

dos quais o Apparmor parece estar configurado para permitir. Eu estou em uma perda neste. No entanto, desligar a segurança no modo de reclamação faz com que funcione. Eu acho que você poderia apenas remover o usr.sbin.mysql-akonadi do /etc/apparmor.d/ e isso seria igualmente eficaz.

    
por Dr. Polar Humenn 11.04.2012 / 20:56
1

Eu tive esse problema também, em um kubuntu oneiric atualizado a partir de uma instalação do natty, e em outra máquina com o kubuntu natty.

Em ambas as máquinas, a magia queixosa ajudou.

No natty eu também tive que remover o diretório ~/.local/share/akonadi (que eu fiz várias vezes no onírico também)

Também não tenho certeza se a instalação de mysql-server desempenhou um papel nisso (ainda não ousei desinstalá-lo em ambas as máquinas)

Akonadi pareceu funcionar fora da caixa em um OpenSuSE 11.4. (KDE 4.6.0) embora.

    
por A. Fachat 19.11.2011 / 22:20
0

Experimente (também) o seguinte:

K - > Configurações do sistema - > Inicialização e desligamento.

Na aba Autostart, escolha "Add Program" e insira o comando "akonadictl start".

    
por user12417 15.03.2011 / 13:52
0

No meu caso, isso tem algo a ver com os pacotes mysql-server e mysql-server-5.1 instalados. Se eu desinstalá-los, o akonadi começa a funcionar novamente. Que pena, eu preciso do mysql-server no meu notebook também ...

Parece link contém a resposta:

sudo aa-complain mysqld
sudo /etc/init.d/apparmor reload
sudo aa-complain mysqld-akonadi
sudo /etc/init.d/apparmor reload
akonadictl start
    
por user13620 05.04.2011 / 05:04
0

até onde eu posso ver o problema está na configuração do servidor akonadi: antes da atualização o servidor mysql foi configurado para / usr / sbin / mysqld nas configurações do usuário (não do sistema e, portanto, não atualizado) após a atualização, o perfil apparmor é para '/ usr / sbin / mysqld-akonadi' mudar o servidor mysql para isso corrige tudo ... pelo menos para mim.

    
por nehlsen 26.04.2013 / 10:07