Archive:Http://userbase.kde.org/Akonadi 4.4/Troubleshooting/ca

From KDE UserBase Wiki
Revision as of 20:42, 14 March 2011 by Abella (talk | contribs) (Created page with "En aquest moment, la causa no està identificada, però la solució és senzilla. Tanqueu '''Kontact''', i inicieu '''KAddressBook''' com a una aplicació independent. Després q...")

Introducció

Aquesta pàgina se centra principalment en la solució de problemes de Akonadi, ja que hi ha fallades inevitables en les primeres etapes de la migració. Per a molta gent els primers signes d'activitat de Akonadi arribaran amb KDE SC 4.4, i molts se sentiran confusos. Per a veure una breu descripció del propòsit de Akonadi, visiteu aquesta entrada del Glossari. També hi trobareu enllaços útils a altres lectures. Una vegada que els inevitables problemes inicials s'acabin, Akonadi proporcionarà tot el seu poder a moltes aplicacions.

Comprendre l'estructura

Per descomptat simplement podeu utilitzar Kontact per a gestionar tota la llibreta d'adreces, però si teniu un sistema de còpies de seguretat, per exemple, voldreu saber a on estan les vostres dades, i com es manipulen. La pàgina Akonadi i AddressBook us ajudarà.

Consells per a la resolució de problemes

  • En informar de problemes amb el servidor Akonadi, inclogueu sempre un ampli i comprensiu informe d'auto-diagnòstic. Aquest informe es pot obtenir en el diàleg d'auto-comprovació que es mostra cada vegada que el servidor Akonadi no ha pogut iniciar correctament. Podreu trobar aquest diàleg en el mòdul de kcm que és accessible a través de:
kcmshell4 kcm_akonadi
  • Iniciar manualment el servidor Akonadi des d'un terminal pot proporcionar informació addicional. Ho podeu fer executant la següent ordre en una consola:
akonadictl start

De forma similar, amb la següent ordre podeu tornar a parar el servidor Akonadi:

akonadictl stop

Aquesta ordre proporciona informació més útil:

akonadictl status

Problemes comuns

Kontact no s'inicia, i no mostra cap missatge

Si Kontact no s'inicia i no mostra cap missatge d'error, comproveu que s'estigui executant Akonadi. Akonadi hauria d'iniciar-se sota demanda. Si no és el cas, haureu d'iniciar-lo abans d'iniciar Kontact si tens algun recurs migrat (possiblement KAddressBook). Utilitzeu la icona Akonadi en la safata del sistema (per que aparegui, escriviu «akonadi» en KRunner) o escriviu l'ordre en konsole per a iniciar-lo.

Kontact no s'inicia, versió II

Se sap que Kontact és veu afectat després d'una actualització. Si ocorre, intenteu executar KMail, KOrganizer o qualsevol altra aplicació des de KRunner (o Konsole). Hi ha moltes possibilitats que funcionin com a aplicacions independents mentre cerqueu què és el que ha anat malament. Això afecta principalment a la versió 4.4.0.

No es troba la carpeta: «/Local»

Algunes persones han informat d'aquest error, quan Kontact no s'inicia. En les primeres versions de la sèrie 4.4 sembla ser una fallada en la migració que indica a KMail que cerqui el correu local en /.local/share/Local, un directori que no ha estat configurat. La solució és, amb KMail/Kontact tancats, obrir la Consola de Akonadi:

  • Useu krunner, *Alt-F2, o
  • «akonadiconsole» konsole

A continuació, elimineu el recurs que diu ser per al correu local. Ara trobareu que podeu iniciar Kontact o KMail, i que un nou recurs ha estat creat, apuntant a ~/.local/share/local-mail.

Hi ha altres carpetes noves en ~/.local/share/

Sí. Si la llibreta d'adreces ha migrat correctament un recurs s'han creat com a ~/.local/share/contacts/.

Què són /usr/bin/akonadi_maildir_resource i /usr/bin/akonadi_maildispatcher_agent?

