Archive:Http://userbase.kde.org/Akonadi 4.4/Troubleshooting: Difference between revisions
m (Text replace - "</translate>" to " ") |
|||
(74 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
<languages /> | <languages /> | ||
==Introduction== <!--T:1--> | ==Introduction== <!--T:1--> | ||
<!--T:2--> | <!--T:2--> | ||
This page is mainly concerned with troubleshooting '''Akonadi''', as there are inevitable glitches in early stages of migration. For many people the first signs of '''Akonadi''' activity will be in '''KDE SC 4.4''', and many will be confused by it. For a brief description of the purpose of '''Akonadi''', see | This page is mainly concerned with troubleshooting '''Akonadi''', as there are inevitable glitches in early stages of migration. For many people the first signs of '''Akonadi''' activity will be in '''KDE SC 4.4''', and many will be confused by it. For a brief description of the purpose of '''Akonadi''', see [[Glossary#Akonadi|this Glossary entry]]. You will also find useful links to further reading. Once the inevitable teething troubles are over, '''Akonadi''' will provide a power-house usable by many applications. | ||
===Understanding the Structure=== <!--T:3--> | ===Understanding the Structure=== <!--T:3--> | ||
<!--T:4--> | <!--T:4--> | ||
You can, of course, simply use '''Kontact''' to manage all your addressbooks, but if you have a backup system in place, for instance, you'll want to know where your data is, and how it's handled. The page | You can, of course, simply use '''Kontact''' to manage all your addressbooks, but if you have a backup system in place, for instance, you'll want to know where your data is, and how it's handled. The page [[Akonadi_and_AddressBook|Akonadi and AddressBook]] will help. | ||
== Troubleshooting Tips == <!--T:5--> | == Troubleshooting Tips == <!--T:5--> | ||
<!--T:6--> | <!--T:6--> | ||
* When reporting problems with the '''Akonadi''' server, always include the comprehensive self-test report. This report can be obtained from the self-test dialog which shows up whenever the '''Akonadi''' server was unable to start successfully. You can find the selftest dialog in the kcmmodule that is accessable via: | * When reporting problems with the '''Akonadi''' server, always include the comprehensive self-test report. This report can be obtained from the self-test dialog which shows up whenever the '''Akonadi''' server was unable to start successfully. You can find the selftest dialog in the kcmmodule that is accessable via: | ||
{{ | {{input|1=kcmshell4 kcm_akonadi}} | ||
<!--T:7--> | <!--T:7--> | ||
* Starting the '''Akonadi''' server manually on the command line can result in additional useful information. This can be done by running the following command on a console: | * Starting the '''Akonadi''' server manually on the command line can result in additional useful information. This can be done by running the following command on a console: | ||
{{ | {{input|1=akonadictl start}} | ||
<!--T:109--> | |||
Similarly, with this command the Akonadi server can be stopped again: | Similarly, with this command the Akonadi server can be stopped again: | ||
{{ | {{input|1=akonadictl stop}} | ||
<!--T:110--> | |||
This command gives more useful information: | This command gives more useful information: | ||
{{ | {{input|1=akonadictl status}} | ||
==Common Problems== <!--T:8--> | ==Common Problems== <!--T:8--> | ||
Line 37: | Line 37: | ||
<!--T:12--> | <!--T:12--> | ||
'''Kontact''' has been known to be hit after an update. If this happens, try starting '''KMail''', '''KOrganizer''' or any of the other applications from '''KRunner''' (or '''Konsole'''). Chances are high that they will work as stand-alone apps while you find what went wrong. This mainly affects version 4.4.0. | '''Kontact''' has been known to be hit after an update. If this happens, try starting '''KMail''', '''KOrganizer''' or any of the other applications from '''KRunner''' (or '''Konsole'''). Chances are high that they will work as stand-alone apps while you find what went wrong. This mainly affects version 4.4.0. | ||
===Folder not found: "/Local"=== <!--T:13--> | ===Folder not found: "/Local"=== <!--T:13--> | ||
<!--T:14--> | |||
Some people have reported this error, when '''Kontact''' would not start. In some early versions of 4.4 there seems to be a bug in the migration that is telling '''KMail''' to look for local mail in ~/.local/share/Local, a directory that had not been set up. The solution for this is not to attempt to correct it, but, with '''KMail'''/'''Kontact''' closed, to open the '''Akonadi Console''': | Some people have reported this error, when '''Kontact''' would not start. In some early versions of 4.4 there seems to be a bug in the migration that is telling '''KMail''' to look for local mail in ~/.local/share/Local, a directory that had not been set up. The solution for this is not to attempt to correct it, but, with '''KMail'''/'''Kontact''' closed, to open the '''Akonadi Console''': | ||
* Use '''krunner''', Alt-F2, or | * Use '''krunner''', Alt-F2, or | ||
Line 76: | Line 76: | ||
<!--T:24--> | <!--T:24--> | ||
If this does not help (or if the option was already checked when you got the error) and if you have previously been using prereleases of '''KDE SC 4.4''', you may be affected by a change to the database layout (due to an upgrade of the '''Virtuoso''' database server from version 5 to version 6; production releases of '''KDE SC 4.4''' are expected to be shipped with '''Virtuoso''' version 6). The following commands should get it working again: | If this does not help (or if the option was already checked when you got the error) and if you have previously been using prereleases of '''KDE SC 4.4''', you may be affected by a change to the database layout (due to an upgrade of the '''Virtuoso''' database server from version 5 to version 6; production releases of '''KDE SC 4.4''' are expected to be shipped with '''Virtuoso''' version 6). The following commands should get it working again: | ||
<!--T:97--> | <!--T:97--> | ||
{{input|1=qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit | |||
rm -r ~/.kde/share/apps/nepomuk | rm -r ~/.kde/share/apps/nepomuk | ||
rm -r ~/.kde4/share/apps/nepomuk | rm -r ~/.kde4/share/apps/nepomuk | ||
nepomukserver}} | nepomukserver}} | ||
<!--T:123--> | |||
Note that the above commands will '''not''' enable '''Nepomuk''' permanently if it isn't already enabled, you have to use '''System Settings''' for that. | Note that the above commands will '''not''' enable '''Nepomuk''' permanently if it isn't already enabled, you have to use '''System Settings''' for that. | ||
Line 94: | Line 94: | ||
<!--T:27--> | <!--T:27--> | ||
You can check if '''Nepomuk''' is correctly running by typing: | You can check if '''Nepomuk''' is correctly running by typing: | ||
{{ | {{input|1=akonadictl status}} | ||
===I want to use my current Address Book and Organizer - Can I?=== <!--T:28--> | ===I want to use my current Address Book and Organizer - Can I?=== <!--T:28--> | ||
Line 110: | Line 110: | ||
<!--T:33--> | <!--T:33--> | ||
Check <menuchoice>System Settings -> Advanced tab -> KDE Resources</menuchoice>. 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 [[KAddressBook_4.4#Setting_up_your_New_AddressBook|here]]. | Check <menuchoice>System Settings -> Advanced tab -> KDE Resources</menuchoice>. 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 [[Special:myLanguage/KAddressBook_4.4#Setting_up_your_New_AddressBook|here]]. | ||
===How do I get my Groupware addressbook back?=== <!--T:34--> | ===How do I get my Groupware addressbook back?=== <!--T:34--> | ||
Line 121: | Line 121: | ||
<!--T:37--> | <!--T:37--> | ||
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: | 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: | ||
{{ | {{input|1=kcmshell4 kcm_akonadi}} | ||
<!--T:112--> | |||
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'''. | 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'''. | ||
<span id="You experience long delays when sending mail"></span> | |||
===You experience long delays when sending mail=== <!--T:38--> | ===You experience long delays when sending mail=== <!--T:38--> | ||
Line 136: | Line 138: | ||
<!--T:41--> | <!--T:41--> | ||
Close '''Kontact''', or '''KMail''' and '''KAddressbook''' if you are running | 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): | stand-alone apps. Disable '''Strigi''' in '''SystemSettings'''. Stop '''Nepomuk''', delete the database and restart '''nepomukserver'''. The actual commands you need are (as user): | ||
<!--T:42--> | <!--T:42--> | ||
{{input|1=qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit | |||
rm -r ~/.kde/share/apps/nepomuk | rm -r ~/.kde/share/apps/nepomuk | ||
rm -r ~/.kde4/share/apps/nepomuk | rm -r ~/.kde4/share/apps/nepomuk | ||
nepomukserver }} | nepomukserver}} | ||
<!--T:43--> | |||
This will, of course, wipe out all the database, including any tags you've | 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 | 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 | of the database. If this matters to you you can find the instructions at | ||
[http://techbase.kde.org/Development/Tutorials/Metadata/Nepomuk/TipsAndTricks#Remove_all_Strigi-indexed_data this page] | [http://techbase.kde.org/Development/Tutorials/Metadata/Nepomuk/TipsAndTricks#Remove_all_Strigi-indexed_data this page] | ||
===IMAP Resource always claims to be offline=== <!--T:119--> | |||
<!--T:136--> | |||
Even though the system has an internet connection, the IMAP resource refuses | |||
to switch to online state. | |||
<!--T:120--> | |||
This bug is caused by a misconfigured NetworkManager installation on your system. Check the output of the following command: | |||
<!--T:147--> | |||
{{input|1=qdbus --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.state}} | |||
<!--T:148--> | |||
You can get any of the following values: | |||
<!--T:149--> | |||
* '''20''' (formerly ''4''), '''disconnected'''. If you have access to the internet, your NetworkManager configuration must be wrong. | |||
<!--T:150--> | |||
* '''70''' (formerly ''3''), '''connected'''. The problem must be somewhere else. | |||
**It might be that one or more '''network interfaces''' are '''not controlled by NetworkManager'''. If that is your case, give the control of those interfaces to NetworkManager. It might be as simple as removing the entries for the interfaces from a text file (for example, <tt>/etc/network/interfaces</tt>). Check the help resources provided by your software distribution for more information. | |||
=== Can't read any details of some messages or big delays to read it === <!--T:137--> | |||
<!--T:138--> | |||
if you aren't able to read some emails and see a message with " please wait ... ", you may logout and login KDE session to reinitialize all processes, might help. | |||
== Some Technical Issues == <!--T:44--> | == Some Technical Issues == <!--T:44--> | ||
Line 167: | Line 196: | ||
<!--T:50--> | <!--T:50--> | ||
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: | 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: | ||
{{output|1=unknown error 255 when running akonadictl | |||
"DB error: 'Could not open required defaults file: /home/$username/.local/share/akonadi/mysql.conf" }} | "DB error: 'Could not open required defaults file: /home/$username/.local/share/akonadi/mysql.conf"}} | ||
<!--T:51--> | |||
You can solve this by running the following command with root privileges then reload apparmor: | You can solve this by running the following command with root privileges then reload apparmor: | ||
{{ | {{input|1=aa-complain mysqld}} | ||
<!--T:113--> | |||
On ''Kubuntu'' this is: | On ''Kubuntu'' this is: | ||
{{ | {{input|1=sudo aa-complain mysqld | ||
sudo /etc/init.d/apparmor reload}} | sudo /etc/init.d/apparmor reload}} | ||
<!--T:52--> | |||
Note that you might be using '''Apparmor''' even if it does not show up in the process list. | Note that you might be using '''Apparmor''' even if it does not show up in the process list. | ||
Line 187: | Line 216: | ||
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: | 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 <menuchoice>Systemsettings -> Advanced -> Akonadi -> Server configuration</menuchoice>. | * '''Akonadi''' still uses '''mysqld''' instead of '''mysqld-akonadi'''. You can change that in <menuchoice>Systemsettings -> Advanced -> Akonadi -> Server configuration</menuchoice>. | ||
* '''AppArmor''' is not setup correctly for '''mysqld-akonadi''' either. Try running the "aa-complain" command noted above with '''mysqld-akonadi''' instead of '''mysqld'''. | * '''AppArmor''' is not setup correctly for '''mysqld-akonadi''' either. Try running the "aa-complain" command noted above with '''mysqld-akonadi''' instead of '''mysqld'''. | ||
<!--T:54--> | <!--T:54--> | ||
--- | --- | ||
<!--T:55--> | |||
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: | 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: | * dmesg produces: | ||
{{ | {{output|1=ecryptfs_do_create: Failure to create dentry in lower fs; rc = [-13] | ||
ecryptfs_create: Failed to create file inlower filesystem}} | ecryptfs_create: Failed to create file inlower filesystem}} | ||
* | * <!--T:114--> | ||
Akonadi will list the following errors: | Akonadi will list the following errors: | ||
{{ | {{output|1=Akonadi server process not registered at D-Bus}} | ||
<!--T:56--> | |||
The fix is to edit the following file "/etc/apparmor.d/usr.sbin.mysqld-akonadi". | The fix is to edit the following file "/etc/apparmor.d/usr.sbin.mysqld-akonadi". | ||
Below the line: | Below the line: | ||
{{ | {{output|1=@{HOME}/.local/share/akonadi/** rwk,}} | ||
<!--T:115--> | |||
Add a new line: | Add a new line: | ||
{{ | {{input|1=@{HOME}/.Private/** rwk,}} | ||
<!--T:57--> | |||
Restart '''apparmor''' and restart '''akonadi'''. | Restart '''apparmor''' and restart '''akonadi'''. | ||
Line 222: | Line 251: | ||
<!--T:61--> | <!--T:61--> | ||
If you compile Qt4 yourself, make sure to tell the configure script to build in MySQL support by passing it the following option: | If you compile Qt4 yourself, make sure to tell the configure script to build in MySQL support by passing it the following option: | ||
{{ | {{input|1=-plugin-sql-mysql}} | ||
<!--T:116--> | |||
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 "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''). | ||
<!--T:62--> | <!--T:62--> | ||
If you get the Qt4 direct from ''Nokia'', such as a download of <code>qt-sdk-linux-x86_64-opensource-2009.05.bin</code>, you will ( by the command "akonadictl start") get an error at Test 1: | If you get the Qt4 direct from ''Nokia'', such as a download of <code>qt-sdk-linux-x86_64-opensource-2009.05.bin</code>, you will ( by the command "akonadictl start") get an error at Test 1: | ||
<!--T:99--> | <!--T:99--> | ||
{{output|1=Database driver not found. | |||
Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration. | Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration. | ||
The following drivers are installed: QSQLITE. | The following drivers are installed: QSQLITE. | ||
Make sure the required driver is installed.}} | Make sure the required driver is installed.}} | ||
<!--T:64--> | |||
The driver you need is ''libqsqlmysql.so'' | The driver you need is ''libqsqlmysql.so'' | ||
<!--T:65--> | <!--T:65--> | ||
Unfortunately this driver is not part of the distribution (until january 2010). | Unfortunately this driver is not part of the distribution (until january 2010). | ||
You need to compile the source. Download the following file: | You need to compile the source. Download the following file: | ||
{{ | {{input|1=qt-everywhere-opensource-src-4.6.0.tar.bz}} | ||
<!--T:66--> | |||
Then ''configure'' and ''make'' as above. But the ''make install'' doesn't copy the driver. So you have to copy it by yourself: | Then ''configure'' and ''make'' as above. But the ''make install'' doesn't copy the driver. So you have to copy it by yourself: | ||
{{ | {{input|1=cp <qt-src-dir>/qt-everywhere-opensource-src-4.6.0/plugins/sqldrivers/libqsqlmysql.so /usr/local/bin/sqldrivers/}} | ||
<!--T:117--> | |||
'''But''' the Revision '''4.6.1''', such as qt-sdk-linux-x86_64-opensource-2010.xx.bin has the driver you needed. | '''But''' the Revision '''4.6.1''', such as qt-sdk-linux-x86_64-opensource-2010.xx.bin has the driver you needed. | ||
'''But''' it might be necessary to bind again the ''libqsqlmysql.so'' if the ''libmysqlclient.so'' has changed to a newer version. | |||
=== Environment Setup === <!--T:67--> | === Environment Setup === <!--T:67--> | ||
<!--T:68--> | <!--T:68--> | ||
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. | 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' === <!--T:69--> | === mysqld: unknown variable 'innodb_file_per_table=1' === <!--T:69--> | ||
<!--T:70--> | |||
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: | 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: | ||
{{output|1=[ERROR] /usr/libexec/mysqld: unknown variable 'innodb_file_per_table=1' | |||
[ERROR] Aborting}} | [ERROR] Aborting}} | ||
<!--T:71--> | |||
Try adding: | Try adding: | ||
<!--T:100--> | <!--T:100--> | ||
{{input|1=#sql_mode=strict_trans_tables <- Add underneath this line | |||
#plugins | #plugins | ||
plugin_dir=usr/lib/mysql/plugin < - This may be a different path | plugin_dir=usr/lib/mysql/plugin < - This may be a different path | ||
plugin-load=ha_innodb.so}} | plugin-load=ha_innodb.so}} | ||
===Table 'mysql. servers' doesn't exist=== <!--T:101--> | ===Table 'mysql. servers' doesn't exist=== <!--T:101--> | ||
<!--T:73--> | <!--T:73--> | ||
If MySQL server log contains the following error, then, most probably, you don't have your MySQL configuration file in place: | If MySQL server log contains the following error, then, most probably, you don't have your MySQL configuration file in place: | ||
<!--T:102--> | <!--T:102--> | ||
{{output|1=[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist | |||
[ERROR] Cannot open mysql.db | [ERROR] Cannot open mysql.db | ||
[ERROR] Cannot open mysql.user | [ERROR] Cannot open mysql.user | ||
[ERROR] Cannot open mysql.event}} | [ERROR] Cannot open mysql.event}} | ||
<!--T:103--> | |||
Copy it from ''/usr/share/config/akonadi/mysql-global.conf'' into ''~/.config/akonadi/mysql-local.conf''. (For ''debian'' and ''openSuSE'' users the file | 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: | ||
<!--T:104--> | <!--T:104--> | ||
{{output|1=[ERROR] Plugin 'InnoDB' init function returned error. | |||
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. | [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. | ||
[ERROR] Unknown/unsupported table type: innodb | [ERROR] Unknown/unsupported table type: innodb | ||
[ERROR] Aborting}} | [ERROR] Aborting}} | ||
<!--T:105--> | |||
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. | 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. | ||
<!--T:74--> | <!--T:74--> | ||
On ''openSUSE 11.2'' running the following command will fix this problem: | On ''openSUSE 11.2'' running the following command will fix this problem: | ||
<!--T:106--> | <!--T:106--> | ||
{{ | {{input|1=mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/}} | ||
<!--T:121--> | |||
For ''Archlinux'': | |||
< | <!--T:122--> | ||
=== Kubuntu 10. | {{input|1=mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/ --basedir=/usr}} | ||
=== Kubuntu 10.04 (Lucid Lynx) Upgrade === <!--T:75--> | |||
<!--T:76--> | <!--T:76--> | ||
This is a summary of other entries here for those upgrading from ''Kubuntu 9.10'' to 10. | 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. | ||
<!--T:77--> | <!--T:77--> | ||
Install missing prerequisites. Remove previous '''akonadi''' cache. Start the '''akonadi''' service. Install the database. Upgrade the database. Stop and restart the '''akonadi''' service. | Install missing prerequisites. Remove previous '''akonadi''' cache. Start the '''akonadi''' service. Install the database. Upgrade the database. Stop and restart the '''akonadi''' service. | ||
{{input|1=sudo apt-get install virtuoso-server mysql-server-5.1 | |||
rm -r $HOME/.local/share/akonadi | rm -r $HOME/.local/share/akonadi | ||
akonadictl start | akonadictl start | ||
Line 316: | Line 352: | ||
akonadictl start}} | akonadictl start}} | ||
<!--T:78--> | |||
The mysql_install_db command above will report something like the following, which you can safely ignore: | The mysql_install_db command above will report something like the following, which you can safely ignore: | ||
<!--T:108--> | <!--T:108--> | ||
{{output|1=Installing MySQL system tables... | |||
100501 18:04:30 [Warning] Can't create test file | 100501 18:04:30 [Warning] Can't create test file | ||
/home/[userid]/.local/share/akonadi/db_data/[hostname].lower-test}} | /home/[userid]/.local/share/akonadi/db_data/[hostname].lower-test}} | ||
<!--T:79--> | |||
Reference: | Reference: | ||
[http://forum.kde.org/viewtopic.php?f=20&t=79717 forum.kde.org Akonadi 1.2.1 - some issues] | [http://forum.kde.org/viewtopic.php?f=20&t=79717 forum.kde.org Akonadi 1.2.1 - some issues] | ||
Line 331: | Line 367: | ||
<!--T:81--> | <!--T:81--> | ||
In addition to the ''Kubuntu 10. | 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: | ||
{{input|1=rm -rf $HOME/.config/akonadi}} | |||
=== Can't initialize character set latin1 === <!--T:82--> | === Can't initialize character set latin1 === <!--T:82--> | ||
<!--T:83--> | <!--T:83--> | ||
If you get the following error when starting Akonadi, then you are probably using a MySQL server which has a version > 5.1.42: | If you get the following error when starting Akonadi, then you are probably using a MySQL server which has a version > 5.1.42: | ||
<!--T:84--> | <!--T:84--> | ||
{{output|1=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! | Nepomuk QueryServer interface not available! | ||
Connecting to deprecated signal | Connecting to deprecated signal | ||
Line 356: | Line 393: | ||
/usr/share/mysql/charsets/)"}} | /usr/share/mysql/charsets/)"}} | ||
<!--T:85--> | |||
There is a known regression in MySQL 5.1.43 and 5.1.44 which prevents MySQL from starting. | There is a known regression in MySQL 5.1.43 and 5.1.44 which prevents MySQL from starting. | ||
Line 366: | Line 403: | ||
<!--T:88--> | <!--T:88--> | ||
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: | 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: | ||
{{ | {{input|1=akonadictl stop}} | ||
<!--T:118--> | |||
You can confirm that it was indeed shut down completely by running: | You can confirm that it was indeed shut down completely by running: | ||
{{ | {{input|1=akonadictl status}} | ||
<!--T:89--> | |||
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. | 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. | ||
Line 378: | Line 415: | ||
<!--T:91--> | <!--T:91--> | ||
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. | 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. | ||
<!--T:92--> | <!--T:92--> | ||
{{output|1=akonadiserver: libmysql.c:4301: setup_one_fetch_function: Assertion | |||
`param->buffer_length != 0' failed.}} | `param->buffer_length != 0' failed.}} | ||
<!--T:93--> | |||
It is extremely hard to diagnose as the assertion mentioned above | 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 | * 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 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. | * SQL protocol logs showing large apparently random record ids which are nevertheless considered valid. | ||
Line 400: | Line 437: | ||
Possible solution: Rebuild the Qt MySQL driver after upgrading MySQL (which most likely caused this problem in the first place). | Possible solution: Rebuild the Qt MySQL driver after upgrading MySQL (which most likely caused this problem in the first place). | ||
<!--T:96--> | === To reset nepomuk and the akonadi system in KMail 2 === <!--T:96--> | ||
<!--T:124--> | |||
Be warned that you should not follow this advice, without backing up your data. | |||
<!--T:125--> | |||
After the introduction of KMail 2 in kdepim, since KDE SC 4.6.x, in order to search in emails and to get addressbooks, it is necessary to set <menuchoice>System Settings -> Desktop Search -> Enable Nepomuk Sematic Desktop </menuchoice> enabled, and check the box <menuchoice>Enable Email Indexer</menuchoice>. | |||
<!--T:126--> | |||
If virtuoso-t occupies almost 100% of CPU cores and the system is nearly frozen, it may be a good idea to reset all. | |||
<!--T:127--> | |||
To do the big reset you need : | |||
{{Warning|1=This will initialize all your Kontact and KDE PIM data customization, but not remove emails data, akonadi resources (like email accounts, address books ), KMail Identities, filters and expired mail folders. However, be warned that you will lost much customization information, including ratings and other metadata. Also there is some risk here, because this reconstruction of data has bugs that may make you lose data.}} | |||
<!--T:133--> | |||
{{Input|1=akonadictl stop | |||
rm -rf ~/.local/share/akonadi/db_data/* | |||
akonadictl start | |||
# we should also clean KDE temporary folders before start KMail | |||
rm -rf /var/tmp/kdecache-$USER /tmp/ksocket-$USER /tmp/kde-$USER | |||
}} | |||
<!--T:128--> | |||
You need to check <menuchoice> Settings -> Configure KMail -> Identities</menuchoice> to see whether the Sent folder is correct. Some of mine were not. | |||
<!--T:129--> | |||
Check <menuchoice> Settings -> Configure KMail -> Accounts </menuchoice> settings and check whether the incoming folder is correct. Some of mine were not. | |||
<!--T:130--> | |||
Check all filters, before pulling some email. I advise disabling all filters because there may be many folders incorrect or missing. | |||
<!--T:131--> | |||
Also important is that if you have an "expired folder", check all folders to see if the receiving folder is correctly set. If you have <menuchoice>Delete permanently</menuchoice> checked you may lose important emails because expiring worked with the wrong folder. | |||
<!--T:132--> | |||
In each <menuchoice> folder's context menu -> Folder Properties </menuchoice> check Identities, as the associated identity may also be changed or lost in any folder. | |||
<!--T:134--> | |||
After this we are ready to [[Special:myLanguage/Akonadi_4.4/Troubleshooting#You experience long delays when sending mail|clean up Nepomuk data]] before enabling Nepomuk Semantic. | |||
<!--T:135--> | |||
After all is cleaned , if you aren't able to read any emails, you should logout and login KDE session again to reinitialize all processes . | |||
<!--T:98--> | |||
[[Category:System]] | [[Category:System]] | ||
Latest revision as of 17:00, 13 February 2013
Introduction
This page is mainly concerned with troubleshooting Akonadi, as there are inevitable glitches in early stages of migration. For many people the first signs of Akonadi activity will be in KDE SC 4.4, and many will be confused by it. For a brief description of the purpose of Akonadi, see this Glossary entry. You will also find useful links to further reading. Once the inevitable teething troubles are over, Akonadi will provide a power-house usable by many applications.
Understanding the Structure
You can, of course, simply use Kontact to manage all your addressbooks, but if you have a backup system in place, for instance, you'll want to know where your data is, and how it's handled. The page Akonadi and AddressBook will help.
Troubleshooting Tips
- When reporting problems with the Akonadi server, always include the comprehensive self-test report. This report can be obtained from the self-test dialog which shows up whenever the Akonadi server was unable to start successfully. You can find the selftest dialog in the kcmmodule that is accessable via:
kcmshell4 kcm_akonadi
- Starting the Akonadi server manually on the command line can result in additional useful information. This can be done by running the following command on a console:
akonadictl start
Similarly, with this command the Akonadi server can be stopped again:
akonadictl stop
This command gives more useful information:
akonadictl status
Common Problems
Kontact doesn't start - and doesn't tell me anything
If Kontact doesn't start, and you see no error messages, check that Akonadi is running. Akonadi should start on demand. If yours doesn't, you will have to start it before Kontact will start up if you have any migrated resources (most likely KAddressBook). Use the Akonadi Tray icon (get this by typing "akonadi" into KRunner) or type the commands into konsole to start it.
Kontact doesn't start - version II
Kontact has been known to be hit after an update. If this happens, try starting KMail, KOrganizer or any of the other applications from KRunner (or Konsole). Chances are high that they will work as stand-alone apps while you find what went wrong. This mainly affects version 4.4.0.
Folder not found: "/Local"
Some people have reported this error, when Kontact would not start. In some early versions of 4.4 there seems to be a bug in the migration that is telling KMail to look for local mail in ~/.local/share/Local, a directory that had not been set up. The solution for this is not to attempt to correct it, but, with KMail/Kontact closed, to open the Akonadi Console:
- Use krunner, Alt-F2, or
- "akonadiconsole" konsole
Then remove the resource that it says is for local mail. You should now find that you can start Kontact or KMail, and that a new resource will be created, pointing to ~/.local/share/local-mail
Yes. If your addressbook has migrated correctly a new resource will have been created as ~/.local/share/contacts/
What are /usr/bin/akonadi_maildir_resource and /usr/bin/akonadi_maildispatcher_agent?
The akonadi_maildir_resource is created automatically by the akonadi_maildispatcher_agent, while the latter is always started together with the Akonadi server as it provides basic functionality (e.g. sending mail) that is used by all mail applications that are (and will be) based on Akonadi. So it is ok that these two are running, as a user you can simply ignore them. This autogenerated akonadi_maildir_resource will always point to ~/.local/share/local-mail/ which is your "Local folders" account where your local folders and emails will be stored.
At this point, in KDE SC 4.4, mail is not yet being migrated.
Nepomuk Indexing Agents have been Disabled
Kontact is now working, but you keep seeing this notice:
The most common reason for this notice is that Nepomuk is simply disabled in System Settings. Please try enabling it in System Settings under
by checking "Nepomuk Semantik Desktop" and clicking "Apply".If this does not help (or if the option was already checked when you got the error) and if you have previously been using prereleases of KDE SC 4.4, you may be affected by a change to the database layout (due to an upgrade of the Virtuoso database server from version 5 to version 6; production releases of KDE SC 4.4 are expected to be shipped with Virtuoso version 6). The following commands should get it working again:
qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit rm -r ~/.kde/share/apps/nepomuk rm -r ~/.kde4/share/apps/nepomuk nepomukserver
Note that the above commands will not enable Nepomuk permanently if it isn't already enabled, you have to use System Settings for that.
A running Nepomuk is necessary to have a working Akonadi, and thus a working Kontact. However, you can disable the Strigi file indexer, which is not needed for Kontact. Strigi file indexing is used for desktop searching only, which is unrelated to Kontact. Just make sure Nepomuk itself is running correctly for Kontact.
In Kontact, Nepomuk is used for many different things, ranging from displaying upcoming birthdays, over handling free/busy lists to showing a contact photo in the message viewer. If Nepomuk is not running, several different things in Kontact will cease to work. The notice is there to warn you about the reduced functionality. Enabling Nepomuk as described above fixes the problem.
You can check if Nepomuk is correctly running by typing:
akonadictl status
I want to use my current Address Book and Organizer - Can I?
Yes. When you use the Akonadi Console to add a resource it allows you to choose as Standard Addressbook - point that to your std.vcf should work fine. Migration does not destroy your old addressbook. You can continue to use it, though you will lose any benefits that Akonadi can bring. Alternatively you can have both an Akonadi addressbook and your original one, for a time, if you feel safer that way.
I can't see any details in my Address Book
At the moment, the cause of this is not identified, but the cure is simple. Close Kontact, and start KAddressBook as a stand-alone application. After you close it you will be able to use it within Kontact. It seems that something is not being triggered when Kontact launches, and I expect this to be identified and fixed soon. This seems to mainly affect version 4.4.0.
My contacts don't show when I use the Select button in KMail
Check here.
. 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 inHow do I get my Groupware addressbook back?
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.
You experience long delays when sending mail
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
IMAP Resource always claims to be offline
Even though the system has an internet connection, the IMAP resource refuses to switch to online state.
This bug is caused by a misconfigured NetworkManager installation on your system. Check the output of the following command:
qdbus --system org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.state
You can get any of the following values:
- 20 (formerly 4), disconnected. If you have access to the internet, your NetworkManager configuration must be wrong.
- 70 (formerly 3), connected. The problem must be somewhere else.
- It might be that one or more network interfaces are not controlled by NetworkManager. If that is your case, give the control of those interfaces to NetworkManager. It might be as simple as removing the entries for the interfaces from a text file (for example, /etc/network/interfaces). Check the help resources provided by your software distribution for more information.
Can't read any details of some messages or big delays to read it
if you aren't able to read some emails and see a message with " please wait ... ", you may logout and login KDE session to reinitialize all processes, might help.
Some Technical Issues
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 .
- 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.
Missing Prerequisite
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. But it might be necessary to bind again the libqsqlmysql.so if the libmysqlclient.so has changed to a newer version.
Environment Setup
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
Table 'mysql. servers' doesn't exist
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/
For Archlinux:
mysql_install_db --datadir=$HOME/.local/share/akonadi/db_data/ --basedir=/usr
Kubuntu 10.04 (Lucid Lynx) Upgrade
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
KAddressBook upgrade
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
Can't initialize character set 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.
Restarting after a previous error
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:
- http://forum.kde.org/viewtopic.php?f=20&t=61738
- http://bugs.gentoo.org/show_bug.cgi?id=267513
- https://bugs.kde.org/202623 (contains a possible solution)
- http://bbs.archlinux.org/viewtopic.php?id=78358
Possible solution: Rebuild the Qt MySQL driver after upgrading MySQL (which most likely caused this problem in the first place).
To reset nepomuk and the akonadi system in KMail 2
Be warned that you should not follow this advice, without backing up your data.
After the introduction of KMail 2 in kdepim, since KDE SC 4.6.x, in order to search in emails and to get addressbooks, it is necessary to set
enabled, and check the box .If virtuoso-t occupies almost 100% of CPU cores and the system is nearly frozen, it may be a good idea to reset all.
To do the big reset you need :
akonadictl stop rm -rf ~/.local/share/akonadi/db_data/* akonadictl start # we should also clean KDE temporary folders before start KMail rm -rf /var/tmp/kdecache-$USER /tmp/ksocket-$USER /tmp/kde-$USER
You need to check
to see whether the Sent folder is correct. Some of mine were not.Check
settings and check whether the incoming folder is correct. Some of mine were not.Check all filters, before pulling some email. I advise disabling all filters because there may be many folders incorrect or missing.
Also important is that if you have an "expired folder", check all folders to see if the receiving folder is correctly set. If you have
checked you may lose important emails because expiring worked with the wrong folder.In each
check Identities, as the associated identity may also be changed or lost in any folder.After this we are ready to clean up Nepomuk data before enabling Nepomuk Semantic.
After all is cleaned , if you aren't able to read any emails, you should logout and login KDE session again to reinitialize all processes .