El recurs akonadi_maildir_resource és creat automàticament pel akonadi_maildispatcher_agent, mentre que el segon sempre s'inicia juntament amb el servidor Akonadi el qual proporciona una funcionalitat bàsica (per exemple, enviar un correu electrònic) que és usada per les aplicacions de correu electrònic que estan (o estaran) basades en Akonadi. Per tant, si sou un usuari normal, podeu ignorar que aquestes dues aplicacions estiguin en execució. El recurs autogenerat akonadi_maildir_resource, sempre apuntarà a /.local/share/local-mail/ que és on es desaran les carpetes i correus locals.

En aquest punt, en el KDE SC 4.4, el correu encara no s'ha començat a migrar.

Els agents d'indexat de Nepomuk han estat desactivats

Kontact està funcionant, però es segueix veient aquest avís:

El motiu més comú per a veure aquest avís és que Nepomuk simplement està desactivat en Arranjament del sistema. Si us plau, proveu a activar-lo en Avançat -> Cerca a l'escriptori -> Paràmetres bàsics marcant «Escriptori semàntic del Nepomuk» i fent clic a «Aplica».

Si això no us funciona (o si l'opció ja estava marcada quan rebíeu el missatge d'error) i si heu estat utilitzant versions preliminars de KDE SC 4.4, podeu estar afectat per un canvi en el disseny de la base de dades (a causa d'una actualització del servidor de bases de dades Virtuoso des de la versió 5 a la versió 6; s'espera que les versions de producció de KDE SC 4.4 treballin amb la versió 6). Les següents ordres haurien de fer que tornés a funcionar:

qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit
rm -r ~/.kde/share/apps/nepomuk
rm -r ~/.kde4/share/apps/nepomuk
nepomukserver

Tingueu en compte que les anteriors ordres no activaran Nepomuk de forma permanent si no estava ja activat. Per a fer-ho haureu d'usar Arranjament del sistema.

Per que Akonadi, i per tant Kontact, funcionin és necessari que Nepomuk estigui en execució. No obstant, podeu desactivar l'indexador de fitxers Strigi, el qual no és necessari per a Kontact. L'indexador de fitxers només s'utilitza per a les cerques d'escriptori, per la qual cosa no guarda relació amb Kontact. Simplement heu d'assegurar-vos que Nepomuk estigui en execució correctament per a que funcioni Kontact.

En Kontact, Nepomuk és utilitzat per a moltes coses diferents, des de mostrar els aniversaris propers, passant per la gestió de llistes de lliure/ocupat, fins a mostrar la foto d'un contacte en el visor de missatges. Si Nepomuk no està en execució, diverses coses en Kontact deixaran de funcionar. L'avís està per alertar-vos sobre la reducció de funcionalitat. L'activació de Nepomuk com es descriu més amunt soluciona el problema.

Podeu comprovar si s'està executant correctament Nepomuk escrivint:

akonadictl status

Vull utilitzar la meva llibreta d'adreces i organitzador actuals. Puc?

Sí. Quan utilitzeu la consola de Akonadi per afegir recursos se us permet triar-la com a Llibreta d'adreces estàndard: Tenint en compte que la vostra std.vcf haurà de funcionar bé. La migració no destrueix la llibreta d'adreces antiga. La podeu continuar usant, encara que perdreu els beneficis que aporta Akonadi. Com a alternativa, podeu mantenir ambdues, una llibreta d'adreces de Akonadi i la original, durant un temps, si us sentiu més segur d'aquesta manera.

No puc veure cap detall en la meva llibreta d'adreces

En aquest moment, la causa no està identificada, però la solució és senzilla. Tanqueu Kontact, i inicieu KAddressBook com a una aplicació independent. Després que la tanqueu la podreu usar des de Kontact. Sembla que hi ha alguna cosa que no està sent iniciada quan es llança Kontact, i esperem identificar-ho i reparar-ho aviat. Afecta principalment a la versió 4.4.0.

Els meus contactes no es mostren quan uso el botó Selecciona en KMail

Check System Settings -> Advanced tab -> KDE Resources. Make sure that your Akonadi controlled address book(s) are listed there - add them if necessary. At the same time, it's a good idea to make your main Akonadi addressbook, usually called "Personal Contacts", is set to be the default. More details of how this can be found in here.

Com recupero la meva llibreta d'adreces de Groupware?

Two solutions: using the old framework or the new one.

Old framework: In akonadiconsole, add a "KDE Address Book (traditional)". The KDE Address Book means you can set up old kresources for Akonadi. In the configuration of "KDE Address Book (traditional)", you point it to an "IMAP over KMail" KResource and in KMail, the groupware options should be enabled. This should work for Kolab, eGroupware and similar addressbooks - you will need to check the options to make sure that the correct type is selected.

New framework (only tested with Kolab): In the Akonadi configuration module add an "IMAP E-Mail Server" resource, and set up your mail server name, username and password, then click Auto-Detect. Run this command to see it:

kcmshell4 kcm_akonadi

Then add a Kolab resource. The next step is to wait for the imap resource to synchronize, which can take quite a long time. The status will appear in the Akonadi configuration module. If nothing happens, try restarting akonadiserver. After some time the Kolab addressbook(s) should appear in KAddressBook.

Experimenteu retards en enviar correu

This is accompanied by KMail freezing until the mail is actually dispatched.

A bug has been found in the way Nepomuk checks addresses, which can cause huge delays. This is fixed for SC 4.4.1. If you cannot get 4.4.1 yet, there is this work-around:

Close Kontact, or KMail and KAddressbook if you are running stand-alone apps. Disable Strigi in SystemSettings. Stop Nepomuk, delete the database and restart nepomukserver. The actual commands you need are (as user):

qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit
rm -r ~/.kde/share/apps/nepomuk
rm -r ~/.kde4/share/apps/nepomuk
nepomukserver

This will, of course, wipe out all the database, including any tags you've added. In theory, I understand that it's possible to do a more selective wipe of the database. If this matters to you you can find the instructions at this page

El recurs IMAP sempre diu estar fora de línia

Encara que el sistema disposi de connexió a Internet, el recurs IMAP es nega a canviar a l'estat a en línia.

This bug is caused by a misconfigured NetworkManager installation on your system. Check the output of

qdbus --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.state

If it is '4' (Disconnected) but you can access the Internet, then your NetworkManager is indeed configured wrong. If it is '3' (Connected) the problem must be somewhere else. Under Debian this behavior can be caused by interfaces defined in /etc/network/interfaces, which are not controlled by NetworkManager. To fix this, simply remove the entries from /etc/network/interfaces and let NetworkManager handle them.

Alguns problemes tècnics

Nepomuk

Starting with KDE 4.4, it is required that Nepomuk is running in order for Akonadi to work correctly. Akonadi will check this and display an error dialog on startup if this is not the case.

Nepomuk only works with the Virtuoso backend. You can check whether the Nepomuk is running with the correct backend by using the Akonadi self-test dialog, as described above.

Although Nepomuk is required to be running, you can still disable Strigi file indexing, which is usually the most resource-intensive part of the Nepomuk framework.

Apparmor

Some distributions using Apparmor have it set up in a way that prevents Akonadi from running its internal database server. This can result in a variety of fuzzy error messages, including but not limited to the following:

unknown error 255 when running akonadictl
"DB error: 'Could not open required defaults file: /home/$username/.local/share/akonadi/mysql.conf"

You can solve this by running the following command with root privileges then reload apparmor:

aa-complain mysqld

On Kubuntu this is:

sudo aa-complain mysqld
sudo /etc/init.d/apparmor reload

Note that you might be using Apparmor even if it does not show up in the process list.

Also note that some distributions ship an additional mysqld binary called mysqld-akonadi which has AppArmor set up correctly. If that's the case on your system and you see this problem nevertheless, there are two possible reasons:

  • Akonadi still uses mysqld instead of mysqld-akonadi. You can change that in Systemsettings -> Advanced -> Akonadi -> Server configuration.
  • AppArmor is not setup correctly for mysqld-akonadi either. Try running the "aa-complain" command noted above with mysqld-akonadi instead of mysqld.

---

You will also experience this problem if you are running an encrypted home directory using encryptfs combined with AppArmor as the Akonadi apparmor profile currently does not account for an ecrypted home (common with Ubuntu Jaunty users). Error messages with include:

  • dmesg produces:
ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-13]
ecryptfs_create: Failed to create file inlower filesystem
  • Akonadi will list the following errors:
Akonadi server process not registered at D-Bus

The fix is to edit the following file "/etc/apparmor.d/usr.sbin.mysqld-akonadi". Below the line:

@{HOME}/.local/share/akonadi/** rwk,

Add a new line:

@{HOME}/.Private/** rwk,

Restart apparmor and restart akonadi.

Falten requisits previs

To use Akonadi you need to have the following packages installed (names might differ depending on your distribution):

  • The MySQL server (called mysql on openSUSE)
  • The Qt4 MySQL plugin (called libqt4-sql-mysql on openSUSE)

If you compile Qt4 yourself, make sure to tell the configure script to build in MySQL support by passing it the following option:

-plugin-sql-mysql

If "configure" cannot locate the necessary MySQL client code (i.e, says "MySQL support cannot be enabled due to functionality tests") then ensure that the corresponding package is installed (typically called [lib]mysql[client]-dev[el]). Also, depending on the install location of the MySQL headers, additional parameters to "configure" might be needed (eg. "-I /usr/include/mysql" on OpenSuse).

If you get the Qt4 direct from Nokia, such as a download of qt-sdk-linux-x86_64-opensource-2009.05.bin, you will ( by the command "akonadictl start") get an error at Test 1:

Database driver not found.
Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration.
The following drivers are installed: QSQLITE.
Make sure the required driver is installed.

The driver you need is libqsqlmysql.so

Unfortunately this driver is not part of the distribution (until january 2010). You need to compile the source. Download the following file:

qt-everywhere-opensource-src-4.6.0.tar.bz

Then configure and make as above. But the make install doesn't copy the driver. So you have to copy it by yourself:

cp <qt-src-dir>/qt-everywhere-opensource-src-4.6.0/plugins/sqldrivers/libqsqlmysql.so /usr/local/bin/sqldrivers/

But the Revision 4.6.1, such as qt-sdk-linux-x86_64-opensource-2010.xx.bin has the driver you needed.

Configuració de l'entorn

The Akonadi server searches for Akonadi agents and resources in the paths defined in the XDG_DATA_DIRS environment variable. If Akonadi complains about not finding agents or resources, check if this variable is set correctly. Also keep in mind that even if set in a current console session, it might not have been set when starting the server. Starting the server manually in the current console session excludes this cause.

mysqld: unknown variable 'innodb_file_per_table=1'

If the MySQL server log contains the following error, then your MySQL server was built without the InnoDB support which is required by Akonadi or InnoDB needs to be loaded in your mysql.conf file:

[ERROR] /usr/libexec/mysqld: unknown variable 'innodb_file_per_table=1'
[ERROR] Aborting

Try adding:

#sql_mode=strict_trans_tables <- Add underneath this line
#plugins
plugin_dir=usr/lib/mysql/plugin < - This may be a different path
plugin-load=ha_innodb.so

La taula «mysql. servers» no existeix

If MySQL server log contains the following error, then, most probably, you don't have your MySQL configuration file in place:

[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
[ERROR] Cannot open mysql.db
[ERROR] Cannot open mysql.user
[ERROR] Cannot open mysql.event

Copy it from /usr/share/config/akonadi/mysql-global.conf into ~/.config/akonadi/mysql-local.conf. (For debian and openSuSE users the file is located in /etc/akonadi/mysql-global.conf). Then open it and uncomment the line sql_mode=strict_trans_tables. After that, you may get the following errors:

[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported table type: innodb
[ERROR] Aborting

If so, then in the same file find the line that starts just like the one above (which you have uncommented), but has additional parameters, separated by commas (something like sql_mode=strict_trans_tables,strict_all_tables, ...etc). Comment the shorter sql_mode=... line and uncomment the longer one.

On openSUSE 11.2 running the following command will fix this problem:

mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/


Actualització a Kubuntu 10.04 (Lucid Lynx)

This is a summary of other entries here for those upgrading from Kubuntu 9.10 to 10.04 who may have been using a personal package archive (PPA) for KDE 4.3 for bug fixes.

Install missing prerequisites. Remove previous akonadi cache. Start the akonadi service. Install the database. Upgrade the database. Stop and restart the akonadi service.

sudo apt-get install virtuoso-server mysql-server-5.1
rm -r $HOME/.local/share/akonadi
akonadictl start
mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/
mysql_upgrade --socket=$HOME/.local/share/akonadi/db_misc/mysql.socket
akonadictl stop
akonadictl start

The mysql_install_db command above will report something like the following, which you can safely ignore:

Installing MySQL system tables...
100501 18:04:30 [Warning] Can't create test file 
/home/[userid]/.local/share/akonadi/db_data/[hostname].lower-test

Reference: forum.kde.org Akonadi 1.2.1 - some issues

Actualització de KAddressBook

In addition to the Kubuntu 10.04 remedy above, problems trying to add a Vcard directory may require the following command while Akonadi is not running:

rm -rf $HOME/.config/akonadi

No es pot inicialitzar el joc de caràcters latin1

If you get the following error when starting Akonadi, then you are probably using a MySQL server which has a version > 5.1.42:

Character set 'latin1' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
Nepomuk QueryServer interface not available!
Connecting to deprecated signal
QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
DataStore::unhideAllPimItems()
Character set 'latin1' is not a compiled character set and is not specified in
the '/usr/share/mysql/charsets/Index.xml' file
Database error: Cannot open database.
Last driver error: "QMYSQL: Unable to connect"
Last database error: "Can't initialize character set latin1 (path:
/usr/share/mysql/charsets/)"
Database error: Cannot open database.
Last driver error: "QMYSQL: Unable to connect"
Last database error: "Can't initialize character set latin1 (path:
/usr/share/mysql/charsets/)"

There is a known regression in MySQL 5.1.43 and 5.1.44 which prevents MySQL from starting.

See the bug report for more details.


Reiniciar després d'un error previ

If you had problems starting Akonadi and fixed those (such as a missing package or the Apparmor problem) make sure that the Akonadi server is completely shut down before trying to start it again, by calling on the command line:

akonadictl stop

You can confirm that it was indeed shut down completely by running:

akonadictl status

Under some circumstances the Akonadi server can be stuck in a partially running state after a failure which will prevent the next attempt to start it to fail as well. Please file a bug report if you run into this problem including the self-test report of the initial problem.

The so-called "Gentoo-Assert"

That's an especially nasty problem that so far only affects users of source-based distributions, most prominently Gentoo. It is named after MySQL assertions like the following example and is most likely caused by a MySQL protocol mismatch between the MySQL server and the client library or the Qt MySQL driver.

akonadiserver: libmysql.c:4301: setup_one_fetch_function: Assertion
`param->buffer_length != 0' failed.

It is extremely hard to diagnose as the assertion mentioned above is only triggered sometimes. Instead you'll get a wide range of weird symptoms:

  • ASAP protocol logs show successful creation of objects which are supposedly no longer available when the next commands access them again.
  • SQL protocol logs show INSERT or UPDATE commands with values that mismatch the corresponding column types and nevertheless succeed.
  • SQL protocol logs showing large apparently random record ids which are nevertheless considered valid.

References:

Possible solution: Rebuild the Qt MySQL driver after upgrading MySQL (which most likely caused this problem in the first place).